Make level meter LED black when off

This commit is contained in:
Gauthier Östervall 2020-06-01 21:16:31 +02:00
parent 50ccb63163
commit 21d7ad291a
6 changed files with 13 additions and 13 deletions

View File

@ -629,8 +629,8 @@ DISTFILES += ChangeLog \
src/res/faderhandlesmall.png \
src/res/HLEDGreen.png \
src/res/HLEDGreenSmall.png \
src/res/HLEDGrey.png \
src/res/HLEDGreySmall.png \
src/res/HLEDBlack.png \
src/res/HLEDBlackSmall.png \
src/res/HLEDRed.png \
src/res/HLEDRedSmall.png \
src/res/HLEDYellow.png \

View File

@ -110,7 +110,7 @@ void CMultiColorLEDBar::Reset ( const bool bEnabled )
// different reset behavoiur for enabled and disabled control
if ( bEnabled )
{
vecpLEDs[iLEDIdx]->setColor ( cLED::RL_GREY );
vecpLEDs[iLEDIdx]->setColor ( cLED::RL_BLACK );
}
else
{
@ -171,7 +171,7 @@ void CMultiColorLEDBar::setValue ( const double dValue )
else
{
// we use grey LED for inactive state
vecpLEDs[iLEDIdx]->setColor ( cLED::RL_GREY );
vecpLEDs[iLEDIdx]->setColor ( cLED::RL_BLACK );
}
}
break;
@ -185,7 +185,7 @@ void CMultiColorLEDBar::setValue ( const double dValue )
CMultiColorLEDBar::cLED::cLED ( QWidget* parent ) :
BitmCubeRoundDisabled ( QString::fromUtf8 ( ":/png/LEDs/res/CLEDDisabledSmall.png" ) ),
BitmCubeRoundGrey ( QString::fromUtf8 ( ":/png/LEDs/res/HLEDGreySmall.png" ) ),
BitmCubeRoundBlack ( QString::fromUtf8 ( ":/png/LEDs/res/HLEDBlackSmall.png" ) ),
BitmCubeRoundGreen ( QString::fromUtf8 ( ":/png/LEDs/res/HLEDGreenSmall.png" ) ),
BitmCubeRoundYellow ( QString::fromUtf8 ( ":/png/LEDs/res/HLEDYellowSmall.png" ) ),
BitmCubeRoundRed ( QString::fromUtf8 ( ":/png/LEDs/res/HLEDRedSmall.png" ) )
@ -194,11 +194,11 @@ CMultiColorLEDBar::cLED::cLED ( QWidget* parent ) :
pLEDLabel = new QLabel ( "", parent );
// bitmap defines minimum size of the label
pLEDLabel->setMinimumSize ( BitmCubeRoundGrey.width(), BitmCubeRoundGrey.height() );
pLEDLabel->setMinimumSize ( BitmCubeRoundBlack.width(), BitmCubeRoundBlack.height() );
// set initial bitmap
pLEDLabel->setPixmap ( BitmCubeRoundGrey );
eCurLightColor = RL_GREY;
pLEDLabel->setPixmap ( BitmCubeRoundBlack );
eCurLightColor = RL_BLACK;
}
void CMultiColorLEDBar::cLED::setColor ( const ELightColor eNewColor )
@ -212,8 +212,8 @@ void CMultiColorLEDBar::cLED::setColor ( const ELightColor eNewColor )
pLEDLabel->setPixmap ( BitmCubeRoundDisabled );
break;
case RL_GREY:
pLEDLabel->setPixmap ( BitmCubeRoundGrey );
case RL_BLACK:
pLEDLabel->setPixmap ( BitmCubeRoundBlack );
break;
case RL_GREEN:

View File

@ -66,7 +66,7 @@ protected:
enum ELightColor
{
RL_DISABLED,
RL_GREY,
RL_BLACK,
RL_GREEN,
RL_YELLOW,
RL_RED
@ -78,7 +78,7 @@ protected:
protected:
QPixmap BitmCubeRoundDisabled;
QPixmap BitmCubeRoundGrey;
QPixmap BitmCubeRoundBlack;
QPixmap BitmCubeRoundGreen;
QPixmap BitmCubeRoundYellow;
QPixmap BitmCubeRoundRed;

BIN
src/res/HLEDBlack.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

BIN
src/res/HLEDBlackSmall.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 405 B

View File

@ -26,7 +26,7 @@
<file>res/CLEDRedSmall.png</file>
<file>res/CLEDYellowSmall.png</file>
<file>res/HLEDGreenSmall.png</file>
<file>res/HLEDGreySmall.png</file>
<file>res/HLEDBlackSmall.png</file>
<file>res/HLEDRedSmall.png</file>
<file>res/HLEDYellowSmall.png</file>
</qresource>