diff --git a/src/gui/components/cc_frm_clock.cpp b/src/gui/components/cc_frm_clock.cpp index d1f81f53f..eca8ffb96 100644 --- a/src/gui/components/cc_frm_clock.cpp +++ b/src/gui/components/cc_frm_clock.cpp @@ -66,6 +66,7 @@ void CComponentsFrmClock::initVarClock() cl_font_type = SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO; cl_font = NULL; + cl_col_text = COL_MENUCONTENT; cl_format_str = "%H:%M"; cl_align = CC_ALIGN_VER_CENTER | CC_ALIGN_HOR_CENTER; // cl_force_segment_paint = false; @@ -164,7 +165,8 @@ void CComponentsFrmClock::initCCLockItems() //set size, text, color of current item lbl->setDimensionsAll(cl_x, cl_y, wtmp, cl_h); - lbl->setTextColor(COL_MENUCONTENT); + lbl->setTextColor(cl_col_text); + lbl->setColorAll(col_frame, col_body, col_shadow); lbl->setText(stmp, CTextBox::CENTER, cl_font); //use matching height for digits for better vertical centerring into form diff --git a/src/gui/components/cc_frm_clock.h b/src/gui/components/cc_frm_clock.h index b0cf5e404..ad08a1181 100644 --- a/src/gui/components/cc_frm_clock.h +++ b/src/gui/components/cc_frm_clock.h @@ -61,6 +61,8 @@ class CComponentsFrmClock : public CComponentsForm int cl_font_type; ///fontrenderer object Font *cl_font; + ///text color + int cl_col_text; ///time format const char* cl_format_str; ///time string align, default allign is ver and hor centered @@ -85,6 +87,9 @@ class CComponentsFrmClock : public CComponentsForm ///set font type for segments void setClockFontType(const int& font_type){cl_font_type = font_type;}; + ///set text color + void setTextColor(fb_pixel_t color_text){ cl_col_text = color_text;}; + ///set alignment of timestring, possible modes see align types in cc_types.h void setClockAlignment(int align_type){cl_align = align_type;}; @@ -102,6 +107,8 @@ class CComponentsFrmClock : public CComponentsForm ///show clock on screen void paint(bool do_save_bg = CC_SAVE_SCREEN_YES); + + void refresh() { initCCLockItems(); } }; #endif