mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 16:31:05 +02:00
themes: use hintbox and header gradient option in theme settings
Color gradient feature was originally intended for use
inside theme settings and it's not really suitable for
generally use as default in all themes at the moment, so it makes more
sense to have options in theme settings and let the user decide
to customize this, unless enough other gui parts can use this feature.
Origin commit data
------------------
Branch: ni/coolstream
Commit: 01516cf943
Author: Thilo Graf <dbt@novatux.de>
Date: 2015-04-29 (Wed, 29 Apr 2015)
Origin message was:
------------------
themes: use hintbox and header gradient option in theme settings
Color gradient feature was originally intended for use
inside theme settings and it's not really suitable for
generally use as default in all themes at the moment, so it makes more
sense to have options in theme settings and let the user decide
to customize this, unless enough other gui parts can use this feature.
------------------
This commit was generated by Migit
This commit is contained in:
@@ -603,11 +603,6 @@ 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
|
||||
@@ -653,6 +648,7 @@ void COsdSetup::showOsdMenueColorSetup(CMenuWidget *menu_colors)
|
||||
menu_colors->addItem(mf);
|
||||
|
||||
SNeutrinoTheme &t = g_settings.theme;
|
||||
sigc::slot0<void> slot_repaint = sigc::mem_fun(menu_colors, &CMenuWidget::paint); //we want to repaint after changed Option
|
||||
|
||||
CColorChooser* chHeadcolor = new CColorChooser(LOCALE_COLORMENU_BACKGROUND, &t.menu_Head_red, &t.menu_Head_green, &t.menu_Head_blue,
|
||||
&t.menu_Head_alpha, colorSetupNotifier);
|
||||
@@ -683,6 +679,13 @@ void COsdSetup::showOsdMenueColorSetup(CMenuWidget *menu_colors)
|
||||
mf->setHint("", LOCALE_MENU_HINT_HEAD_TEXTCOLOR);
|
||||
menu_colors->addItem(mf);
|
||||
|
||||
// head color gradient
|
||||
CMenuOptionChooser *oj;
|
||||
oj = new CMenuOptionChooser(LOCALE_COLOR_GRADIENT, &g_settings.theme.menu_Head_gradient, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true );
|
||||
oj->OnAfterChangeOption.connect(slot_repaint);
|
||||
oj->setHint("", LOCALE_MENU_HINT_COLOR_GRADIENT);
|
||||
menu_colors->addItem(oj);
|
||||
|
||||
menu_colors->addItem( new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_COLORMENUSETUP_MENUCONTENT));
|
||||
mf = new CMenuDForwarder(LOCALE_COLORMENU_BACKGROUND, true, NULL, chContentcolor );
|
||||
mf->setHint("", LOCALE_MENU_HINT_CONTENT_BACK);
|
||||
@@ -710,6 +713,13 @@ void COsdSetup::showOsdMenueColorSetup(CMenuWidget *menu_colors)
|
||||
mf->setHint("", LOCALE_MENU_HINT_SELECTED_TEXT);
|
||||
menu_colors->addItem(mf);
|
||||
|
||||
// hintbox color gradient
|
||||
menu_colors->addItem( new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_COLORTHEMEMENU_MENU_HINTS));
|
||||
oj = new CMenuOptionChooser(LOCALE_COLOR_GRADIENT, &t.menu_Hint_gradient, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true);
|
||||
oj->OnAfterChangeOption.connect(slot_repaint);
|
||||
oj->setHint("", LOCALE_MENU_HINT_COLOR_GRADIENT);
|
||||
menu_colors->addItem(oj);
|
||||
|
||||
CColorChooser* chInfobarcolor = new CColorChooser(LOCALE_COLORMENU_BACKGROUND, &t.infobar_red,
|
||||
&t.infobar_green, &t.infobar_blue, &t.infobar_alpha, colorSetupNotifier);
|
||||
CColorChooser* chInfobarTextcolor = new CColorChooser(LOCALE_COLORMENU_TEXTCOLOR, &t.infobar_Text_red,
|
||||
@@ -1137,7 +1147,7 @@ bool COsdSetup::changeNotify(const neutrino_locale_t OptionName, void * data)
|
||||
}
|
||||
else if(ARE_LOCALES_EQUAL(OptionName, LOCALE_COLOR_GRADIENT)) {
|
||||
osd_menu->paint();
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
else if(ARE_LOCALES_EQUAL(OptionName, LOCALE_COLORMENU_OSD_PRESET)) {
|
||||
int preset = * (int *) data;
|
||||
|
Reference in New Issue
Block a user