diff --git a/src/gui/components/cc_item_text.cpp b/src/gui/components/cc_item_text.cpp index bf52a4f33..f56733584 100644 --- a/src/gui/components/cc_item_text.cpp +++ b/src/gui/components/cc_item_text.cpp @@ -92,10 +92,7 @@ void CComponentsText::initVarText( const int x_pos, const int y_pos, const int w width = width_old = w; height = height_old = h; - /* we need a minimal borderwith of 1px because the edge-smoothing - (or fontrenderer?) otherwise will paint single pixels outside the - defined area. e.g. 'j' is leaving such residues */ - ct_text_Hborder = 1; + ct_text_Hborder = 0; ct_text_Vborder = 0; shadow = shadow_mode; diff --git a/src/gui/timerlist.cpp b/src/gui/timerlist.cpp index 52eca8f4f..ed620ae6e 100644 --- a/src/gui/timerlist.cpp +++ b/src/gui/timerlist.cpp @@ -281,6 +281,7 @@ CTimerList::CTimerList() timerNew_message = ""; timerNew_pluginName = ""; httpConnectTimeout = 3; + changed = false; /* most probable default */ saved_dispmode = (int)CVFD::MODE_TVRADIO; diff --git a/src/gui/volumebar.cpp b/src/gui/volumebar.cpp index 1586946c1..d5551f66a 100644 --- a/src/gui/volumebar.cpp +++ b/src/gui/volumebar.cpp @@ -34,6 +34,7 @@ #include #include #include +#include using namespace std; @@ -264,9 +265,23 @@ CVolumeHelper::CVolumeHelper() frameBuffer = CFrameBuffer::getInstance(); + CNeutrinoApp::getInstance()->OnAfterSetupFonts.connect(sigc::mem_fun(this, &CVolumeHelper::resetFont)); + Init(); } +void CVolumeHelper::resetFont() +{ + if (vb_font){ + vb_font = NULL; + dprintf(DEBUG_INFO, "\033[33m[CVolumeHelper][%s - %d] reset vb font \033[0m\n", __func__, __LINE__); + } + if (clock_font){ + clock_font = NULL; + dprintf(DEBUG_INFO, "\033[33m[CVolumeHelper][%s - %d] reset clock font \033[0m\n", __func__, __LINE__); + } +} + void CVolumeHelper::Init(Font* font) { @@ -289,10 +304,7 @@ void CVolumeHelper::initInfoClock(Font* font) else clock_font = font; } - else { - if (font != NULL) - clock_font = font; - } + digit_offset = (clock_font)->getDigitOffset(); digit_h = (clock_font)->getDigitHeight(); int t1 = (clock_font)->getMaxDigitWidth(); diff --git a/src/gui/volumebar.h b/src/gui/volumebar.h index 1f09a056b..62ce4d90c 100644 --- a/src/gui/volumebar.h +++ b/src/gui/volumebar.h @@ -108,6 +108,7 @@ class CVolumeHelper Font* clock_font; CFrameBuffer *frameBuffer; + void resetFont(); void Init(Font* font=NULL); void initVolBarSize(); void initMuteIcon(); diff --git a/src/gui/widget/hintbox.cpp b/src/gui/widget/hintbox.cpp index 2439f57ed..45883cc22 100644 --- a/src/gui/widget/hintbox.cpp +++ b/src/gui/widget/hintbox.cpp @@ -65,7 +65,7 @@ CHintBox::CHintBox( const neutrino_locale_t Caption, const char * const Picon, const int& header_buttons, const int& text_mode, - const int& indent): CComponentsWindow( 1, 1, width, + const int& indent): CComponentsWindow( 0, 0, width, HINTBOX_MIN_HEIGHT, Caption, string(Icon == NULL ? "" : Icon), @@ -82,7 +82,7 @@ CHintBox::CHintBox( const char * const Caption, const char * const Picon, const int& header_buttons, const int& text_mode, - const int& indent):CComponentsWindow( 1, 1, width, + const int& indent):CComponentsWindow( 0, 0, width, HINTBOX_MIN_HEIGHT, Caption, string(Icon == NULL ? "" : Icon), @@ -99,7 +99,7 @@ CHintBox::CHintBox( const neutrino_locale_t Caption, const char * const Picon, const int& header_buttons, const int& text_mode, - const int& indent):CComponentsWindow( 1, 1, width, + const int& indent):CComponentsWindow( 0, 0, width, HINTBOX_MIN_HEIGHT, Caption, string(Icon == NULL ? "" : Icon), @@ -116,7 +116,7 @@ CHintBox::CHintBox( const char * const Caption, const char * const Picon, const int& header_buttons, const int& text_mode, - const int& indent):CComponentsWindow( 1, 1, width, + const int& indent):CComponentsWindow( 0, 0, width, HINTBOX_MIN_HEIGHT, Caption, string(Icon == NULL ? "" : Icon), diff --git a/src/gui/widget/textbox.h b/src/gui/widget/textbox.h index 5df0762a7..c38ea5ef1 100644 --- a/src/gui/widget/textbox.h +++ b/src/gui/widget/textbox.h @@ -222,7 +222,7 @@ class CTextBox : public sigc::trackable int getLines(){return(m_nNrOfLines);} /** - * Returns maximal width of passed text + * Returns width of largest line from passed text * @param[in] text * @li exepts type std::string * @param[in] font @@ -233,9 +233,10 @@ class CTextBox : public sigc::trackable static int getMaxLineWidth(const std::string& text, Font* font); /** - * Returns internal defined maximal line width of an existent CTextBox instance. + * Returns internal defined largest line width of an existant CTextBox instance. * @return width of largest line as int * @see static version getMaxLineWidth() + * setText(), parameter: max_width */ int getMaxLineWidth() {return(m_nMaxTextWidth);}