From 7c6bb72e75e62777d6af046e46c817632beda902 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Sun, 14 Aug 2016 20:56:41 +0200 Subject: [PATCH 1/3] cc_frm_button: don't use frames per default and align fontsize to familiar size Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/fa27f87bb13c99d989041b4a57e14f1ac925831d Author: vanhofen Date: 2016-08-14 (Sun, 14 Aug 2016) Origin message was: ------------------ - cc_frm_button: don't use frames per default and align fontsize to familiar size ------------------ This commit was generated by Migit --- src/gui/components/cc_frm_button.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/components/cc_frm_button.cpp b/src/gui/components/cc_frm_button.cpp index ee7b4a23d..da7a575d8 100644 --- a/src/gui/components/cc_frm_button.cpp +++ b/src/gui/components/cc_frm_button.cpp @@ -110,7 +110,7 @@ void CComponentsButton::initVarButton( const int& x_pos, const int& y_pos, const cc_item_enabled = enabled; cc_item_selected = selected; - fr_thickness = 3; //TODO: parts of the GUI still don't use framed buttons + fr_thickness = 0; //TODO: parts of the GUI still don't use framed buttons append_x_offset = 6; append_y_offset = 0; corner_rad = 0; @@ -192,7 +192,7 @@ void CComponentsButton::initCaption() x_cap += cc_btn_icon_obj ? cc_btn_icon_obj->getWidth() : 0; int w_cap = width - fr_thickness - append_x_offset - x_cap - fr_thickness; - int h_cap = height*85/100/* - 2*fr_thickness*/; + int h_cap = height*65/100 /*- 2*fr_thickness*/; /*NOTE: paint of centered text in y direction without y_offset From 1ea580bc2823b8bced4ae5c698b0c348dafec771 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Sun, 14 Aug 2016 20:59:29 +0200 Subject: [PATCH 2/3] bouqueteditor: reduce paintButtons calls to cc_frm_buttons default Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/fe01996d2b16fb752cd211e7818d8a94a218d5d6 Author: vanhofen Date: 2016-08-14 (Sun, 14 Aug 2016) Origin message was: ------------------ - bouqueteditor: reduce paintButtons calls to cc_frm_buttons default ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/bedit/bouqueteditor_bouquets.cpp | 2 +- src/gui/bedit/bouqueteditor_channels.cpp | 2 +- src/gui/bedit/bouqueteditor_chanselect.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gui/bedit/bouqueteditor_bouquets.cpp b/src/gui/bedit/bouqueteditor_bouquets.cpp index 1853719f3..8326163df 100644 --- a/src/gui/bedit/bouqueteditor_bouquets.cpp +++ b/src/gui/bedit/bouqueteditor_bouquets.cpp @@ -147,7 +147,7 @@ const struct button_label CBEBouquetWidgetButtons[6] = void CBEBouquetWidget::paintFoot() { size_t numbuttons = sizeof(CBEBouquetWidgetButtons)/sizeof(CBEBouquetWidgetButtons[0]); - footer.paintButtons(x, y+height, width, ButtonHeight, numbuttons, CBEBouquetWidgetButtons, width/numbuttons-20, 0, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]); + footer.paintButtons(x, y+height, width, ButtonHeight, numbuttons, CBEBouquetWidgetButtons, width/numbuttons-20); } void CBEBouquetWidget::hide() diff --git a/src/gui/bedit/bouqueteditor_channels.cpp b/src/gui/bedit/bouqueteditor_channels.cpp index 5a62215da..88ae91ab2 100644 --- a/src/gui/bedit/bouqueteditor_channels.cpp +++ b/src/gui/bedit/bouqueteditor_channels.cpp @@ -190,7 +190,7 @@ const struct button_label CBEChannelWidgetButtons[6] = void CBEChannelWidget::paintFoot() { size_t numbuttons = sizeof(CBEChannelWidgetButtons)/sizeof(CBEChannelWidgetButtons[0]); - footer.paintButtons(x, y + (height-footerHeight), width, footerHeight, numbuttons, CBEChannelWidgetButtons, width/numbuttons-20, 0, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]); + footer.paintButtons(x, y + (height-footerHeight), width, footerHeight, numbuttons, CBEChannelWidgetButtons, width/numbuttons-20); } std::string CBEChannelWidget::getInfoText(int index) diff --git a/src/gui/bedit/bouqueteditor_chanselect.cpp b/src/gui/bedit/bouqueteditor_chanselect.cpp index 4f3923de9..2888bab7a 100644 --- a/src/gui/bedit/bouqueteditor_chanselect.cpp +++ b/src/gui/bedit/bouqueteditor_chanselect.cpp @@ -252,7 +252,7 @@ void CBEChannelSelectWidget::paintFoot() break; } - footer.paintButtons(x, y + (height-footerHeight), width, footerHeight, numbuttons, Button, width/numbuttons-20, 0, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]); + footer.paintButtons(x, y + (height-footerHeight), width, footerHeight, numbuttons, Button, width/numbuttons-20); } std::string CBEChannelSelectWidget::getInfoText(int index) From 16437048cfb1fd51a3e411f0b24f4efb2ff0f17f Mon Sep 17 00:00:00 2001 From: vanhofen Date: Sun, 14 Aug 2016 21:11:08 +0200 Subject: [PATCH 3/3] upnpbrowser: reduce paintButtons calls to cc_frm_buttons default remove obsolete setColorBody() call Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/55b79d26a35e376d263a199107c441040da84d26 Author: vanhofen Date: 2016-08-14 (Sun, 14 Aug 2016) Origin message was: ------------------ - upnpbrowser: reduce paintButtons calls to cc_frm_buttons default remove obsolete setColorBody() call ------------------ This commit was generated by Migit --- src/gui/upnpbrowser.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/gui/upnpbrowser.cpp b/src/gui/upnpbrowser.cpp index 73ee2a79e..12583e2ca 100644 --- a/src/gui/upnpbrowser.cpp +++ b/src/gui/upnpbrowser.cpp @@ -114,7 +114,6 @@ void CUpnpBrowserGui::Init() 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 - footer.setColorBody(COL_INFOBAR_SHADOW_PLUS_1); footer.setHeight(m_buttonHeight); m_x=getScreenStartX(m_width); @@ -975,7 +974,7 @@ void CUpnpBrowserGui::paintDevices() // Foot top = m_y + (m_height - m_info_height - 2 * m_buttonHeight); - footer.paintButtons(m_x, top, m_width, m_buttonHeight, 1, &RescanButton, m_width/2, 0, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]); + footer.paintButtons(m_x, top, m_width, m_buttonHeight, 1, &RescanButton, m_width/2); paintItem2DetailsLine (-1); // clear it } @@ -1153,7 +1152,7 @@ printf("CUpnpBrowserGui::paintItem:s selected %d max %d offset %d\n", selected, // Foot buttons top = m_y + (m_height - m_info_height - 2 * m_buttonHeight); size_t numbuttons = sizeof(BrowseButtons)/sizeof(BrowseButtons[0]); - footer.paintButtons(m_x, top, m_width, m_buttonHeight, numbuttons, BrowseButtons, m_width/numbuttons, 0, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]); + footer.paintButtons(m_x, top, m_width, m_buttonHeight, numbuttons, BrowseButtons, m_width/numbuttons); } void CUpnpBrowserGui::paintDetails(UPnPEntry *entry, bool use_playing)