From fd6ad52c8c39eff7fe4558a5fcf902e137e802b6 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Wed, 17 Jun 2015 21:36:43 +0200 Subject: [PATCH] - infoviewer_bb: add own color for CA-bar --- data/locale/deutsch.locale | 1 + data/locale/english.locale | 1 + src/gui/color.h | 5 +++++ src/gui/infoviewer_bb.cpp | 8 ++++---- src/gui/osd_setup.cpp | 6 ++++++ src/gui/themes.cpp | 8 ++++++++ src/system/locals.h | 1 + src/system/locals_intern.h | 1 + src/system/setting_helpers.cpp | 4 ++++ src/system/settings.h | 5 +++++ 10 files changed, 36 insertions(+), 4 deletions(-) diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index 0e64321c2..401cd83f6 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -1002,6 +1002,7 @@ menu.hint_inet_radio Internetradio menu.hint_info Informationen über das Image, CPU, Arbeitsspeicher und Stream und mehr menu.hint_infobar_back Ändern Sie die Hintergrundfarbe für die Infobar menu.hint_infobar_casys ein: zeigt alle Aktiven farbig, Mini: einzelnes Symbol ob gespeert, Diskret: alle Aktiven CA-Systeme +menu.hint_infobar_casys_color Ändern Sie die Hintergrundfarbe für die CA-Systemanzeige der Infobar menu.hint_infobar_casys_dotmatrix ein: CA-Systemanzeige mit Punktematrix im Hintergrund menu.hint_infobar_casys_frame ein: CA-Systemanzeige mit Rahmen menu.hint_infobar_dd Zeigt ein Dolby Digital Icon bei Verfügbarkeit diff --git a/data/locale/english.locale b/data/locale/english.locale index 90659566a..8ea15b434 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -1004,6 +1004,7 @@ menu.hint_inet_radio Internet radio menu.hint_info Information about image, box cpu and storage,\nstream information menu.hint_infobar_back Change infobar background color menu.hint_infobar_casys On: display all with colored active, mini: single\nlocked icon, descreet: all active ca-sys +menu.hint_infobar_casys_color Change CA-System background color menu.hint_infobar_casys_dotmatrix on: CA-System with dot matrix in background menu.hint_infobar_casys_frame on: CA-System with frame menu.hint_infobar_dd Show DD icon diff --git a/src/gui/color.h b/src/gui/color.h index a9a45313d..5634a1e8e 100644 --- a/src/gui/color.h +++ b/src/gui/color.h @@ -37,6 +37,7 @@ #define COL_MAXFREE 254-8*12 - 1 #define COL_NEUTRINO_TEXT 254-8*12 // 24 values +#define COL_INFOBAR_CASYSTEM 254-8*10 #define COL_COLORED_EVENTS_CHANNELLIST 254-8*9 #define COL_COLORED_EVENTS_INFOBAR 254-8*8 #define COL_INFOBAR_SHADOW 254-8*7 @@ -56,6 +57,8 @@ #define COL_INFOBAR_PLUS_1 (COL_INFOBAR + 1) #define COL_INFOBAR_PLUS_3 (COL_INFOBAR + 3) #define COL_INFOBAR_PLUS_7 (COL_INFOBAR + 7) +#define COL_INFOBAR_CASYSTEM_PLUS_0 (COL_INFOBAR_CASYSTEM + 0) +#define COL_INFOBAR_CASYSTEM_PLUS_2 (COL_INFOBAR_CASYSTEM + 2) #define COL_MENUHEAD_PLUS_0 (COL_MENUHEAD + 0) #define COL_MENUCONTENT_PLUS_0 (COL_MENUCONTENT + 0) #define COL_MENUCONTENT_PLUS_1 (COL_MENUCONTENT + 1) @@ -78,6 +81,8 @@ #define COL_INFOBAR_PLUS_1 (CFrameBuffer::getInstance()->realcolor[(COL_INFOBAR + 1)]) #define COL_INFOBAR_PLUS_3 (CFrameBuffer::getInstance()->realcolor[(COL_INFOBAR + 3)]) #define COL_INFOBAR_PLUS_7 (CFrameBuffer::getInstance()->realcolor[(COL_INFOBAR + 7)]) +#define COL_INFOBAR_CASYSTEM_PLUS_0 (CFrameBuffer::getInstance()->realcolor[(COL_INFOBAR_CASYSTEM + 0)]) +#define COL_INFOBAR_CASYSTEM_PLUS_2 (CFrameBuffer::getInstance()->realcolor[(COL_INFOBAR_CASYSTEM + 2)]) #define COL_MENUHEAD_PLUS_0 (CFrameBuffer::getInstance()->realcolor[(COL_MENUHEAD + 0)]) #define COL_MENUCONTENT_PLUS_0 (CFrameBuffer::getInstance()->realcolor[(COL_MENUCONTENT + 0)]) #define COL_MENUCONTENT_PLUS_1 (CFrameBuffer::getInstance()->realcolor[(COL_MENUCONTENT + 1)]) diff --git a/src/gui/infoviewer_bb.cpp b/src/gui/infoviewer_bb.cpp index c45f80551..378302f4e 100644 --- a/src/gui/infoviewer_bb.cpp +++ b/src/gui/infoviewer_bb.cpp @@ -831,15 +831,15 @@ void CInfoViewerBB::paintCA_bar(int left, int right) // shadow frameBuffer->paintBox(g_InfoViewer->ChanInfoX + 14, g_InfoViewer->BoxEndY + 4, g_InfoViewer->BoxEndX - 6 , g_InfoViewer->BoxEndY + bottom_bar_offset - 6 , COL_INFOBAR_SHADOW_PLUS_0 , RADIUS_SMALL, CORNER_ALL); // ca bar - frameBuffer->paintBox(g_InfoViewer->ChanInfoX + 11, g_InfoViewer->BoxEndY + 1, g_InfoViewer->BoxEndX - 11, g_InfoViewer->BoxEndY + bottom_bar_offset - 11, COL_INFOBAR_PLUS_0 , RADIUS_SMALL, CORNER_ALL); + frameBuffer->paintBox(g_InfoViewer->ChanInfoX + 11, g_InfoViewer->BoxEndY + 1, g_InfoViewer->BoxEndX - 11, g_InfoViewer->BoxEndY + bottom_bar_offset - 11, COL_INFOBAR_CASYSTEM_PLUS_0, RADIUS_SMALL, CORNER_ALL); // highlighed frame - frameBuffer->paintBoxFrame(g_InfoViewer->ChanInfoX + 10, g_InfoViewer->BoxEndY, g_InfoViewer->BoxEndX - g_InfoViewer->ChanInfoX - 2*10, bottom_bar_offset - 10, 1, COL_INFOBAR_PLUS_3, RADIUS_SMALL, CORNER_ALL); + frameBuffer->paintBoxFrame(g_InfoViewer->ChanInfoX + 10, g_InfoViewer->BoxEndY, g_InfoViewer->BoxEndX - g_InfoViewer->ChanInfoX - 2*10, bottom_bar_offset - 10, 1, COL_INFOBAR_CASYSTEM_PLUS_2, RADIUS_SMALL, CORNER_ALL); } else - frameBuffer->paintBox(g_InfoViewer->ChanInfoX + 12 + (right*4), g_InfoViewer->BoxEndY + 2, g_InfoViewer->BoxEndX - 12 - (left*4), g_InfoViewer->BoxEndY + bottom_bar_offset - 12, COL_INFOBAR_PLUS_0); + frameBuffer->paintBox(g_InfoViewer->ChanInfoX + 12 + (right*4), g_InfoViewer->BoxEndY + 2, g_InfoViewer->BoxEndX - 12 - (left*4), g_InfoViewer->BoxEndY + bottom_bar_offset - 12, COL_INFOBAR_CASYSTEM_PLUS_0); } else - frameBuffer->paintBox(g_InfoViewer->ChanInfoX + (right*4), g_InfoViewer->BoxEndY, g_InfoViewer->BoxEndX - (left*4), g_InfoViewer->BoxEndY + bottom_bar_offset, COL_BLACK); + frameBuffer->paintBox(g_InfoViewer->ChanInfoX + (right*4), g_InfoViewer->BoxEndY, g_InfoViewer->BoxEndX - (left*4), g_InfoViewer->BoxEndY + bottom_bar_offset, COL_INFOBAR_CASYSTEM_PLUS_0); if (!g_settings.casystem_dotmatrix) //don't show dotmatrix return; diff --git a/src/gui/osd_setup.cpp b/src/gui/osd_setup.cpp index 6d7b1c514..8faf2eae7 100644 --- a/src/gui/osd_setup.cpp +++ b/src/gui/osd_setup.cpp @@ -736,6 +736,8 @@ void COsdSetup::showOsdMenueColorSetup(CMenuWidget *menu_colors) &t.infobar_green, &t.infobar_blue, &t.infobar_alpha, colorSetupNotifier); CColorChooser* chInfobarTextcolor = new CColorChooser(LOCALE_COLORMENU_TEXTCOLOR, &t.infobar_Text_red, &t.infobar_Text_green, &t.infobar_Text_blue, NULL, colorSetupNotifier); + CColorChooser* chInfobarCASystem = new CColorChooser(LOCALE_COLORMENU_BACKGROUND, &t.infobar_casystem_red, + &t.infobar_casystem_green, &t.infobar_casystem_blue, &t.infobar_casystem_alpha, colorSetupNotifier); menu_colors->addItem( new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_COLORSTATUSBAR_TEXT)); mf = new CMenuDForwarder(LOCALE_COLORMENU_BACKGROUND, true, NULL, chInfobarcolor ); @@ -746,6 +748,10 @@ void COsdSetup::showOsdMenueColorSetup(CMenuWidget *menu_colors) mf->setHint("", LOCALE_MENU_HINT_INFOBAR_TEXTCOLOR); menu_colors->addItem(mf); + mf = new CMenuDForwarder(LOCALE_MISCSETTINGS_INFOBAR_CASYSTEM_DISPLAY, g_settings.casystem_display < 2, NULL, chInfobarCASystem ); + mf->setHint("", LOCALE_MENU_HINT_INFOBAR_CASYS_COLOR); + menu_colors->addItem(mf); + // infoviewer gradient top oj = new CMenuOptionChooser(LOCALE_MISCSETTINGS_INFOBAR_GRADIENT_TOP, &t.infobar_gradient_top, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); oj->setHint("", LOCALE_MENU_HINT_COLOR_GRADIENT); diff --git a/src/gui/themes.cpp b/src/gui/themes.cpp index f8e4d5860..996b522e1 100644 --- a/src/gui/themes.cpp +++ b/src/gui/themes.cpp @@ -273,6 +273,10 @@ void CThemes::setTheme(CConfigFile &configfile) configfile.setInt32( "infobar_red", t.infobar_red ); configfile.setInt32( "infobar_green", t.infobar_green ); configfile.setInt32( "infobar_blue", t.infobar_blue ); + configfile.setInt32( "infobar_casystem_alpha", t.infobar_casystem_alpha ); + configfile.setInt32( "infobar_casystem_red", t.infobar_casystem_red ); + configfile.setInt32( "infobar_casystem_green", t.infobar_casystem_green ); + configfile.setInt32( "infobar_casystem_blue", t.infobar_casystem_blue ); configfile.setInt32( "infobar_gradient_top", t.infobar_gradient_top ); configfile.setInt32( "infobar_gradient_bottom", t.infobar_gradient_bottom ); configfile.setInt32( "infobar_Text_alpha", t.infobar_Text_alpha ); @@ -334,6 +338,10 @@ void CThemes::getTheme(CConfigFile &configfile) t.infobar_red = configfile.getInt32( "infobar_red", 0x00 ); t.infobar_green = configfile.getInt32( "infobar_green", 0x0e ); t.infobar_blue = configfile.getInt32( "infobar_blue", 0x23 ); + t.infobar_casystem_alpha = configfile.getInt32( "infobar_casystem_alpha", 0x08 ); + t.infobar_casystem_red = configfile.getInt32( "infobar_casystem_red", 0x00 ); + t.infobar_casystem_green = configfile.getInt32( "infobar_casystem_green", 0x00 ); + t.infobar_casystem_blue = configfile.getInt32( "infobar_casystem_blue", 0x00 ); t.infobar_gradient_top = configfile.getInt32( "infobar_gradient_top", 0 ); t.infobar_gradient_bottom = configfile.getInt32( "infobar_gradient_bottom", 0 ); t.infobar_Text_alpha = configfile.getInt32( "infobar_Text_alpha", 0x00 ); diff --git a/src/system/locals.h b/src/system/locals.h index c9442bc76..d6b8ecce2 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -1031,6 +1031,7 @@ typedef enum LOCALE_MENU_HINT_INFO, LOCALE_MENU_HINT_INFOBAR_BACK, LOCALE_MENU_HINT_INFOBAR_CASYS, + LOCALE_MENU_HINT_INFOBAR_CASYS_COLOR, LOCALE_MENU_HINT_INFOBAR_CASYS_DOTMATRIX, LOCALE_MENU_HINT_INFOBAR_CASYS_FRAME, LOCALE_MENU_HINT_INFOBAR_DD, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index e018ee172..dd11a1553 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -1031,6 +1031,7 @@ const char * locale_real_names[] = "menu.hint_info", "menu.hint_infobar_back", "menu.hint_infobar_casys", + "menu.hint_infobar_casys_color", "menu.hint_infobar_casys_dotmatrix", "menu.hint_infobar_casys_frame", "menu.hint_infobar_dd", diff --git a/src/system/setting_helpers.cpp b/src/system/setting_helpers.cpp index f30b2a865..3c7c569b9 100644 --- a/src/system/setting_helpers.cpp +++ b/src/system/setting_helpers.cpp @@ -178,6 +178,10 @@ void CColorSetupNotifier::setPalette() convertSetupColor2RGB(t.infobar_Text_red, t.infobar_Text_green, t.infobar_Text_blue), 8, convertSetupAlpha2Alpha(t.infobar_alpha) ); + frameBuffer->paletteGenFade(COL_INFOBAR_CASYSTEM, + convertSetupColor2RGB(t.infobar_casystem_red, t.infobar_casystem_green, t.infobar_casystem_blue), + convertSetupColor2RGB(t.infobar_Text_red, t.infobar_Text_green, t.infobar_Text_blue), + 8, convertSetupAlpha2Alpha(t.infobar_casystem_alpha) ); frameBuffer->paletteGenFade(COL_COLORED_EVENTS_INFOBAR, convertSetupColor2RGB(t.infobar_red, t.infobar_green, t.infobar_blue), diff --git a/src/system/settings.h b/src/system/settings.h index c5ce5bf31..52d737f29 100644 --- a/src/system/settings.h +++ b/src/system/settings.h @@ -99,6 +99,11 @@ struct SNeutrinoTheme unsigned char infobar_green; unsigned char infobar_blue; + unsigned char infobar_casystem_alpha; + unsigned char infobar_casystem_red; + unsigned char infobar_casystem_green; + unsigned char infobar_casystem_blue; + unsigned char infobar_Text_alpha; unsigned char infobar_Text_red; unsigned char infobar_Text_green;