infoclock: add some features

* add shadow to infoclock
* rename some locals
* change default height of clock
* add option to switch bachground on/off (default off)
* add option to switch seconds on/off (default on)


Origin commit data
------------------
Commit: e97e33532b
Author: vanhofen <vanhofen@gmx.de>
Date: 2013-12-10 (Tue, 10 Dec 2013)

Origin message was:
------------------
- infoclock: add some features

* add shadow to infoclock
* rename some locals
* change default height of clock
* add option to switch bachground on/off (default off)
* add option to switch seconds on/off (default on)
This commit is contained in:
vanhofen
2013-12-10 02:38:43 +01:00
parent fb8daec3e1
commit 60e34434fd
8 changed files with 46 additions and 6 deletions

View File

@@ -256,6 +256,8 @@ ci.reset_standby Reset nach Standby
ci.settings Zugangskontrolle ci.settings Zugangskontrolle
ci.timeout CAM antwortet nicht ci.timeout CAM antwortet nicht
ci.waiting Warte auf CAM-Antwort ci.waiting Warte auf CAM-Antwort
clock_background Hintergrund anzeigen
clock_seconds Sekunden anzeigen
clock_size_height Höhe der Anzeige clock_size_height Höhe der Anzeige
clock_switch_off Uhr ausblenden clock_switch_off Uhr ausblenden
clock_switch_on Uhr einblenden clock_switch_on Uhr einblenden
@@ -811,8 +813,10 @@ menu.hint_channellist_foot Definiert, welche Informationen im unteren Sendungsfe
menu.hint_channellist_setup Wählen Sie die Anzeigeoptionen für die Kanalliste menu.hint_channellist_setup Wählen Sie die Anzeigeoptionen für die Kanalliste
menu.hint_channels Kanalliste öffnen menu.hint_channels Kanalliste öffnen
menu.hint_ci Conditional-Access-Menü zum Einrichten Ihres CI-Moduls oder der eingebetteten Conax-Karte menu.hint_ci Conditional-Access-Menü zum Einrichten Ihres CI-Moduls oder der eingebetteten Conax-Karte
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_size Stellen Sie die Größe der Info Uhr ein. 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_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
@@ -1244,7 +1248,7 @@ miscsettings.infobar_show_res Auflösung anzeigen
miscsettings.infobar_show_res_simple einfach miscsettings.infobar_show_res_simple einfach
miscsettings.infobar_show_sysfs_hdd Füllstandanzeige (sysFS & hdd) miscsettings.infobar_show_sysfs_hdd Füllstandanzeige (sysFS & hdd)
miscsettings.infobar_show_tuner Aktiven Tuner anzeigen miscsettings.infobar_show_tuner Aktiven Tuner anzeigen
miscsettings.infoclock Info Uhr miscsettings.infoclock Uhr
miscsettings.progressbar Fortschrittsbalken miscsettings.progressbar Fortschrittsbalken
miscsettings.progressbar_color Farbe miscsettings.progressbar_color Farbe
miscsettings.progressbar_design Design miscsettings.progressbar_design Design

View File

@@ -256,6 +256,8 @@ ci.reset_standby Reset after standby
ci.settings Conditional access ci.settings Conditional access
ci.timeout Timeout waiting CI menu ready ci.timeout Timeout waiting CI menu ready
ci.waiting Waiting for CI answer ci.waiting Waiting for CI answer
clock_background Show background
clock_seconds Show seconds
clock_size_height Display height clock_size_height Display height
clock_switch_off Clock off clock_switch_off Clock off
clock_switch_on Clock on clock_switch_on Clock on
@@ -811,8 +813,10 @@ menu.hint_channellist_foot Show additional information\nin bottom box
menu.hint_channellist_setup Configure channel list GUI options menu.hint_channellist_setup Configure channel list GUI options
menu.hint_channels Open channel list menu.hint_channels Open channel list
menu.hint_ci Conditional access menu\nto setup your CI CAM or embeded Conax card menu.hint_ci Conditional access menu\nto setup your CI CAM or embeded Conax card
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_size Set the size of the info clock. menu.hint_clock_seconds Show time format with seconds
menu.hint_clock_size Set the size of the info clock
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
@@ -1244,7 +1248,7 @@ miscsettings.infobar_show_res show resolution on infobar
miscsettings.infobar_show_res_simple simple miscsettings.infobar_show_res_simple simple
miscsettings.infobar_show_sysfs_hdd Fill level (sysFS & hdd) miscsettings.infobar_show_sysfs_hdd Fill level (sysFS & hdd)
miscsettings.infobar_show_tuner Display active tuner miscsettings.infobar_show_tuner Display active tuner
miscsettings.infoclock Info clock miscsettings.infoclock Clock
miscsettings.progressbar Progressbar miscsettings.progressbar Progressbar
miscsettings.progressbar_color Color miscsettings.progressbar_color Color
miscsettings.progressbar_design Design miscsettings.progressbar_design Design

