From 50a36b6a09f38f1a35887ac8b84fd03e3fb137e3 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Fri, 19 Jan 2018 15:34:40 +0100 Subject: [PATCH] epgview: take footer height from CComponentsFooter ... to get this footer in sync with the footers of other gui elements Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/3ae39ce6a50b7b745f6cc3f9c9ed8bc79cbaf246 Author: vanhofen Date: 2018-01-19 (Fri, 19 Jan 2018) Origin message was: ------------------ - epgview: take footer height from CComponentsFooter ... to get this footer in sync with the footers of other gui elements --- src/gui/epgview.cpp | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/src/gui/epgview.cpp b/src/gui/epgview.cpp index 639bcd12c..5ef031669 100644 --- a/src/gui/epgview.cpp +++ b/src/gui/epgview.cpp @@ -150,9 +150,9 @@ void CEpgData::start() topheight = font_title->getHeight(); topboxheight = topheight + 6; botboxheight = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_DATE]->getHeight() + 6; - buttonheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_FOOT]->getHeight() + 6; - if (buttonheight < 30) - buttonheight = 30; // the buttons and icons need space + // not really a CComponentsFooter but let's take its height + CComponentsFooter footer; + buttonheight = footer.getHeight(); oy-=buttonheight/2; /* this is the text box height - and the height of the scroll bar */ sb = oy - topboxheight - botboxheight - buttonheight; @@ -1588,22 +1588,17 @@ struct button_label EpgButtons[][5] = void CEpgData::showTimerEventBar (bool pshow, bool adzap, bool mp_info) { - int x, y, w, h, fh; - int icol_w, icol_h; + int x, y, w, h; x = sx; y = sy + oy; w = ox; - - // why we don't use buttonheight member? - fh = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_FOOT]->getHeight(); - - frameBuffer->getIconSize(NEUTRINO_ICON_BUTTON_RED, &icol_w, &icol_h); - h = std::max(fh, icol_h+4); + h = buttonheight; // hide only? - if (! pshow) { - frameBuffer->paintBackgroundBoxRel(sx,y,ox,h); + if (!pshow) + { + frameBuffer->paintBackgroundBoxRel(x, y, w, h); return; }