From 6f3df3a5a80edbd0544c34fc7a1317a950e53ade Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Wed, 17 Feb 2016 10:17:53 +0100 Subject: [PATCH] CInfoViewerBB: ensure reinit bboffset before paint ca bar and footer Value of bb offset was only initialized on bb init. If a user has changed ca bar settings (e.g. enable/disable frame around ca bar) while runtime, the current offset value could be wrong and infoviewer has display errors. To solve this restart of neutrino was required. --- src/gui/infoviewer_bb.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gui/infoviewer_bb.cpp b/src/gui/infoviewer_bb.cpp index 66a7fa335..9a68fe310 100644 --- a/src/gui/infoviewer_bb.cpp +++ b/src/gui/infoviewer_bb.cpp @@ -144,6 +144,7 @@ bool CInfoViewerBB::checkBBIcon(const char * const icon, int *w, int *h) void CInfoViewerBB::getBBIconInfo() { bbIconMaxH = 0; + initBBOffset(); BBarY = g_InfoViewer->BoxEndY + bottom_bar_offset; BBarFontY = BBarY + InfoHeightY_Info - (InfoHeightY_Info - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight()) / 2; /* center in buttonbar */ bbIconMinX = g_InfoViewer->BoxEndX - 8; //should be 10px, but 2px will be reduced for each icon @@ -856,6 +857,7 @@ void CInfoViewerBB::showIcon_CA_Status(int notfirst) void CInfoViewerBB::paintCA_bar(int left, int right) { + initBBOffset(); int xcnt = (g_InfoViewer->BoxEndX - g_InfoViewer->ChanInfoX - (g_settings.infobar_casystem_frame ? 24 : 0)) / 4; int ycnt = (bottom_bar_offset - (g_settings.infobar_casystem_frame ? 14 : 0)) / 4; int ca_width = g_InfoViewer->BoxEndX - g_InfoViewer->ChanInfoX;