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/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>