From 32b9af3d96202ab43596b5361151f95cfd1ba6e3 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Wed, 29 Nov 2017 10:47:34 +0100 Subject: [PATCH] infoviewer_bb: fix offset for first status-icon Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/1751a00cc35871552d7e0cc575a1daa29cf42d65 Author: vanhofen Date: 2017-11-29 (Wed, 29 Nov 2017) Origin message was: ------------------ - infoviewer_bb: fix offset for first status-icon --- src/gui/infoviewer_bb.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/gui/infoviewer_bb.cpp b/src/gui/infoviewer_bb.cpp index 6c87f2dc5..81ce4e712 100644 --- a/src/gui/infoviewer_bb.cpp +++ b/src/gui/infoviewer_bb.cpp @@ -171,6 +171,7 @@ void CInfoViewerBB::getBBIconInfo() BBarFontY = BBarY + InfoHeightY_Info - (InfoHeightY_Info - g_Font[SNeutrinoSettings::FONT_TYPE_MENU_FOOT]->getHeight()) / 2; /* center in buttonbar */ bbIconMinX = g_InfoViewer->BoxEndX - OFFSET_INNER_MID; bool isRadioMode = (CNeutrinoApp::getInstance()->getMode() == NeutrinoModes::mode_radio || CNeutrinoApp::getInstance()->getMode() == NeutrinoModes::mode_webradio); + bool firstIcon = true; for (int i = 0; i < CInfoViewerBB::ICON_MAX; i++) { int w = 0, h = 0; @@ -212,8 +213,10 @@ void CInfoViewerBB::getBBIconInfo() break; } if (iconView) { - if (i > 0) - bbIconMinX -= OFFSET_INNER_SMALL; //NI + if (firstIcon) + firstIcon = false; + else + bbIconMinX -= OFFSET_INNER_SMALL; bbIconMinX -= w; bbIconInfo[i].x = bbIconMinX; bbIconInfo[i].h = h;