From c7908c87f4133c538a956ca0e192f74e293bc4d3 Mon Sep 17 00:00:00 2001 From: "M. Liebmann" Date: Sat, 20 Sep 2014 21:35:26 +0200 Subject: [PATCH] Switches color gradients on/off --- data/locale/deutsch.locale | 2 ++ data/locale/english.locale | 2 ++ src/gui/osd_setup.cpp | 9 +++++++++ src/system/locals.h | 2 ++ src/system/locals_intern.h | 2 ++ 5 files changed, 17 insertions(+) diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index a5fccbc4e..8338db0d5 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -269,6 +269,7 @@ clock_seconds Sekunden anzeigen clock_size_height Höhe der Anzeige clock_switch_off Uhr ausblenden clock_switch_on Uhr einblenden +color.gradient Farbverlauf colorchooser.alpha alpha colorchooser.blue blau colorchooser.green grün @@ -925,6 +926,7 @@ 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_color_gradient Schaltet Farbverläufe für verschiedene Menüelemente ein/aus 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 a4a2a1477..4ca8bfdb0 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -269,6 +269,7 @@ clock_seconds Show seconds clock_size_height Display height clock_switch_off Clock off clock_switch_on Clock on +color.gradient Color gradient colorchooser.alpha alpha colorchooser.blue blue colorchooser.green green @@ -925,6 +926,7 @@ 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_color_gradient Switches color gradients for various menu items on/off 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/osd_setup.cpp b/src/gui/osd_setup.cpp index d5b86fdf0..5f83b0826 100644 --- a/src/gui/osd_setup.cpp +++ b/src/gui/osd_setup.cpp @@ -590,6 +590,11 @@ int COsdSetup::showOsdSetup() mfWindowSize->setHint("", LOCALE_MENU_HINT_WINDOW_SIZE); osd_menu->addItem(mfWindowSize); + // color gradient + mc = new CMenuOptionChooser(LOCALE_COLOR_GRADIENT, &g_settings.gradiant, MESSAGEBOX_NO_YES_OPTIONS, MESSAGEBOX_NO_YES_OPTION_COUNT, true, this ); + mc->setHint("", LOCALE_MENU_HINT_COLOR_GRADIENT); + osd_menu->addItem(mc); + osd_menu->addItem(GenericMenuSeparatorLine); // scrambled @@ -1114,6 +1119,10 @@ bool COsdSetup::changeNotify(const neutrino_locale_t OptionName, void * data) g_InfoViewer->changePB(); return false; } + else if(ARE_LOCALES_EQUAL(OptionName, LOCALE_COLOR_GRADIENT)) { + osd_menu->hide(); + return true; + } else if(ARE_LOCALES_EQUAL(OptionName, LOCALE_COLORMENU_OSD_PRESET)) { int preset = * (int *) data; printf("preset %d (setting %d)\n", preset, g_settings.screen_preset); diff --git a/src/system/locals.h b/src/system/locals.h index fc4e57b73..fac7a6fd1 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -296,6 +296,7 @@ typedef enum LOCALE_CLOCK_SIZE_HEIGHT, LOCALE_CLOCK_SWITCH_OFF, LOCALE_CLOCK_SWITCH_ON, + LOCALE_COLOR_GRADIENT, LOCALE_COLORCHOOSER_ALPHA, LOCALE_COLORCHOOSER_BLUE, LOCALE_COLORCHOOSER_GREEN, @@ -952,6 +953,7 @@ typedef enum LOCALE_MENU_HINT_CLOCK_SECONDS, LOCALE_MENU_HINT_CLOCK_SIZE, LOCALE_MENU_HINT_CLOCK_TEXTCOLOR, + LOCALE_MENU_HINT_COLOR_GRADIENT, 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 96d8bc2b5..12cd0b13a 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -296,6 +296,7 @@ const char * locale_real_names[] = "clock_size_height", "clock_switch_off", "clock_switch_on", + "color.gradient", "colorchooser.alpha", "colorchooser.blue", "colorchooser.green", @@ -952,6 +953,7 @@ const char * locale_real_names[] = "menu.hint_clock_seconds", "menu.hint_clock_size", "menu.hint_clock_textcolor", + "menu.hint_color_gradient", "menu.hint_colors", "menu.hint_content_back", "menu.hint_content_textcolor",