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

@@ -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();
}
@@ -65,6 +65,14 @@ void CInfoClock::Init()
//use current theme colors
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;
CVolumeHelper::getInstance()->refresh(cl_font);
CVolumeHelper::getInstance()->getInfoClockDimensions(&x, &y, &width, &height);