View File

@@ -36,7 +36,7 @@
CInfoClock::CInfoClock():CComponentsFrmClock( 0, 0, 0, 50, "%H:%M:%S", true, CC_SHADOW_OFF, COL_LIGHT_GRAY, COL_MENUCONTENT_PLUS_0,COL_MENUCONTENTDARK_PLUS_0) CInfoClock::CInfoClock():CComponentsFrmClock( 0, 0, 0, 50, "%H:%M:%S", true, CC_SHADOW_ON, COL_LIGHT_GRAY, COL_MENUCONTENT_PLUS_0,COL_MENUCONTENTDARK_PLUS_0)
{ {
initVarInfoClock(); initVarInfoClock();
} }
@@ -65,6 +65,14 @@ void CInfoClock::Init()
//use current theme colors //use current theme colors
syncSysColors(); syncSysColors();
paint_bg = g_settings.infoClockBackground;
if (g_settings.infoClockSeconds)
setClockFormat("%H:%M:%S");
else
setClockFormat("%H:%M");
int x_old = x, y_old = y, width_old = width, height_old = height; int x_old = x, y_old = y, width_old = width, height_old = height;
CVolumeHelper::getInstance()->refresh(cl_font); CVolumeHelper::getInstance()->refresh(cl_font);
CVolumeHelper::getInstance()->getInfoClockDimensions(&x, &y, &width, &height); CVolumeHelper::getInstance()->getInfoClockDimensions(&x, &y, &width, &height);

View File

@@ -1016,6 +1016,16 @@ void COsdSetup::showOsdInfoclockSetup(CMenuWidget *menu_infoclock)
CMenuOptionNumberChooser* mn = new CMenuOptionNumberChooser(LOCALE_CLOCK_SIZE_HEIGHT, &g_settings.infoClockFontSize, true, 30, 120); CMenuOptionNumberChooser* mn = new CMenuOptionNumberChooser(LOCALE_CLOCK_SIZE_HEIGHT, &g_settings.infoClockFontSize, true, 30, 120);
mn->setHint("", LOCALE_MENU_HINT_CLOCK_SIZE); mn->setHint("", LOCALE_MENU_HINT_CLOCK_SIZE);
menu_infoclock->addItem(mn); menu_infoclock->addItem(mn);
// clock with seconds
CMenuOptionChooser *mc = new CMenuOptionChooser(LOCALE_CLOCK_SECONDS, &g_settings.infoClockSeconds, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true);
mc->setHint("", LOCALE_MENU_HINT_CLOCK_SECONDS);
menu_infoclock->addItem(mc);
// clock with background
mc = new CMenuOptionChooser(LOCALE_CLOCK_BACKGROUND, &g_settings.infoClockBackground, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true);
mc->setHint("", LOCALE_MENU_HINT_CLOCK_BACKGROUND);
menu_infoclock->addItem(mc);
} }
bool COsdSetup::changeNotify(const neutrino_locale_t OptionName, void * data) bool COsdSetup::changeNotify(const neutrino_locale_t OptionName, void * data)

View File

