mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 00:41:17 +02:00
CInfoClock: menu item for setting color of the digit added
This commit is contained in:
@@ -266,6 +266,7 @@ colorchooser.blue blau
|
|||||||
colorchooser.green grün
|
colorchooser.green grün
|
||||||
colorchooser.red rot
|
colorchooser.red rot
|
||||||
colormenu.background Hintergrundfarbe
|
colormenu.background Hintergrundfarbe
|
||||||
|
colormenu.clock_textcolor Ziffernfarbe
|
||||||
colormenu.contrast_fonts Schriftkontrast
|
colormenu.contrast_fonts Schriftkontrast
|
||||||
colormenu.fade Ein-/Ausblenden
|
colormenu.fade Ein-/Ausblenden
|
||||||
colormenu.font Neutrino-HD Schriftart
|
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_mode Schalten Sie die Uhr ein oder aus
|
||||||
menu.hint_clock_seconds Legen Sie fest, ob die Sekunden angezeigt werden sollen
|
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_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_colors Konfigurieren Sie die Menü-Farben
|
||||||
menu.hint_content_back Ändern Sie die Hintergrundfarbe für den Fensterinhalt
|
menu.hint_content_back Ändern Sie die Hintergrundfarbe für den Fensterinhalt
|
||||||
menu.hint_content_textcolor Ändern Sie die Textfarbe für den Fensterinhalt
|
menu.hint_content_textcolor Ändern Sie die Textfarbe für den Fensterinhalt
|
||||||
|
@@ -266,6 +266,7 @@ colorchooser.blue blue
|
|||||||
colorchooser.green green
|
colorchooser.green green
|
||||||
colorchooser.red red
|
colorchooser.red red
|
||||||
colormenu.background Background
|
colormenu.background Background
|
||||||
|
colormenu.clock_textcolor Digit color
|
||||||
colormenu.contrast_fonts Contrast fonts
|
colormenu.contrast_fonts Contrast fonts
|
||||||
colormenu.fade Fade GUI
|
colormenu.fade Fade GUI
|
||||||
colormenu.font Select GUI font
|
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_mode Switch clock on or off
|
||||||
menu.hint_clock_seconds Show time format with seconds
|
menu.hint_clock_seconds Show time format with seconds
|
||||||
menu.hint_clock_size Set the size of the info clock
|
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_colors Configure GUI colors
|
||||||
menu.hint_content_back Change GUI window background color
|
menu.hint_content_back Change GUI window background color
|
||||||
menu.hint_content_textcolor Change GUI window text color
|
menu.hint_content_textcolor Change GUI window text color
|
||||||
|
@@ -110,6 +110,7 @@
|
|||||||
#define COL_MENUCONTENTSELECTED_TEXT_PLUS_1 (CFrameBuffer::getInstance()->realcolor[(COL_NEUTRINO_TEXT + 12)])
|
#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_MENUCONTENTSELECTED_TEXT_PLUS_2 (CFrameBuffer::getInstance()->realcolor[(COL_NEUTRINO_TEXT + 13)])
|
||||||
#define COL_MENUCONTENTINACTIVE_TEXT (CFrameBuffer::getInstance()->realcolor[(COL_NEUTRINO_TEXT + 14)])
|
#define COL_MENUCONTENTINACTIVE_TEXT (CFrameBuffer::getInstance()->realcolor[(COL_NEUTRINO_TEXT + 14)])
|
||||||
|
#define COL_INFOCLOCK_TEXT (CFrameBuffer::getInstance()->realcolor[(COL_NEUTRINO_TEXT + 15)])
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@@ -65,6 +65,12 @@ void CInfoClock::Init()
|
|||||||
//use current theme colors
|
//use current theme colors
|
||||||
syncSysColors();
|
syncSysColors();
|
||||||
|
|
||||||
|
//set text color
|
||||||
|
if (g_settings.infoClockBackground)
|
||||||
|
setTextColor(COL_MENUCONTENT_TEXT);
|
||||||
|
else
|
||||||
|
setTextColor(COL_INFOCLOCK_TEXT);
|
||||||
|
|
||||||
paint_bg = g_settings.infoClockBackground;
|
paint_bg = g_settings.infoClockBackground;
|
||||||
|
|
||||||
if (g_settings.infoClockSeconds)
|
if (g_settings.infoClockSeconds)
|
||||||
|
@@ -71,6 +71,7 @@ COsdSetup::COsdSetup(bool wizard_mode)
|
|||||||
frameBuffer = CFrameBuffer::getInstance();
|
frameBuffer = CFrameBuffer::getInstance();
|
||||||
colorSetupNotifier = new CColorSetupNotifier();
|
colorSetupNotifier = new CColorSetupNotifier();
|
||||||
fontsizenotifier = new CFontSizeNotifier;
|
fontsizenotifier = new CFontSizeNotifier;
|
||||||
|
colorInfoclockNotifier = NULL;
|
||||||
osd_menu = NULL;
|
osd_menu = NULL;
|
||||||
submenu_menus = NULL;
|
submenu_menus = NULL;
|
||||||
mfFontFile = NULL;
|
mfFontFile = NULL;
|
||||||
@@ -611,6 +612,7 @@ int COsdSetup::showOsdSetup()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
delete colorInfoclockNotifier;
|
||||||
delete osd_menu;
|
delete osd_menu;
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
@@ -1022,10 +1024,20 @@ void COsdSetup::showOsdInfoclockSetup(CMenuWidget *menu_infoclock)
|
|||||||
mc->setHint("", LOCALE_MENU_HINT_CLOCK_SECONDS);
|
mc->setHint("", LOCALE_MENU_HINT_CLOCK_SECONDS);
|
||||||
menu_infoclock->addItem(mc);
|
menu_infoclock->addItem(mc);
|
||||||
|
|
||||||
|
colorInfoclockNotifier = new COnOffNotifier(1);
|
||||||
|
|
||||||
// clock with background
|
// 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);
|
mc->setHint("", LOCALE_MENU_HINT_CLOCK_BACKGROUND);
|
||||||
menu_infoclock->addItem(mc);
|
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)
|
bool COsdSetup::changeNotify(const neutrino_locale_t OptionName, void * data)
|
||||||
|
@@ -53,6 +53,7 @@ class COsdSetup : public CMenuTarget, public CChangeObserver
|
|||||||
char window_size_value[10];
|
char window_size_value[10];
|
||||||
std::string osdFontFile, osdTtxFontFile;
|
std::string osdFontFile, osdTtxFontFile;
|
||||||
CComponentsShapeSquare *win_demo;
|
CComponentsShapeSquare *win_demo;
|
||||||
|
COnOffNotifier* colorInfoclockNotifier;
|
||||||
|
|
||||||
int width;
|
int width;
|
||||||
bool is_wizard;
|
bool is_wizard;
|
||||||
|
@@ -458,6 +458,11 @@ int CNeutrinoApp::loadSetup(const char * fname)
|
|||||||
g_settings.widget_fade = configfile.getBool("widget_fade" , false );
|
g_settings.widget_fade = configfile.getBool("widget_fade" , false );
|
||||||
|
|
||||||
//colors (neutrino defaultcolors)
|
//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_alpha = configfile.getInt32( "menu_Head_alpha", 0x00 );
|
||||||
g_settings.menu_Head_red = configfile.getInt32( "menu_Head_red", 0x00 );
|
g_settings.menu_Head_red = configfile.getInt32( "menu_Head_red", 0x00 );
|
||||||
g_settings.menu_Head_green = configfile.getInt32( "menu_Head_green", 0x0A );
|
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 );
|
configfile.setBool("widget_fade" , g_settings.widget_fade );
|
||||||
|
|
||||||
//colors
|
//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_alpha", g_settings.menu_Head_alpha );
|
||||||
configfile.setInt32( "menu_Head_red", g_settings.menu_Head_red );
|
configfile.setInt32( "menu_Head_red", g_settings.menu_Head_red );
|
||||||
configfile.setInt32( "menu_Head_green", g_settings.menu_Head_green );
|
configfile.setInt32( "menu_Head_green", g_settings.menu_Head_green );
|
||||||
|
@@ -293,6 +293,7 @@ typedef enum
|
|||||||
LOCALE_COLORCHOOSER_GREEN,
|
LOCALE_COLORCHOOSER_GREEN,
|
||||||
LOCALE_COLORCHOOSER_RED,
|
LOCALE_COLORCHOOSER_RED,
|
||||||
LOCALE_COLORMENU_BACKGROUND,
|
LOCALE_COLORMENU_BACKGROUND,
|
||||||
|
LOCALE_COLORMENU_CLOCK_TEXTCOLOR,
|
||||||
LOCALE_COLORMENU_CONTRAST_FONTS,
|
LOCALE_COLORMENU_CONTRAST_FONTS,
|
||||||
LOCALE_COLORMENU_FADE,
|
LOCALE_COLORMENU_FADE,
|
||||||
LOCALE_COLORMENU_FONT,
|
LOCALE_COLORMENU_FONT,
|
||||||
@@ -844,6 +845,7 @@ typedef enum
|
|||||||
LOCALE_MENU_HINT_CLOCK_MODE,
|
LOCALE_MENU_HINT_CLOCK_MODE,
|
||||||
LOCALE_MENU_HINT_CLOCK_SECONDS,
|
LOCALE_MENU_HINT_CLOCK_SECONDS,
|
||||||
LOCALE_MENU_HINT_CLOCK_SIZE,
|
LOCALE_MENU_HINT_CLOCK_SIZE,
|
||||||
|
LOCALE_MENU_HINT_CLOCK_TEXTCOLOR,
|
||||||
LOCALE_MENU_HINT_COLORS,
|
LOCALE_MENU_HINT_COLORS,
|
||||||
LOCALE_MENU_HINT_CONTENT_BACK,
|
LOCALE_MENU_HINT_CONTENT_BACK,
|
||||||
LOCALE_MENU_HINT_CONTENT_TEXTCOLOR,
|
LOCALE_MENU_HINT_CONTENT_TEXTCOLOR,
|
||||||
|
@@ -293,6 +293,7 @@ const char * locale_real_names[] =
|
|||||||
"colorchooser.green",
|
"colorchooser.green",
|
||||||
"colorchooser.red",
|
"colorchooser.red",
|
||||||
"colormenu.background",
|
"colormenu.background",
|
||||||
|
"colormenu.clock_textcolor",
|
||||||
"colormenu.contrast_fonts",
|
"colormenu.contrast_fonts",
|
||||||
"colormenu.fade",
|
"colormenu.fade",
|
||||||
"colormenu.font",
|
"colormenu.font",
|
||||||
@@ -844,6 +845,7 @@ const char * locale_real_names[] =
|
|||||||
"menu.hint_clock_mode",
|
"menu.hint_clock_mode",
|
||||||
"menu.hint_clock_seconds",
|
"menu.hint_clock_seconds",
|
||||||
"menu.hint_clock_size",
|
"menu.hint_clock_size",
|
||||||
|
"menu.hint_clock_textcolor",
|
||||||
"menu.hint_colors",
|
"menu.hint_colors",
|
||||||
"menu.hint_content_back",
|
"menu.hint_content_back",
|
||||||
"menu.hint_content_textcolor",
|
"menu.hint_content_textcolor",
|
||||||
|
@@ -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),
|
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));
|
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();
|
frameBuffer->paletteSet();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -262,6 +262,11 @@ struct SNeutrinoSettings
|
|||||||
int widget_fade;
|
int widget_fade;
|
||||||
|
|
||||||
//colors
|
//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_alpha;
|
||||||
unsigned char menu_Head_red;
|
unsigned char menu_Head_red;
|
||||||
unsigned char menu_Head_green;
|
unsigned char menu_Head_green;
|
||||||
|
Reference in New Issue
Block a user