Changeset 2029

Show
Ignore:
Timestamp:
02/02/12 04:18:37 (9 years ago)
Author:
jwoithe
Message:

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.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libffado/support/mixer-qt4/ffado/widgets/matrixmixer.py

    r2021 r2029  
    127127        if text == "Mute": 
    128128            #log.debug("Mute %d" % self.mute_action.isChecked()) 
     129            self.update() 
    129130            self.parent().mutes_interface.setValue(self.output, self.input, self.mute_action.isChecked()) 
    130131        elif text == "Invert": 
    131132            log.debug("Invert %d" % self.inv_action.isChecked()) 
     133            self.update() 
    132134            self.parent().inverts_interface.setValue(self.output, self.input, self.inv_action.isChecked()) 
    133135        else: 
     
    166168        rect = self.rect() 
    167169        v = self.value() 
    168         color = self.bgcolors.getColor(v) 
     170        if (self.mute_action!=None and self.mute_action.isChecked()): 
     171            color = QtGui.QColor(64, 64, 64) 
     172        else: 
     173            color = self.bgcolors.getColor(v) 
    169174        p.fillRect(rect, color) 
    170175 
     
    184189            text = "-ꝏ dB" 
    185190        p.drawText(rect, Qt.Qt.AlignCenter, QtCore.QString.fromUtf8(text)) 
     191        if (self.inv_action!=None and self.inv_action.isChecked()): 
     192            p.drawText(rect, Qt.Qt.AlignLeft|Qt.Qt.AlignTop, QtCore.QString.fromUtf8(" ϕ")) 
    186193 
    187194    def internalValueChanged(self, value):