From b9ac05142099451cbf4f6a892e6788fdbd3fc508 Mon Sep 17 00:00:00 2001 From: micha-bbg Date: Thu, 3 Nov 2011 02:32:56 +0000 Subject: [PATCH] Display error EPG (Buttons are partially drawn out of the EPG screen) - Use ::paintButtons (buttons.cpp) calculating to the height FunctionBar. git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1810 e54a6e83-5905-42d5-8d5c-058d10e6a962 --- src/gui/eventlist.cpp | 13 +++++-------- src/gui/widget/buttons.cpp | 6 +++++- src/gui/widget/buttons.h | 6 +++--- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/gui/eventlist.cpp b/src/gui/eventlist.cpp index bf13abc08..867ce365c 100644 --- a/src/gui/eventlist.cpp +++ b/src/gui/eventlist.cpp @@ -248,21 +248,18 @@ int EventList::exec(const t_channel_id channel_id, const std::string& channelnam neutrino_msg_t msg; neutrino_msg_data_t data; bool in_search = false; - - iheight = 30; // info bar height (see below, hard coded at this time) + // Calculate iheight + struct button_label tmp_button[1] = { { NEUTRINO_ICON_BUTTON_RED, NONEXISTANT_LOCALE } }; + iheight = ::paintButtons(0, 0, 0, 1, tmp_button, 0, 0, false, COL_INFOBAR_SHADOW, NULL, 0, false); if(iheight < fh) iheight = fh; - int icol_w = 0, icol_h = 0; - frameBuffer->getIconSize(NEUTRINO_ICON_BUTTON_RED, &icol_w, &icol_h); - - iheight = std::max(iheight, icol_h); + // Calculate theight theight = g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_TITLE]->getHeight(); - const int pic_h = 39; theight = std::max(theight, pic_h); - + int icol_w = 0, icol_h = 0; frameBuffer->getIconSize(NEUTRINO_ICON_BUTTON_HELP, &icol_w, &icol_h); theight = std::max(theight, icol_h); diff --git a/src/gui/widget/buttons.cpp b/src/gui/widget/buttons.cpp index 2a04f0e0c..2a9c45965 100644 --- a/src/gui/widget/buttons.cpp +++ b/src/gui/widget/buttons.cpp @@ -68,7 +68,8 @@ int paintButtons( const int &x, bool vertical_paint, const unsigned char fcolor, const char * alt_buttontext, - const uint &buttontext_id) + const uint &buttontext_id, + bool show) { CFrameBuffer *frameBuffer = CFrameBuffer::getInstance(); Font * font = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]; @@ -122,6 +123,9 @@ int paintButtons( const int &x, //calculate footer heigth h_footer = footerheight == 0 ? (h_button + 2*h_space) : footerheight; + if (!show) + return h_footer; + //paint footer if (w_footer > 0) frameBuffer->paintBoxRel(x_footer, y_footer, w_footer, h_footer, COL_INFOBAR_SHADOW_PLUS_1, RADIUS_LARGE, CORNER_BOTTOM); //round diff --git a/src/gui/widget/buttons.h b/src/gui/widget/buttons.h index 245bfbd1a..0a2d9dfd7 100644 --- a/src/gui/widget/buttons.h +++ b/src/gui/widget/buttons.h @@ -43,7 +43,7 @@ int paintButtons( const int &x, bool vertical_paint = false, const unsigned char fcolor = COL_INFOBAR_SHADOW, const char * alt_buttontext = NULL, - const uint &buttontext_id = 0); - - + const uint &buttontext_id = 0, + bool show = true); + #endif /* __gui_widget_buttons_h__ */