@@ -822,7 +822,9 @@ int CNeutrinoApp::loadSetup(const char * fname)
g_settings.pip_height = configfile.getInt32("pip_height", 200); g_settings.pip_height = configfile.getInt32("pip_height", 200);
#endif #endif
g_settings.infoClockFontSize = configfile.getInt32("infoClockFontSize", 34); g_settings.infoClockFontSize = configfile.getInt32("infoClockFontSize", 30);
g_settings.infoClockBackground = configfile.getInt32("infoClockBackground", 0);
g_settings.infoClockSeconds = configfile.getInt32("infoClockSeconds", 1);
if(erg) if(erg)
configfile.setModifiedFlag(true); configfile.setModifiedFlag(true);
@@ -1241,6 +1243,8 @@ void CNeutrinoApp::saveSetup(const char * fname)
configfile.setInt32("pip_height", g_settings.pip_height); configfile.setInt32("pip_height", g_settings.pip_height);
#endif #endif
configfile.setInt32("infoClockFontSize", g_settings.infoClockFontSize); configfile.setInt32("infoClockFontSize", g_settings.infoClockFontSize);
configfile.setInt32("infoClockBackground", g_settings.infoClockBackground);
configfile.setInt32("infoClockSeconds", g_settings.infoClockSeconds);
configfile.setInt32("easymenu", g_settings.easymenu); configfile.setInt32("easymenu", g_settings.easymenu);
if(strcmp(fname, NEUTRINO_SETTINGS_FILE)) if(strcmp(fname, NEUTRINO_SETTINGS_FILE))
configfile.saveConfig(fname); configfile.saveConfig(fname);

View File

@@ -283,6 +283,8 @@ typedef enum
LOCALE_CI_SETTINGS, LOCALE_CI_SETTINGS,
LOCALE_CI_TIMEOUT, LOCALE_CI_TIMEOUT,
LOCALE_CI_WAITING, LOCALE_CI_WAITING,
LOCALE_CLOCK_BACKGROUND,
LOCALE_CLOCK_SECONDS,
LOCALE_CLOCK_SIZE_HEIGHT, LOCALE_CLOCK_SIZE_HEIGHT,
LOCALE_CLOCK_SWITCH_OFF, LOCALE_CLOCK_SWITCH_OFF,
LOCALE_CLOCK_SWITCH_ON, LOCALE_CLOCK_SWITCH_ON,
@@ -838,7 +840,9 @@ typedef enum
LOCALE_MENU_HINT_CHANNELLIST_SETUP, LOCALE_MENU_HINT_CHANNELLIST_SETUP,
LOCALE_MENU_HINT_CHANNELS, LOCALE_MENU_HINT_CHANNELS,
LOCALE_MENU_HINT_CI, LOCALE_MENU_HINT_CI,
LOCALE_MENU_HINT_CLOCK_BACKGROUND,
LOCALE_MENU_HINT_CLOCK_MODE, LOCALE_MENU_HINT_CLOCK_MODE,
LOCALE_MENU_HINT_CLOCK_SECONDS,
LOCALE_MENU_HINT_CLOCK_SIZE, LOCALE_MENU_HINT_CLOCK_SIZE,
LOCALE_MENU_HINT_COLORS, LOCALE_MENU_HINT_COLORS,
LOCALE_MENU_HINT_CONTENT_BACK, LOCALE_MENU_HINT_CONTENT_BACK,

View File

@@ -283,6 +283,8 @@ const char * locale_real_names[] =
"ci.settings", "ci.settings",
"ci.timeout", "ci.timeout",
"ci.waiting", "ci.waiting",
"clock_background",
"clock_seconds",
"clock_size_height", "clock_size_height",
"clock_switch_off", "clock_switch_off",
"clock_switch_on", "clock_switch_on",
@@ -838,7 +840,9 @@ const char * locale_real_names[] =
"menu.hint_channellist_setup", "menu.hint_channellist_setup",
"menu.hint_channels", "menu.hint_channels",
"menu.hint_ci", "menu.hint_ci",
"menu.hint_clock_background",
"menu.hint_clock_mode", "menu.hint_clock_mode",
"menu.hint_clock_seconds",
"menu.hint_clock_size", "menu.hint_clock_size",
"menu.hint_colors", "menu.hint_colors",
"menu.hint_content_back", "menu.hint_content_back",

View File

@@ -539,6 +539,8 @@ struct SNeutrinoSettings
}; };
int infoClockFontSize; int infoClockFontSize;
int infoClockSeconds;
int infoClockBackground;
// lcdd // lcdd
enum LCD_SETTINGS { enum LCD_SETTINGS {