Merge pull request #318 from fleutot/off_led_black

Make level meter LED black when off
This commit is contained in:
Volker Fischer 2020-06-01 22:24:09 +02:00 committed by GitHub
commit ca94e9f878
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 13 additions and 13 deletions

View file

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

View file

@ -66,7 +66,7 @@ protected:
enum ELightColor enum ELightColor
{ {
RL_DISABLED, RL_DISABLED,
RL_GREY, RL_BLACK,
RL_GREEN, RL_GREEN,
RL_YELLOW, RL_YELLOW,
RL_RED RL_RED
@ -78,7 +78,7 @@ protected:
protected: protected:
QPixmap BitmCubeRoundDisabled; QPixmap BitmCubeRoundDisabled;
QPixmap BitmCubeRoundGrey; QPixmap BitmCubeRoundBlack;
QPixmap BitmCubeRoundGreen; QPixmap BitmCubeRoundGreen;
QPixmap BitmCubeRoundYellow; QPixmap BitmCubeRoundYellow;
QPixmap BitmCubeRoundRed; 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/CLEDRedSmall.png</file>
<file>res/CLEDYellowSmall.png</file> <file>res/CLEDYellowSmall.png</file>
<file>res/HLEDGreenSmall.png</file> <file>res/HLEDGreenSmall.png</file>
<file>res/HLEDGreySmall.png</file> <file>res/HLEDBlackSmall.png</file>
<file>res/HLEDRedSmall.png</file> <file>res/HLEDRedSmall.png</file>
<file>res/HLEDYellowSmall.png</file> <file>res/HLEDYellowSmall.png</file>
</qresource> </qresource>