From fc6d74af97125367b6b56f204e21d30b2b8f5d7a Mon Sep 17 00:00:00 2001 From: vanhofen Date: Mon, 15 Aug 2016 19:32:46 +0200 Subject: [PATCH 1/2] cc_item_text: avoid using INFOBAR_SMALL font; use MENU_INFO instead it's a small font too Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/c35414bc56193c767c069c40e044c5ee1ac70f81 Author: vanhofen Date: 2016-08-15 (Mon, 15 Aug 2016) Origin message was: ------------------ - cc_item_text: avoid using INFOBAR_SMALL font; use MENU_INFO instead it's a small font too --- src/gui/components/cc_extra.h | 2 +- src/gui/components/cc_item_text.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/components/cc_extra.h b/src/gui/components/cc_extra.h index f63b75a75..09e92d013 100644 --- a/src/gui/components/cc_extra.h +++ b/src/gui/components/cc_extra.h @@ -139,7 +139,7 @@ bool paintBoxRel0( const int& x, * @param[in] y position * @param[in] dx witdh * @param[in] dy height -* @param[in] *font pointer to font type object, default = NULL, sets g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL] as default font +* @param[in] *font pointer to font type object, default = NULL, sets g_Font[SNeutrinoSettings::FONT_TYPE_MENU_INFO] as default font * @param[in] color_body color of box, default = COL_MENUCONTENT_PLUS_0 * @param[in] font_style font style * @li CComponentsText::FONT_STYLE_REGULAR (default) diff --git a/src/gui/components/cc_item_text.cpp b/src/gui/components/cc_item_text.cpp index 90a59d3f1..c851a49fa 100644 --- a/src/gui/components/cc_item_text.cpp +++ b/src/gui/components/cc_item_text.cpp @@ -118,7 +118,7 @@ void CComponentsText::initCCText() { //set default font, if is no font definied if (ct_font == NULL) - ct_font = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]; + ct_font = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_INFO]; //define height from font size height = max(height, ct_font->getHeight()); From a5939c02ac6b4870067a17d2cd6b40a93e19a5fe Mon Sep 17 00:00:00 2001 From: vanhofen Date: Mon, 15 Aug 2016 19:35:02 +0200 Subject: [PATCH 2/2] upnpbrowser: fix calculation of upper info box height Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/dc13d0ff28a40b9a4c908634aa5804b9a744d7be Author: vanhofen Date: 2016-08-15 (Mon, 15 Aug 2016) Origin message was: ------------------ - upnpbrowser: fix calculation of upper info box height --- src/gui/upnpbrowser.cpp | 4 ++-- src/gui/upnpbrowser.h | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/gui/upnpbrowser.cpp b/src/gui/upnpbrowser.cpp index ddb257f9f..be3f60adf 100644 --- a/src/gui/upnpbrowser.cpp +++ b/src/gui/upnpbrowser.cpp @@ -104,12 +104,12 @@ void CUpnpBrowserGui::Init() m_width = m_frameBuffer->getScreenWidthRel(); m_height = m_frameBuffer->getScreenHeightRel(); - m_sheight = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight(); + m_iheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_INFO]->getHeight(); m_theight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight(); m_buttonHeight = m_theight; m_mheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight(); m_fheight = g_Font[SNeutrinoSettings::FONT_TYPE_FILEBROWSER_ITEM]->getHeight(); - m_title_height = m_mheight*2 + 20 + m_sheight + 4; + m_title_height = m_iheight*3 + 20; // 3 lines + offset m_info_height = m_mheight*2; m_listmaxshow = (m_height - m_info_height - m_title_height - m_theight - 2*m_buttonHeight) / (m_fheight); m_height = m_theight + m_info_height + m_title_height + 2*m_buttonHeight + m_listmaxshow * m_fheight; // recalc height diff --git a/src/gui/upnpbrowser.h b/src/gui/upnpbrowser.h index 22870f406..c5ef41605 100644 --- a/src/gui/upnpbrowser.h +++ b/src/gui/upnpbrowser.h @@ -79,10 +79,10 @@ class CUpnpBrowserGui : public CMenuTarget, public CListHelpers unsigned int m_listmaxshow; unsigned int m_deviceliststart; unsigned int m_selecteddevice; - int m_fheight; // Fonthoehe Inhalt - int m_theight; // Fonthoehe Titel - int m_mheight; // Fonthoehe Info - int m_sheight; // Fonthoehe Status + int m_fheight; // items font height + int m_theight; // title font height + int m_mheight; // lower box font height + int m_iheight; // upper box font height int m_buttonHeight; int m_title_height; int m_info_height;