diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index 43faae310..9de257a35 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -266,6 +266,7 @@ colorchooser.blue blau colorchooser.green grün colorchooser.red rot colormenu.background Hintergrundfarbe +colormenu.clock_textcolor Ziffernfarbe colormenu.contrast_fonts Schriftkontrast colormenu.fade Ein-/Ausblenden colormenu.font Neutrino-HD Schriftart @@ -817,6 +818,7 @@ menu.hint_clock_background Lassen Sie die Uhr mit Hintergrund anzeigen menu.hint_clock_mode Schalten Sie die Uhr ein oder aus menu.hint_clock_seconds Legen Sie fest, ob die Sekunden angezeigt werden sollen menu.hint_clock_size Stellen Sie die Größe der Uhr ein +menu.hint_clock_textcolor Konfigurieren Sie die Farbe der Ziffern menu.hint_colors Konfigurieren Sie die Menü-Farben menu.hint_content_back Ändern Sie die Hintergrundfarbe für den Fensterinhalt menu.hint_content_textcolor Ändern Sie die Textfarbe für den Fensterinhalt diff --git a/data/locale/english.locale b/data/locale/english.locale index 6ce26354e..c594c67e0 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -266,6 +266,7 @@ colorchooser.blue blue colorchooser.green green colorchooser.red red colormenu.background Background +colormenu.clock_textcolor Digit color colormenu.contrast_fonts Contrast fonts colormenu.fade Fade GUI colormenu.font Select GUI font @@ -817,6 +818,7 @@ menu.hint_clock_background Show clock with theme's background color menu.hint_clock_mode Switch clock on or off menu.hint_clock_seconds Show time format with seconds menu.hint_clock_size Set the size of the info clock +menu.hint_clock_textcolor Configure digit colors menu.hint_colors Configure GUI colors menu.hint_content_back Change GUI window background color menu.hint_content_textcolor Change GUI window text color diff --git a/src/gui/color.h b/src/gui/color.h index 8e6a2e75c..f25513b9b 100644 --- a/src/gui/color.h +++ b/src/gui/color.h @@ -110,6 +110,7 @@ #define COL_MENUCONTENTSELECTED_TEXT_PLUS_1 (CFrameBuffer::getInstance()->realcolor[(COL_NEUTRINO_TEXT + 12)]) #define COL_MENUCONTENTSELECTED_TEXT_PLUS_2 (CFrameBuffer::getInstance()->realcolor[(COL_NEUTRINO_TEXT + 13)]) #define COL_MENUCONTENTINACTIVE_TEXT (CFrameBuffer::getInstance()->realcolor[(COL_NEUTRINO_TEXT + 14)]) +#define COL_INFOCLOCK_TEXT (CFrameBuffer::getInstance()->realcolor[(COL_NEUTRINO_TEXT + 15)]) #endif diff --git a/src/gui/infoclock.cpp b/src/gui/infoclock.cpp index 5ccf65f4f..f9a08f8ad 100644 --- a/src/gui/infoclock.cpp +++ b/src/gui/infoclock.cpp @@ -65,6 +65,12 @@ void CInfoClock::Init() //use current theme colors syncSysColors(); + //set text color + if (g_settings.infoClockBackground) + setTextColor(COL_MENUCONTENT_TEXT); + else + setTextColor(COL_INFOCLOCK_TEXT); + paint_bg = g_settings.infoClockBackground; if (g_settings.infoClockSeconds) diff --git a/src/gui/osd_setup.cpp b/src/gui/osd_setup.cpp index d0382a1b8..f93d50f3b 100644 --- a/src/gui/osd_setup.cpp +++ b/src/gui/osd_setup.cpp @@ -71,6 +71,7 @@ COsdSetup::COsdSetup(bool wizard_mode) frameBuffer = CFrameBuffer::getInstance(); colorSetupNotifier = new CColorSetupNotifier(); fontsizenotifier = new CFontSizeNotifier; + colorInfoclockNotifier = NULL; osd_menu = NULL; submenu_menus = NULL; mfFontFile = NULL; @@ -611,6 +612,7 @@ int COsdSetup::showOsdSetup() } } + delete colorInfoclockNotifier; delete osd_menu; return res; } @@ -1022,10 +1024,20 @@ void COsdSetup::showOsdInfoclockSetup(CMenuWidget *menu_infoclock) mc->setHint("", LOCALE_MENU_HINT_CLOCK_SECONDS); menu_infoclock->addItem(mc); + colorInfoclockNotifier = new COnOffNotifier(1); + // clock with background - mc = new CMenuOptionChooser(LOCALE_CLOCK_BACKGROUND, &g_settings.infoClockBackground, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); + mc = new CMenuOptionChooser(LOCALE_CLOCK_BACKGROUND, &g_settings.infoClockBackground, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, colorInfoclockNotifier); mc->setHint("", LOCALE_MENU_HINT_CLOCK_BACKGROUND); menu_infoclock->addItem(mc); + + // digit color + CColorChooser* cc = new CColorChooser(LOCALE_COLORMENU_CLOCK_TEXTCOLOR, &g_settings.clock_Digit_red, &g_settings.clock_Digit_green, &g_settings.clock_Digit_blue, + NULL, colorSetupNotifier); + CMenuDForwarder* mf = new CMenuDForwarder(LOCALE_COLORMENU_CLOCK_TEXTCOLOR, !g_settings.infoClockBackground, NULL, cc); + mf->setHint("", LOCALE_MENU_HINT_CLOCK_TEXTCOLOR); + menu_infoclock->addItem(mf); + colorInfoclockNotifier->addItem(mf); } bool COsdSetup::changeNotify(const neutrino_locale_t OptionName, void * data) diff --git a/src/gui/osd_setup.h b/src/gui/osd_setup.h index 2d30c064e..be227c04e 100644 --- a/src/gui/osd_setup.h +++ b/src/gui/osd_setup.h @@ -53,6 +53,7 @@ class COsdSetup : public CMenuTarget, public CChangeObserver char window_size_value[10]; std::string osdFontFile, osdTtxFontFile; CComponentsShapeSquare *win_demo; + COnOffNotifier* colorInfoclockNotifier; int width; bool is_wizard; diff --git a/src/neutrino.cpp b/src/neutrino.cpp index f06b864a7..30f3db7ef 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -458,6 +458,11 @@ int CNeutrinoApp::loadSetup(const char * fname) g_settings.widget_fade = configfile.getBool("widget_fade" , false ); //colors (neutrino defaultcolors) + g_settings.clock_Digit_alpha = configfile.getInt32( "clock_Digit_alpha", 0x00 ); + g_settings.clock_Digit_red = configfile.getInt32( "clock_Digit_red", 0x64 ); + g_settings.clock_Digit_green = configfile.getInt32( "clock_Digit_green", 0x64 ); + g_settings.clock_Digit_blue = configfile.getInt32( "clock_Digit_blue", 0x64 ); + g_settings.menu_Head_alpha = configfile.getInt32( "menu_Head_alpha", 0x00 ); g_settings.menu_Head_red = configfile.getInt32( "menu_Head_red", 0x00 ); g_settings.menu_Head_green = configfile.getInt32( "menu_Head_green", 0x0A ); @@ -958,6 +963,11 @@ void CNeutrinoApp::saveSetup(const char * fname) configfile.setBool("widget_fade" , g_settings.widget_fade ); //colors + configfile.setInt32( "clock_Digit_alpha", g_settings.clock_Digit_alpha ); + configfile.setInt32( "clock_Digit_red", g_settings.clock_Digit_red ); + configfile.setInt32( "clock_Digit_green", g_settings.clock_Digit_green ); + configfile.setInt32( "clock_Digit_blue", g_settings.clock_Digit_blue ); + configfile.setInt32( "menu_Head_alpha", g_settings.menu_Head_alpha ); configfile.setInt32( "menu_Head_red", g_settings.menu_Head_red ); configfile.setInt32( "menu_Head_green", g_settings.menu_Head_green ); diff --git a/src/system/locals.h b/src/system/locals.h index 030ccaa16..8f34619b7 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -293,6 +293,7 @@ typedef enum LOCALE_COLORCHOOSER_GREEN, LOCALE_COLORCHOOSER_RED, LOCALE_COLORMENU_BACKGROUND, + LOCALE_COLORMENU_CLOCK_TEXTCOLOR, LOCALE_COLORMENU_CONTRAST_FONTS, LOCALE_COLORMENU_FADE, LOCALE_COLORMENU_FONT, @@ -844,6 +845,7 @@ typedef enum LOCALE_MENU_HINT_CLOCK_MODE, LOCALE_MENU_HINT_CLOCK_SECONDS, LOCALE_MENU_HINT_CLOCK_SIZE, + LOCALE_MENU_HINT_CLOCK_TEXTCOLOR, LOCALE_MENU_HINT_COLORS, LOCALE_MENU_HINT_CONTENT_BACK, LOCALE_MENU_HINT_CONTENT_TEXTCOLOR, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index 08ea33855..7cb9cf529 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -293,6 +293,7 @@ const char * locale_real_names[] = "colorchooser.green", "colorchooser.red", "colormenu.background", + "colormenu.clock_textcolor", "colormenu.contrast_fonts", "colormenu.fade", "colormenu.font", @@ -844,6 +845,7 @@ const char * locale_real_names[] = "menu.hint_clock_mode", "menu.hint_clock_seconds", "menu.hint_clock_size", + "menu.hint_clock_textcolor", "menu.hint_colors", "menu.hint_content_back", "menu.hint_content_textcolor", diff --git a/src/system/setting_helpers.cpp b/src/system/setting_helpers.cpp index e029f6361..8ffd94536 100644 --- a/src/system/setting_helpers.cpp +++ b/src/system/setting_helpers.cpp @@ -254,6 +254,11 @@ void CColorSetupNotifier::setPalette() convertSetupColor2RGB(g_settings.menu_Content_inactive_Text_red, g_settings.menu_Content_inactive_Text_green, g_settings.menu_Content_inactive_Text_blue), convertSetupAlpha2Alpha(g_settings.menu_Content_inactive_alpha)); + // COL_INFOCLOCK_TEXT + frameBuffer->paletteSetColor(COL_NEUTRINO_TEXT + 15, + convertSetupColor2RGB(g_settings.clock_Digit_red, g_settings.clock_Digit_green, g_settings.clock_Digit_blue), + convertSetupAlpha2Alpha(g_settings.clock_Digit_alpha)); + frameBuffer->paletteSet(); } diff --git a/src/system/settings.h b/src/system/settings.h index 5944379f8..6c9859e84 100644 --- a/src/system/settings.h +++ b/src/system/settings.h @@ -262,6 +262,11 @@ struct SNeutrinoSettings int widget_fade; //colors + unsigned char clock_Digit_alpha; + unsigned char clock_Digit_red; + unsigned char clock_Digit_green; + unsigned char clock_Digit_blue; + unsigned char menu_Head_alpha; unsigned char menu_Head_red; unsigned char menu_Head_green;