From 34ce71fb5701c765814cec34c0d1c9b57f1bc460 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Tue, 20 Dec 2016 22:03:43 +0100 Subject: [PATCH 1/6] src/gui/timerlist.cpp init changed Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/c868ad53002f748bbb7725359f3de1f6dc17d489 Author: Jacek Jendrzej Date: 2016-12-20 (Tue, 20 Dec 2016) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/timerlist.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gui/timerlist.cpp b/src/gui/timerlist.cpp index 0de73459c..06ef816d8 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; From 1fdf0f0acf47e5179a3939a3fce0cb8d2b63547a Mon Sep 17 00:00:00 2001 From: TangoCash Date: Wed, 21 Dec 2016 10:13:41 +0100 Subject: [PATCH 2/6] volumebar font reset after change (thx dboxoldie) to avoid segfault Signed-off-by: Thilo Graf picked from Duckbox-Developers/neutrino-mp-cst-next 4365761b2a47e12666154821c2ce982f74ef0627 needs supplements Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/1ea12764dae240b434d471ce8737b110cdcc244d Author: TangoCash Date: 2016-12-21 (Wed, 21 Dec 2016) ------------------ This commit was generated by Migit --- src/gui/volumebar.cpp | 15 +++++++++++++++ src/gui/volumebar.h | 1 + 2 files changed, 16 insertions(+) diff --git a/src/gui/volumebar.cpp b/src/gui/volumebar.cpp index 52f4af4ed..22aaf6c3c 100644 --- a/src/gui/volumebar.cpp +++ b/src/gui/volumebar.cpp @@ -34,6 +34,7 @@ #include #include #include +#include using namespace std; @@ -260,9 +261,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) { 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(); From ac2d1fd22e4cb0698dc9fb11ee0ae0087fc6131b Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Wed, 21 Dec 2016 10:19:35 +0100 Subject: [PATCH 3/6] CVolumeHelper: remove unnecessary reinit of font Is already done in previous block. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/9839db97290b71c9d39f0032d341feb3d3199eaf Author: Thilo Graf Date: 2016-12-21 (Wed, 21 Dec 2016) ------------------ This commit was generated by Migit --- src/gui/volumebar.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/gui/volumebar.cpp b/src/gui/volumebar.cpp index 22aaf6c3c..acf528f1e 100644 --- a/src/gui/volumebar.cpp +++ b/src/gui/volumebar.cpp @@ -300,10 +300,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(); From 3fdb2be5059cba60fb7b3e0ad204c9c1834a3c1f Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Wed, 21 Dec 2016 11:08:47 +0100 Subject: [PATCH 4/6] CTextBox: More precise function description Note: In this context i noticed, it seems method getRenderWith() in Fontrender class returns wrong values with BOLD font types. It would be nice if anybody could verify this possible bug. If I see that correctly, we should fix this. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/f26103cd65493972079173e421b1c64e8d78f828 Author: Thilo Graf Date: 2016-12-21 (Wed, 21 Dec 2016) ------------------ This commit was generated by Migit --- src/gui/widget/textbox.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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);} From 99d8ea8ec56a6306bb7829d10b64adce2bb9d25f Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Thu, 22 Dec 2016 09:49:40 +0100 Subject: [PATCH 5/6] partial revert: "CTextBox: expand parameters of member setTextBorderWidth()" related commit: 6a4aa312091d7615f8ed21637ccbf663a0a9b73a Since this commit, TextBox received a lot of optimizations, so it is possible we have no described side effects. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/fad2adffa2c4465698d5b36afa1fd7c7faad5c2a Author: Thilo Graf Date: 2016-12-22 (Thu, 22 Dec 2016) ------------------ This commit was generated by Migit --- src/gui/components/cc_item_text.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) 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; From 642d6b0663437963b202819e1e9d180b8de03956 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Thu, 22 Dec 2016 10:01:53 +0100 Subject: [PATCH 6/6] CHintBox: small cosmetics for initial positions This should have no effect, because calculation of position and dimensions is mostly dependency from message text. So this is only formality. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/b71499806562c503ebc7532e90304b3a8a9b4b11 Author: Thilo Graf Date: 2016-12-22 (Thu, 22 Dec 2016) ------------------ This commit was generated by Migit --- src/gui/widget/hintbox.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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),