summaryrefslogtreecommitdiff
path: root/baserender.c
diff options
context:
space:
mode:
authorMartin Schirrmacher <vdr.skinflatplus@schirrmacher.eu>2017-05-06 15:24:52 +0200
committerMartin Schirrmacher <vdr.skinflatplus@schirrmacher.eu>2017-05-06 15:24:52 +0200
commitf7a270e707ed72a4fd59407904cb2974d1accbca (patch)
tree862124932762c8feb28dc1a48ca40199d7cf5b91 /baserender.c
parentf11dd9525be2ea461fc9a3bb93d0410f84b97a7b (diff)
downloadskin-flatplus-f7a270e707ed72a4fd59407904cb2974d1accbca.tar.gz
skin-flatplus-f7a270e707ed72a4fd59407904cb2974d1accbca.tar.bz2
support for change button color in osd settings
Diffstat (limited to 'baserender.c')
-rw-r--r--baserender.c66
1 files changed, 62 insertions, 4 deletions
diff --git a/baserender.c b/baserender.c
index ec91910e..910e9223 100644
--- a/baserender.c
+++ b/baserender.c
@@ -554,7 +554,20 @@ void cFlatBaseRender::ButtonsSet(const char *Red, const char *Green, const char
int x = 0;
if( !(!Config.ButtonsShowEmpty && !Red) ) {
buttonsPixmap->DrawText(cPoint(x, 0), Red, Theme.Color(clrButtonFont), Theme.Color(clrButtonBg), font, buttonWidth, fontHeight + marginButtonColor, taCenter);
- buttonsPixmap->DrawRectangle(cRect(x, fontHeight + marginButtonColor, buttonWidth, buttonColorHeight), Theme.Color(clrButtonRed));
+ switch( Setup.ColorKey0 ) {
+ case 0:
+ buttonsPixmap->DrawRectangle(cRect(x, fontHeight + marginButtonColor, buttonWidth, buttonColorHeight), Theme.Color(clrButtonRed));
+ break;
+ case 1:
+ buttonsPixmap->DrawRectangle(cRect(x, fontHeight + marginButtonColor, buttonWidth, buttonColorHeight), Theme.Color(clrButtonGreen));
+ break;
+ case 2:
+ buttonsPixmap->DrawRectangle(cRect(x, fontHeight + marginButtonColor, buttonWidth, buttonColorHeight), Theme.Color(clrButtonYellow));
+ break;
+ case 3:
+ buttonsPixmap->DrawRectangle(cRect(x, fontHeight + marginButtonColor, buttonWidth, buttonColorHeight), Theme.Color(clrButtonBlue));
+ break;
+ }
DecorBorderDraw(x + Config.decorBorderButtonSize, buttonsTop, buttonWidth, buttonsHeight, Config.decorBorderButtonSize, Config.decorBorderButtonType,
Config.decorBorderButtonFg, Config.decorBorderButtonBg, BorderButton);
buttonsDrawn = true;
@@ -563,7 +576,22 @@ void cFlatBaseRender::ButtonsSet(const char *Red, const char *Green, const char
x += buttonWidth + marginItem + Config.decorBorderButtonSize*2;
if( !(!Config.ButtonsShowEmpty && !Green) ) {
buttonsPixmap->DrawText(cPoint(x, 0), Green, Theme.Color(clrButtonFont), Theme.Color(clrButtonBg), font, buttonWidth, fontHeight + marginButtonColor, taCenter);
- buttonsPixmap->DrawRectangle(cRect(x, fontHeight + marginButtonColor, buttonWidth, buttonColorHeight), Theme.Color(clrButtonGreen));
+
+ switch( Setup.ColorKey1 ) {
+ case 0:
+ buttonsPixmap->DrawRectangle(cRect(x, fontHeight + marginButtonColor, buttonWidth, buttonColorHeight), Theme.Color(clrButtonRed));
+ break;
+ case 1:
+ buttonsPixmap->DrawRectangle(cRect(x, fontHeight + marginButtonColor, buttonWidth, buttonColorHeight), Theme.Color(clrButtonGreen));
+ break;
+ case 2:
+ buttonsPixmap->DrawRectangle(cRect(x, fontHeight + marginButtonColor, buttonWidth, buttonColorHeight), Theme.Color(clrButtonYellow));
+ break;
+ case 3:
+ buttonsPixmap->DrawRectangle(cRect(x, fontHeight + marginButtonColor, buttonWidth, buttonColorHeight), Theme.Color(clrButtonBlue));
+ break;
+ }
+
DecorBorderDraw(x + Config.decorBorderButtonSize, buttonsTop, buttonWidth, buttonsHeight, Config.decorBorderButtonSize, Config.decorBorderButtonType,
Config.decorBorderButtonFg, Config.decorBorderButtonBg, BorderButton);
buttonsDrawn = true;
@@ -572,7 +600,22 @@ void cFlatBaseRender::ButtonsSet(const char *Red, const char *Green, const char
x += buttonWidth + marginItem + Config.decorBorderButtonSize*2;
if( !(!Config.ButtonsShowEmpty && !Yellow) ) {
buttonsPixmap->DrawText(cPoint(x, 0), Yellow, Theme.Color(clrButtonFont), Theme.Color(clrButtonBg), font, buttonWidth, fontHeight + marginButtonColor, taCenter);
- buttonsPixmap->DrawRectangle(cRect(x, fontHeight + marginButtonColor, buttonWidth, buttonColorHeight), Theme.Color(clrButtonYellow));
+
+ switch( Setup.ColorKey2 ) {
+ case 0:
+ buttonsPixmap->DrawRectangle(cRect(x, fontHeight + marginButtonColor, buttonWidth, buttonColorHeight), Theme.Color(clrButtonRed));
+ break;
+ case 1:
+ buttonsPixmap->DrawRectangle(cRect(x, fontHeight + marginButtonColor, buttonWidth, buttonColorHeight), Theme.Color(clrButtonGreen));
+ break;
+ case 2:
+ buttonsPixmap->DrawRectangle(cRect(x, fontHeight + marginButtonColor, buttonWidth, buttonColorHeight), Theme.Color(clrButtonYellow));
+ break;
+ case 3:
+ buttonsPixmap->DrawRectangle(cRect(x, fontHeight + marginButtonColor, buttonWidth, buttonColorHeight), Theme.Color(clrButtonBlue));
+ break;
+ }
+
DecorBorderDraw(x + Config.decorBorderButtonSize, buttonsTop, buttonWidth, buttonsHeight, Config.decorBorderButtonSize, Config.decorBorderButtonType,
Config.decorBorderButtonFg, Config.decorBorderButtonBg, BorderButton);
buttonsDrawn = true;
@@ -583,7 +626,22 @@ void cFlatBaseRender::ButtonsSet(const char *Red, const char *Green, const char
buttonWidth += buttonsWidth - (x + buttonWidth + Config.decorBorderButtonSize*2);
if( !(!Config.ButtonsShowEmpty && !Blue) ) {
buttonsPixmap->DrawText(cPoint(x, 0), Blue, Theme.Color(clrButtonFont), Theme.Color(clrButtonBg), font, buttonWidth, fontHeight + marginButtonColor, taCenter);
- buttonsPixmap->DrawRectangle(cRect(x, fontHeight + marginButtonColor, buttonWidth, buttonColorHeight), Theme.Color(clrButtonBlue));
+
+ switch( Setup.ColorKey3 ) {
+ case 0:
+ buttonsPixmap->DrawRectangle(cRect(x, fontHeight + marginButtonColor, buttonWidth, buttonColorHeight), Theme.Color(clrButtonRed));
+ break;
+ case 1:
+ buttonsPixmap->DrawRectangle(cRect(x, fontHeight + marginButtonColor, buttonWidth, buttonColorHeight), Theme.Color(clrButtonGreen));
+ break;
+ case 2:
+ buttonsPixmap->DrawRectangle(cRect(x, fontHeight + marginButtonColor, buttonWidth, buttonColorHeight), Theme.Color(clrButtonYellow));
+ break;
+ case 3:
+ buttonsPixmap->DrawRectangle(cRect(x, fontHeight + marginButtonColor, buttonWidth, buttonColorHeight), Theme.Color(clrButtonBlue));
+ break;
+ }
+
DecorBorderDraw(x + Config.decorBorderButtonSize, buttonsTop, buttonWidth, buttonsHeight, Config.decorBorderButtonSize, Config.decorBorderButtonType,
Config.decorBorderButtonFg, Config.decorBorderButtonBg, BorderButton);
buttonsDrawn = true;