From f0bce741e6b2eda6aa517b5f337db6dd9b90cea2 Mon Sep 17 00:00:00 2001 From: jwoithe Date: Thu, 2 Feb 2012 12:18:37 +0000 Subject: [PATCH] matrixmixer: include graphical indicators for mute and invert status. Muted faders are displayed with a dark gray background, while inverted channels have a phi (the universally recognised phase symbol) in the top left corner. git-svn-id: svn+ssh://ffado.org/ffado/trunk@2029 2be59082-3212-0410-8809-b0798e1608f0 --- libffado/support/mixer-qt4/ffado/widgets/matrixmixer.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/libffado/support/mixer-qt4/ffado/widgets/matrixmixer.py b/libffado/support/mixer-qt4/ffado/widgets/matrixmixer.py index c5a758d3..398f596c 100644 --- a/libffado/support/mixer-qt4/ffado/widgets/matrixmixer.py +++ b/libffado/support/mixer-qt4/ffado/widgets/matrixmixer.py @@ -126,9 +126,11 @@ class MixerNode(QtGui.QAbstractSlider): #log.debug("MixerNode.directValues( '%s' )" % text) if text == "Mute": #log.debug("Mute %d" % self.mute_action.isChecked()) + self.update() self.parent().mutes_interface.setValue(self.output, self.input, self.mute_action.isChecked()) elif text == "Invert": log.debug("Invert %d" % self.inv_action.isChecked()) + self.update() self.parent().inverts_interface.setValue(self.output, self.input, self.inv_action.isChecked()) else: text = text.split(" ")[0].replace(",",".") @@ -165,7 +167,10 @@ class MixerNode(QtGui.QAbstractSlider): p = QtGui.QPainter(self) rect = self.rect() v = self.value() - color = self.bgcolors.getColor(v) + if (self.mute_action!=None and self.mute_action.isChecked()): + color = QtGui.QColor(64, 64, 64) + else: + color = self.bgcolors.getColor(v) p.fillRect(rect, color) if self.small: @@ -183,6 +188,8 @@ class MixerNode(QtGui.QAbstractSlider): if v == 0: text = "-ꝏ dB" p.drawText(rect, Qt.Qt.AlignCenter, QtCore.QString.fromUtf8(text)) + if (self.inv_action!=None and self.inv_action.isChecked()): + p.drawText(rect, Qt.Qt.AlignLeft|Qt.Qt.AlignTop, QtCore.QString.fromUtf8(" ϕ")) def internalValueChanged(self, value): #log.debug("MixerNode.internalValueChanged( %i )" % value) -- 2.11.4.GIT