diff options
author | louis <louis.braun@gmx.de> | 2013-09-13 17:10:58 +0200 |
---|---|---|
committer | louis <louis.braun@gmx.de> | 2013-09-13 17:10:58 +0200 |
commit | 5dbc46aaba992f429c05601a3f97e3d5e7a98d87 (patch) | |
tree | e2e62d13e92a35f481f5d50a46616f291966f977 | |
parent | 337cc43e400a06e66292943a0da038fa79f8c165 (diff) | |
download | skin-nopacity-5dbc46aaba992f429c05601a3f97e3d5e7a98d87.tar.gz skin-nopacity-5dbc46aaba992f429c05601a3f97e3d5e7a98d87.tar.bz2 |
introduced dedicated theme font colors for different message types and different buttons (closes Feature 1462)
-rw-r--r-- | HISTORY | 5 | ||||
-rw-r--r-- | displaymenu.c | 8 | ||||
-rw-r--r-- | displaymenuview.c | 4 | ||||
-rw-r--r-- | displaymenuview.h | 2 | ||||
-rw-r--r-- | displaymessage.c | 7 | ||||
-rw-r--r-- | nopacity.c | 11 |
6 files changed, 25 insertions, 12 deletions
@@ -256,4 +256,7 @@ Version 0.1.4 to allow theme dependend channel logos - if no channel logo is found for channel name, the ChannelID is used to allow logos for (feed) channels with changing names. Analog to the channel name - the ChannelID is also converted to lower case letters. + the ChannelID is also converted to lower case letters. +- added exemplarily setup options for SD and HDReady +- introduced dedicated theme font colors for different message types and + different buttons (closes Feature 1462) diff --git a/displaymenu.c b/displaymenu.c index f270647..2fe33ef 100644 --- a/displaymenu.c +++ b/displaymenu.c @@ -363,22 +363,22 @@ void cNopacityDisplayMenu::SetButtonPositions(void) { void cNopacityDisplayMenu::SetButtons(const char *Red, const char *Green, const char *Yellow, const char *Blue) { if (Red) { - menuView->DrawButton(Red, handleButtons[0], Theme.Color(clrButtonRed), Theme.Color(clrButtonRedBorder), positionButtons[0]); + menuView->DrawButton(Red, handleButtons[0], Theme.Color(clrButtonRed), Theme.Color(clrButtonRedBorder), Theme.Color(clrButtonRedFont), positionButtons[0]); } else menuView->ClearButton(positionButtons[0]); if (Green) { - menuView->DrawButton(Green, handleButtons[1],Theme.Color(clrButtonGreen), Theme.Color(clrButtonGreenBorder), positionButtons[1]); + menuView->DrawButton(Green, handleButtons[1],Theme.Color(clrButtonGreen), Theme.Color(clrButtonGreenBorder), Theme.Color(clrButtonGreenFont), positionButtons[1]); } else menuView->ClearButton(positionButtons[1]); if (Yellow) { - menuView->DrawButton(Yellow, handleButtons[2], Theme.Color(clrButtonYellow), Theme.Color(clrButtonYellowBorder), positionButtons[2]); + menuView->DrawButton(Yellow, handleButtons[2], Theme.Color(clrButtonYellow), Theme.Color(clrButtonYellowBorder), Theme.Color(clrButtonYellowFont), positionButtons[2]); } else menuView->ClearButton(positionButtons[2]); if (Blue) { - menuView->DrawButton(Blue, handleButtons[3], Theme.Color(clrButtonBlue), Theme.Color(clrButtonBlueBorder), positionButtons[3]); + menuView->DrawButton(Blue, handleButtons[3], Theme.Color(clrButtonBlue), Theme.Color(clrButtonBlueBorder), Theme.Color(clrButtonBlueFont), positionButtons[3]); } else menuView->ClearButton(positionButtons[3]); } diff --git a/displaymenuview.c b/displaymenuview.c index 86fd1f0..e95b21a 100644 --- a/displaymenuview.c +++ b/displaymenuview.c @@ -694,7 +694,7 @@ void cNopacityDisplayMenuView::ShowDiskUsage(bool show) { } } -void cNopacityDisplayMenuView::DrawButton(const char *text, int handleImage, tColor buttonColor, tColor borderColor, int num) { +void cNopacityDisplayMenuView::DrawButton(const char *text, int handleImage, tColor buttonColor, tColor borderColor, tColor fontColor, int num) { if (num < 0) return; int top = 2*buttonsBorder; @@ -725,7 +725,7 @@ void cNopacityDisplayMenuView::DrawButton(const char *text, int handleImage, tCo int textWidth = fontButtons->Width(text); int textHeight = fontButtons->Height(); tColor clrFontBack = (config.doBlending)?(clrTransparent):buttonColor; - pixmapFooter->DrawText(cPoint(left + (buttonWidth-textWidth)/2, top + (buttonHeight-textHeight)/2), text, Theme.Color(clrMenuFontButton), clrFontBack, fontButtons); + pixmapFooter->DrawText(cPoint(left + (buttonWidth-textWidth)/2, top + (buttonHeight-textHeight)/2), text, fontColor, clrFontBack, fontButtons); } void cNopacityDisplayMenuView::ClearButton(int num) { diff --git a/displaymenuview.h b/displaymenuview.h index a9c10b5..e2c2bfb 100644 --- a/displaymenuview.h +++ b/displaymenuview.h @@ -109,7 +109,7 @@ class cNopacityDisplayMenuView { void DrawDate(bool initial); void DrawDiskUsage(void); void ShowDiskUsage(bool show); - void DrawButton(const char *text, int handleImage, tColor buttonColor, tColor borderColor, int num); + void DrawButton(const char *text, int handleImage, tColor buttonColor, tColor borderColor, tColor fontColor, int num); void ClearButton(int num); int GetTimersInitHeight(void); int GetTimersMaxHeight(void); diff --git a/displaymessage.c b/displaymessage.c index 3ee1765..e44e5a0 100644 --- a/displaymessage.c +++ b/displaymessage.c @@ -30,18 +30,23 @@ cNopacityDisplayMessage::~cNopacityDisplayMessage() { void cNopacityDisplayMessage::SetMessage(eMessageType Type, const char *Text) { tColor col = Theme.Color(clrMessageStatus); + tColor colFont = Theme.Color(clrMessageFontStatus); switch (Type) { case mtStatus: col = Theme.Color(clrMessageStatus); + colFont = Theme.Color(clrMessageFontStatus); break; case mtInfo: col = Theme.Color(clrMessageInfo); + colFont = Theme.Color(clrMessageFontInfo); break; case mtWarning: col = Theme.Color(clrMessageWarning); + colFont = Theme.Color(clrMessageFontWarning); break; case mtError: col = Theme.Color(clrMessageError); + colFont = Theme.Color(clrMessageFontError); break; } pixmapBackground->Fill(clrBlack); @@ -52,7 +57,7 @@ void cNopacityDisplayMessage::SetMessage(eMessageType Type, const char *Text) { pixmap->DrawImage(cPoint(1, 1), imgLoader.GetImage()); } int textWidth = font->Width(Text); - pixmap->DrawText(cPoint((width - textWidth) / 2, (height - font->Height()) / 2), Text, Theme.Color(clrMessageFont), (config.doBlending)?clrTransparent:col, font); + pixmap->DrawText(cPoint((width - textWidth) / 2, (height - font->Height()) / 2), Text, colFont, (config.doBlending)?clrTransparent:col, font); if (config.messageFadeTime) Start(); } @@ -107,7 +107,6 @@ THEME_CLR(Theme, clrDiskAlert, CLR_DISKALERT); THEME_CLR(Theme, clrMenuFontHeader, CLR_WHITE); THEME_CLR(Theme, clrMenuFontDate, CLR_WHITE); THEME_CLR(Theme, clrMenuFontDiscUsage, CLR_WHITE); -THEME_CLR(Theme, clrMenuFontButton, CLR_WHITE); THEME_CLR(Theme, clrMenuFontTimers, CLR_WHITE); THEME_CLR(Theme, clrMenuFontTimersHeader, CLR_WHITE); THEME_CLR(Theme, clrMenuFontMessages, CLR_WHITE); @@ -120,18 +119,24 @@ THEME_CLR(Theme, clrMenuFontMenuItemTitle, CLR_BRIGHTBLUE); THEME_CLR(Theme, clrMenuFontMenuItemSep, CLR_GRAY); THEME_CLR(Theme, clrMenuHeader, CLR_MENUHEADER); THEME_CLR(Theme, clrMenuHeaderBlend, CLR_MENUHEADERBLEND); - //BUTTONS THEME_CLR(Theme, clrButtonRed, CLR_BUTTONRED); THEME_CLR(Theme, clrButtonRedBorder, CLR_BUTTONREDBORDER); +THEME_CLR(Theme, clrButtonRedFont, CLR_WHITE); THEME_CLR(Theme, clrButtonGreen, CLR_BUTTONGREEN); THEME_CLR(Theme, clrButtonGreenBorder, CLR_BUTTONGREENBORDER); +THEME_CLR(Theme, clrButtonGreenFont, CLR_WHITE); THEME_CLR(Theme, clrButtonYellow, CLR_BUTTONYELLOW); THEME_CLR(Theme, clrButtonYellowBorder, CLR_BUTTONYELLOWBORDER); +THEME_CLR(Theme, clrButtonYellowFont, CLR_WHITE); THEME_CLR(Theme, clrButtonBlue, CLR_BUTTONBLUE); THEME_CLR(Theme, clrButtonBlueBorder, CLR_BUTTONBLUEBORDER); +THEME_CLR(Theme, clrButtonBlueFont, CLR_WHITE); //MESSAGES -THEME_CLR(Theme, clrMessageFont, CLR_WHITE); +THEME_CLR(Theme, clrMessageFontStatus, CLR_WHITE); +THEME_CLR(Theme, clrMessageFontInfo, CLR_WHITE); +THEME_CLR(Theme, clrMessageFontWarning, CLR_WHITE); +THEME_CLR(Theme, clrMessageFontError, CLR_WHITE); THEME_CLR(Theme, clrMessageStatus, CLR_MESSAGESTATUS); THEME_CLR(Theme, clrMessageInfo, CLR_MESSAGEINFO); THEME_CLR(Theme, clrMessageWarning, CLR_MESSAGEWARNING); |