From ce494cbd383f9a07b839913bfda9f79315a91f7e Mon Sep 17 00:00:00 2001 From: vanhofen Date: Mon, 24 Apr 2017 12:29:52 +0200 Subject: [PATCH 01/11] scrollbars: avoid usage of COL_SCROLLBAR_PASSIVE_PLUS_0 ... ... outside of CComponentsScrollBar(). Since the color-changes in 9c8c262 the non-CC scrollbars looks weird. Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/fe5f84c1d08b194267b6ff11b74b8b3dca0facd7 Author: vanhofen Date: 2017-04-24 (Mon, 24 Apr 2017) Origin message was: ------------------ - scrollbars: avoid usage of COL_SCROLLBAR_PASSIVE_PLUS_0 ... ... outside of CComponentsScrollBar(). Since the color-changes in 9c8c262 the non-CC scrollbars looks weird. --- src/gui/audioplayer.cpp | 2 +- src/gui/bedit/bouqueteditor_bouquets.cpp | 2 +- src/gui/bedit/bouqueteditor_channels.cpp | 2 +- src/gui/bookmarkmanager.cpp | 2 +- src/gui/channellist.cpp | 2 +- src/gui/epgview.cpp | 2 +- src/gui/eventlist.cpp | 2 +- src/gui/filebrowser.cpp | 2 +- src/gui/pictureviewer.cpp | 2 +- src/gui/timerlist.cpp | 2 +- src/gui/upnpbrowser.cpp | 4 ++-- src/gui/widget/listbox.cpp | 2 +- src/gui/widget/listframe.cpp | 2 +- src/gui/widget/textbox.cpp | 2 +- 14 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/gui/audioplayer.cpp b/src/gui/audioplayer.cpp index 673c8103c..a95fbcdfa 100644 --- a/src/gui/audioplayer.cpp +++ b/src/gui/audioplayer.cpp @@ -1766,7 +1766,7 @@ void CAudioPlayerGui::paint() int ypos = m_y + m_title_height + m_theight; int sb = m_fheight * m_listmaxshow; - m_frameBuffer->paintBoxRel(m_x + m_width - 15, ypos, 15, sb, COL_SCROLLBAR_PASSIVE_PLUS_0); + m_frameBuffer->paintBoxRel(m_x + m_width - 15, ypos, 15, sb, COL_SCROLLBAR_PLUS_0); int sbc = ((m_playlist.size() - 1) / tmp_max) + 1; int sbs = (m_selected / tmp_max); diff --git a/src/gui/bedit/bouqueteditor_bouquets.cpp b/src/gui/bedit/bouqueteditor_bouquets.cpp index 5e2e348c8..0109fd340 100644 --- a/src/gui/bedit/bouqueteditor_bouquets.cpp +++ b/src/gui/bedit/bouqueteditor_bouquets.cpp @@ -127,7 +127,7 @@ void CBEBouquetWidget::paint() int ypos = y+ theight; int sb = iheight* listmaxshow; - frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_SCROLLBAR_PASSIVE_PLUS_0); + frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_SCROLLBAR_PLUS_0); int sbc= ((Bouquets->size()- 1)/ listmaxshow)+ 1; int sbs= (selected/listmaxshow); diff --git a/src/gui/bedit/bouqueteditor_channels.cpp b/src/gui/bedit/bouqueteditor_channels.cpp index 2c87de088..97a65de4c 100644 --- a/src/gui/bedit/bouqueteditor_channels.cpp +++ b/src/gui/bedit/bouqueteditor_channels.cpp @@ -161,7 +161,7 @@ void CBEChannelWidget::paint() int ypos = y+ theight; int sb = iheight* listmaxshow; - frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_SCROLLBAR_PASSIVE_PLUS_0); + frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_SCROLLBAR_PLUS_0); int sbc= ((Channels->size()- 1)/ listmaxshow)+ 1; if (sbc < 1) diff --git a/src/gui/bookmarkmanager.cpp b/src/gui/bookmarkmanager.cpp index f88736107..f91b47469 100644 --- a/src/gui/bookmarkmanager.cpp +++ b/src/gui/bookmarkmanager.cpp @@ -459,7 +459,7 @@ void CBookmarkManager::paint() { int ypos = y+ theight; int sb = 2*fheight* listmaxshow; - frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_SCROLLBAR_PASSIVE_PLUS_0); + frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_SCROLLBAR_PLUS_0); unsigned int tmp_max = listmaxshow; if(!tmp_max) tmp_max = 1; diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index 680e09724..edc0e8bab 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -2203,7 +2203,7 @@ void CChannelList::paintBody() const int ypos = y+ theight; const int sb = height - theight - footerHeight; // paint scrollbar over full height of main box - frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_SCROLLBAR_PASSIVE_PLUS_0); + frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_SCROLLBAR_PLUS_0); unsigned int listmaxshow_tmp = listmaxshow ? listmaxshow : 1;//avoid division by zero int sbc= (((*chanlist).size()- 1)/ listmaxshow_tmp)+ 1; const int sbs= (selected/listmaxshow_tmp); diff --git a/src/gui/epgview.cpp b/src/gui/epgview.cpp index 078da34ae..bf6658969 100644 --- a/src/gui/epgview.cpp +++ b/src/gui/epgview.cpp @@ -327,7 +327,7 @@ void CEpgData::showText(int startPos, int ypos, bool has_cover, bool fullClear) int sbs= (startPos+ 1)/ medlinecount; if (sbc < 1) sbc = 1; - frameBuffer->paintBoxRel(sx+ ox- 15, ypos, 15, sb, COL_SCROLLBAR_PASSIVE_PLUS_0); // scrollbar bg + frameBuffer->paintBoxRel(sx+ ox- 15, ypos, 15, sb, COL_SCROLLBAR_PLUS_0); // scrollbar bg frameBuffer->paintBoxRel(sx+ ox- 13, ypos+ 2+ sbs*(sb-4)/sbc , 11, (sb-4)/sbc, COL_SCROLLBAR_ACTIVE_PLUS_0); // scrollbar } diff --git a/src/gui/eventlist.cpp b/src/gui/eventlist.cpp index f8209f6d5..2c1a859d7 100644 --- a/src/gui/eventlist.cpp +++ b/src/gui/eventlist.cpp @@ -920,7 +920,7 @@ void CEventList::paint(t_channel_id channel_id) int ypos = y+ theight; int sb = fheight* listmaxshow; - frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_SCROLLBAR_PASSIVE_PLUS_0); + frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_SCROLLBAR_PLUS_0); int sbc= ((evtlist.size()- 1)/ listmaxshow)+ 1; int sbs= (selected/listmaxshow); diff --git a/src/gui/filebrowser.cpp b/src/gui/filebrowser.cpp index 7ecdcf00e..d1f725fcf 100644 --- a/src/gui/filebrowser.cpp +++ b/src/gui/filebrowser.cpp @@ -1454,7 +1454,7 @@ void CFileBrowser::paint() //scrollbar int ypos = y+ theight; int sb = fheight* listmaxshow; - frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_SCROLLBAR_PASSIVE_PLUS_0); + frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_SCROLLBAR_PLUS_0); int sbc= ((filelist.size()- 1)/ listmaxshow)+ 1; int sbs= (selected/listmaxshow); diff --git a/src/gui/pictureviewer.cpp b/src/gui/pictureviewer.cpp index 97e335fa1..1dc102dca 100644 --- a/src/gui/pictureviewer.cpp +++ b/src/gui/pictureviewer.cpp @@ -750,7 +750,7 @@ void CPictureViewerGui::paint() int ypos = y+ theight; int sb = fheight* listmaxshow; - frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_SCROLLBAR_PASSIVE_PLUS_0); + frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_SCROLLBAR_PLUS_0); unsigned int tmp_max = listmaxshow; if(!tmp_max) diff --git a/src/gui/timerlist.cpp b/src/gui/timerlist.cpp index 145360ee8..fa7e7467e 100644 --- a/src/gui/timerlist.cpp +++ b/src/gui/timerlist.cpp @@ -1427,7 +1427,7 @@ void CTimerList::paint() { int ypos = y+ theight; int sb = 2*fheight* listmaxshow; - frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_SCROLLBAR_PASSIVE_PLUS_0); + frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_SCROLLBAR_PLUS_0); unsigned int tmp_max = listmaxshow; if (!tmp_max) tmp_max = 1; diff --git a/src/gui/upnpbrowser.cpp b/src/gui/upnpbrowser.cpp index b407d7924..9b6bf89b1 100644 --- a/src/gui/upnpbrowser.cpp +++ b/src/gui/upnpbrowser.cpp @@ -1000,7 +1000,7 @@ void CUpnpBrowserGui::paintDevices() paintDevice(count); int sb = m_item_height * m_listmaxshow; - m_frameBuffer->paintBoxRel(m_x + m_width - 15, m_item_y, 15, sb, COL_SCROLLBAR_PASSIVE_PLUS_0); + m_frameBuffer->paintBoxRel(m_x + m_width - 15, m_item_y, 15, sb, COL_SCROLLBAR_PLUS_0); unsigned int tmp_max = m_listmaxshow; if(!tmp_max) tmp_max = 1; @@ -1179,7 +1179,7 @@ void CUpnpBrowserGui::paintItems(std::vector *entry, unsigned int sel paintItem(entry, count, selected); int sb = m_item_height * m_listmaxshow; - m_frameBuffer->paintBoxRel(m_x + m_width - 15, m_item_y, 15, sb, COL_SCROLLBAR_PASSIVE_PLUS_0); + m_frameBuffer->paintBoxRel(m_x + m_width - 15, m_item_y, 15, sb, COL_SCROLLBAR_PLUS_0); unsigned int tmp = m_listmaxshow ? m_listmaxshow : 1;//avoid division by zero int sbc = ((max + offset - 1) / tmp) + 1; int sbs = ((selected + offset) / tmp); diff --git a/src/gui/widget/listbox.cpp b/src/gui/widget/listbox.cpp index 6443e028f..1edcc681f 100644 --- a/src/gui/widget/listbox.cpp +++ b/src/gui/widget/listbox.cpp @@ -69,7 +69,7 @@ void CListBox::paint() int ypos = y+ theight; int sb = fheight* listmaxshow; - frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_SCROLLBAR_PASSIVE_PLUS_0); + frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_SCROLLBAR_PLUS_0); int sbc= ((getItemCount()- 1)/ listmaxshow)+ 1; if (sbc < 1) diff --git a/src/gui/widget/listframe.cpp b/src/gui/widget/listframe.cpp index 3d17d46fb..33f76ea43 100644 --- a/src/gui/widget/listframe.cpp +++ b/src/gui/widget/listframe.cpp @@ -385,7 +385,7 @@ void CListFrame::refreshScroll(void) if (m_nNrOfPages > 1) { frameBuffer->paintBoxRel(m_cFrameScrollRel.iX+m_cFrame.iX, m_cFrameScrollRel.iY+m_cFrame.iY, - m_cFrameScrollRel.iWidth, m_cFrameScrollRel.iHeight, COL_SCROLLBAR_PASSIVE_PLUS_0, RADIUS_MIN); + m_cFrameScrollRel.iWidth, m_cFrameScrollRel.iHeight, COL_SCROLLBAR_PLUS_0, RADIUS_MIN); unsigned int marker_size = (m_cFrameScrollRel.iHeight - 2*OFFSET_INNER_MIN) / m_nNrOfPages; frameBuffer->paintBoxRel(m_cFrameScrollRel.iX + OFFSET_INNER_MIN+m_cFrame.iX, m_cFrameScrollRel.iY + OFFSET_INNER_MIN + m_nCurrentPage * marker_size +m_cFrame.iY, diff --git a/src/gui/widget/textbox.cpp b/src/gui/widget/textbox.cpp index 82195ae5a..34b0a941e 100644 --- a/src/gui/widget/textbox.cpp +++ b/src/gui/widget/textbox.cpp @@ -527,7 +527,7 @@ void CTextBox::refreshScroll(void) { frameBuffer->paintBoxRel(m_cFrameScrollRel.iX+m_cFrame.iX, m_cFrameScrollRel.iY+m_cFrame.iY, m_cFrameScrollRel.iWidth, m_cFrameScrollRel.iHeight, - COL_SCROLLBAR_PASSIVE_PLUS_0, RADIUS_MIN); + COL_SCROLLBAR_PLUS_0, RADIUS_MIN); unsigned int marker_size = (m_cFrameScrollRel.iHeight - 2*SCROLL_MARKER_BORDER) / m_nNrOfPages; frameBuffer->paintBoxRel(m_cFrameScrollRel.iX + SCROLL_MARKER_BORDER + m_cFrame.iX, m_cFrameScrollRel.iY + SCROLL_MARKER_BORDER + m_nCurrentPage * marker_size + m_cFrame.iY, From 3059a4b6d9011d7d0737c7df3749d871eb5ed51a Mon Sep 17 00:00:00 2001 From: Michael Liebmann Date: Mon, 24 Apr 2017 22:30:13 +0200 Subject: [PATCH 02/11] lib/libtuxtxt/Makefile.am: Fix FREETYPE_CFLAGS Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/6a08685b57c474ba35a958e8e3066c0455f36529 Author: Michael Liebmann Date: 2017-04-24 (Mon, 24 Apr 2017) --- lib/libtuxtxt/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libtuxtxt/Makefile.am b/lib/libtuxtxt/Makefile.am index f3dc7d972..537cb307c 100644 --- a/lib/libtuxtxt/Makefile.am +++ b/lib/libtuxtxt/Makefile.am @@ -5,7 +5,7 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/lib/libconfigfile \ -I$(top_srcdir)/src \ -I$(top_srcdir)/src/zapit/include \ - $(FREETYPE_CFLAGS) \ + @FREETYPE_CFLAGS@ \ @SIGC_CFLAGS@ \ @HWLIB_CFLAGS@ From 61ab5b55b94894d7bfae43764f3aecbcfb7f5e5d Mon Sep 17 00:00:00 2001 From: Michael Liebmann Date: Mon, 24 Apr 2017 22:31:00 +0200 Subject: [PATCH 03/11] src/zapit/src/femanager.cpp: Fix compile error Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/aaa7b41d0b1cfd737aa6cb44b752b84b011714e3 Author: Michael Liebmann Date: 2017-04-24 (Mon, 24 Apr 2017) --- src/zapit/src/femanager.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/zapit/src/femanager.cpp b/src/zapit/src/femanager.cpp index 5364a64b8..7987eb5a0 100644 --- a/src/zapit/src/femanager.cpp +++ b/src/zapit/src/femanager.cpp @@ -371,7 +371,9 @@ void CFEManager::saveSettings(bool write) void CFEManager::copySettings(CFrontend * from, CFrontend * to) { INFO("Copy settings fe %d -> fe %d", from->fenumber, to->fenumber); - if (to->config.diseqcType != DISEQC_UNICABLE || to->config.diseqcType != DISEQC_UNICABLE2 || to->getMode() == CFrontend::FE_MODE_LINK_LOOP) + if ((to->config.diseqcType != DISEQC_UNICABLE && + to->config.diseqcType != DISEQC_UNICABLE2) || + to->getMode() == CFrontend::FE_MODE_LINK_LOOP) to->config.diseqcType = from->config.diseqcType; to->config.diseqcRepeats = from->config.diseqcRepeats; From 0093ff1d3ca23bd1cfea31ea4da92aefeae973bb Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Mon, 24 Apr 2017 08:00:36 +0200 Subject: [PATCH 04/11] CComponentsHeader: unifiy init value for logo align Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/220829ffaa7fcbff0f6810284fb48c7f9154ad25 Author: Thilo Graf Date: 2017-04-24 (Mon, 24 Apr 2017) --- src/gui/components/cc_frm_header.cpp | 2 +- src/gui/components/cc_frm_header.h | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gui/components/cc_frm_header.cpp b/src/gui/components/cc_frm_header.cpp index 9161a0fe3..770c643de 100644 --- a/src/gui/components/cc_frm_header.cpp +++ b/src/gui/components/cc_frm_header.cpp @@ -128,7 +128,7 @@ void CComponentsHeader::initVarHeader( const int& x_pos, const int& y_pos, const cch_logo.Id = 0; cch_logo.Name = ""; cch_logo.dy_max = -1; - cch_logo.Align = CC_LOGO_RIGHT; + cch_logo.Align = DEFAULT_LOGO_ALIGN; cch_col_text = COL_MENUHEAD_TEXT; cch_caption_align = CTextBox::NO_AUTO_LINEBREAK; cch_items_y = CC_CENTERED; diff --git a/src/gui/components/cc_frm_header.h b/src/gui/components/cc_frm_header.h index 1a0f1c8d4..a525a3ecc 100644 --- a/src/gui/components/cc_frm_header.h +++ b/src/gui/components/cc_frm_header.h @@ -32,6 +32,8 @@ #include "cc_frm_clock.h" #include +#define DEFAULT_LOGO_ALIGN CComponentsHeader::CC_LOGO_CENTER + //! Sub class of CComponentsForm. Shows a header with prepared items. /*! CComponentsHeader provides prepared items like icon, caption and context button icons, mostly for usage in menues or simple windows @@ -320,7 +322,7 @@ class CComponentsHeader : public CComponentsForm, public CCTextScreen */ void setChannelLogo( const uint64_t& channelId, const std::string& channelName, - cc_logo_alignment_t alignment = CC_LOGO_CENTER, + cc_logo_alignment_t alignment = DEFAULT_LOGO_ALIGN, const int& dy = -1) {cch_logo.Id = channelId; cch_logo.Name = channelName, cch_logo.Align = alignment, cch_logo.dy_max = dy; initCCItems();} /**Methode to get channel logo object for direct access to its properties and methodes From 53e30f46759672df964bef8969b043df4a6c0282 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Mon, 24 Apr 2017 08:30:52 +0200 Subject: [PATCH 05/11] EpgPlus: simplify calls of logo attributes and logo instance Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/7b19ea1fd1a9ff689c8c42cf4731f9d8319b7b8e Author: Thilo Graf Date: 2017-04-24 (Mon, 24 Apr 2017) --- src/gui/epgplus.cpp | 19 +++++++++++-------- src/gui/epgplus.h | 2 ++ 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/gui/epgplus.cpp b/src/gui/epgplus.cpp index 7ebf586db..c8db47377 100644 --- a/src/gui/epgplus.cpp +++ b/src/gui/epgplus.cpp @@ -111,20 +111,23 @@ void EpgPlus::Header::paint(const char * Name) std::string caption = Name ? Name : g_Locale->getText(LOCALE_EPGPLUS_HEAD); if (this->head == NULL) + { this->head = new CComponentsHeader(); + this->head->setContextButton(CComponentsHeader::CC_BTN_HELP); + this->head->enableClock(true, "%H:%M", "%H %M", true); + } if (this->head) { if (g_settings.channellist_show_channellogo) { // ensure to have clean background - this->head->getChannelLogoObject()->hide(); - this->head->getChannelLogoObject()->allowPaint(false); + this->logo = this->head->getChannelLogoObject(); + this->logo->hide(); + this->logo->allowPaint(false); } this->head->setDimensionsAll(this->x, this->y, this->width, this->font->getHeight()); this->head->setCaption(caption, CTextBox::NO_AUTO_LINEBREAK); - this->head->setContextButton(CComponentsHeader::CC_BTN_HELP); - this->head->enableClock(true, "%H:%M", "%H %M", true); this->head->paint(CC_SAVE_SCREEN_NO); } } @@ -136,14 +139,14 @@ void EpgPlus::Header::paintChannelLogo(const CZapitChannel * Channel) if (this->head) { - this->head->getChannelLogoObject()->hide(); - this->head->getChannelLogoObject()->clearSavedScreen(); + this->logo->hide(); + this->logo->clearSavedScreen(); if (Channel) { this->head->setChannelLogo(Channel->getChannelID(), Channel->getName()); } - this->head->getChannelLogoObject()->allowPaint(true); - this->head->getChannelLogoObject()->paint(); + this->logo->allowPaint(true); + this->logo->paint(); } } diff --git a/src/gui/epgplus.h b/src/gui/epgplus.h index f5a0ee65f..b317e6f82 100644 --- a/src/gui/epgplus.h +++ b/src/gui/epgplus.h @@ -69,6 +69,8 @@ class EpgPlus class Header { + private: + CComponentsChannelLogoScalable *logo; //// construction / destruction public: Header(CFrameBuffer* frameBuffer, From f8e84e713701cf14816b5695a40caf073f81d4c6 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Mon, 24 Apr 2017 11:21:46 +0200 Subject: [PATCH 06/11] COsdSetup: reset channellist objects after changed window size Ensures complete reinit of relevent modules inside channellist instance. Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/4de8c61c043a7c0ddf5ce195aa14e096a208fbf1 Author: Thilo Graf Date: 2017-04-24 (Mon, 24 Apr 2017) --- src/gui/osd_setup.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gui/osd_setup.cpp b/src/gui/osd_setup.cpp index 60cd9ebfc..f2ec1473e 100644 --- a/src/gui/osd_setup.cpp +++ b/src/gui/osd_setup.cpp @@ -314,6 +314,7 @@ int COsdSetup::exec(CMenuTarget* parent, const std::string &actionKey) memset(window_size_value, 0, sizeof(window_size_value)); snprintf(window_size_value, sizeof(window_size_value), "%d / %d", g_settings.window_width, g_settings.window_height); mfWindowSize->setOption(window_size_value); + CNeutrinoApp::getInstance()->channelList->ResetModules(); break; } else if ((msg == CRCInput::RC_home) || (msg == CRCInput::RC_timeout)) { g_settings.window_width = old_window_width; From 19c0fa0a3907aa5d5e90be63f94de1f22856a89d Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Tue, 11 Apr 2017 07:35:31 +0200 Subject: [PATCH 07/11] EpgPlus: update license text Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/8e3390687c5633aeafea05dab21a3ac7cba2ae54 Author: Thilo Graf Date: 2017-04-11 (Tue, 11 Apr 2017) --- src/gui/epgplus.cpp | 3 +-- src/gui/epgplus.h | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/gui/epgplus.cpp b/src/gui/epgplus.cpp index c8db47377..e945d32ee 100644 --- a/src/gui/epgplus.cpp +++ b/src/gui/epgplus.cpp @@ -19,8 +19,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + along with this program. If not, see . */ #ifdef HAVE_CONFIG_H diff --git a/src/gui/epgplus.h b/src/gui/epgplus.h index b317e6f82..d0dc7286d 100644 --- a/src/gui/epgplus.h +++ b/src/gui/epgplus.h @@ -18,8 +18,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + along with this program. If not, see . */ #ifndef __epgplus__ From e1d1338c0ad6045102be5f3ec785cfad10ab28c6 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Tue, 25 Apr 2017 09:55:51 +0200 Subject: [PATCH 08/11] CProgressBar: add own position methodes NOTE: not required in branch pu/fb-setmode, remove this after merge! Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/cffab5f8f963fda235e98e389e9cbf363dabefd1 Author: Thilo Graf Date: 2017-04-25 (Tue, 25 Apr 2017) --- src/gui/components/cc_item_progressbar.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gui/components/cc_item_progressbar.h b/src/gui/components/cc_item_progressbar.h index 610402687..b158bd49e 100644 --- a/src/gui/components/cc_item_progressbar.h +++ b/src/gui/components/cc_item_progressbar.h @@ -157,6 +157,9 @@ class CProgressBar : public CComponentsItem //set gradient (overides g_settings.theme.progressbar_gradient) void setGradient(int &gradient) { pb_gradient = &gradient; } + + void setXPos(const int& xpos){CCDraw::setXPos(xpos);} + void setYPos(const int& ypos){CCDraw::setYPos(ypos);} }; #endif /* __CC_PROGRESSBAR_H__ */ From beac8c69aaebbc7f0f7cc83d4c7cb486a4e252e4 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Tue, 25 Apr 2017 11:21:44 +0200 Subject: [PATCH 09/11] CComponentsPicture: add methode to get real image size Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/0aae491cccad8d5efb424c4b051f427ea4e3f455 Author: Thilo Graf Date: 2017-04-25 (Tue, 25 Apr 2017) --- src/gui/components/cc_item_picture.cpp | 22 +++++++++++++++------- src/gui/components/cc_item_picture.h | 9 +++++---- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/src/gui/components/cc_item_picture.cpp b/src/gui/components/cc_item_picture.cpp index 91841c071..c776dfcb6 100644 --- a/src/gui/components/cc_item_picture.cpp +++ b/src/gui/components/cc_item_picture.cpp @@ -76,6 +76,7 @@ void CComponentsPicture::init( const int &x_pos, const int &y_pos, const int &w, y = y_old = y_pos; width = width_old = dx = dxc = w; height = height_old = dy = dyc = h; + dx_orig = dy_orig = 0; pic_name = pic_name_old = image_name; shadow = shadow_mode; shadow_w = OFFSET_SHADOW; @@ -201,6 +202,9 @@ void CComponentsPicture::initCCItem() if (height == 0) height = dy_tmp; } + dx_orig = width; + dy_orig = height; + /* leave init methode here if we in no scale mode * otherwise goto next step! */ @@ -211,8 +215,12 @@ void CComponentsPicture::initCCItem() * check internal dimension values (dx/dy) and ensure that values are >0 * real image size */ - if ((dx != width || dy != height) || (dx == 0 || dy == 0)) - g_PicViewer->getSize(pic_name.c_str(), &dx, &dy); + g_PicViewer->getSize(pic_name.c_str(), &dx_orig, &dy_orig); + if ((dx != width || dy != height) || (dx == 0 || dy == 0)){ + dx = dx_orig; + dy = dy_orig; + //g_PicViewer->getSize(pic_name.c_str(), &dx, &dy); + } } /* on next step check item dimensions (width/height) for 0 values @@ -269,11 +277,11 @@ void CComponentsPicture::initPosition(int *x_position, int *y_position) } -// void CComponentsPicture::getSize(int* width_image, int *height_image) -// { -// *width_image = width; -// *height_image = height; -// } +void CComponentsPicture::getRealSize(int* dx_original, int *dy_original) +{ + *dx_original = dx_orig; + *dy_original = dy_orig; +} int CComponentsPicture::getWidth() { diff --git a/src/gui/components/cc_item_picture.h b/src/gui/components/cc_item_picture.h index 7bf8953d0..ef8204d55 100644 --- a/src/gui/components/cc_item_picture.h +++ b/src/gui/components/cc_item_picture.h @@ -54,9 +54,10 @@ class CComponentsPicture : public CComponentsItem ///screen cache content for painted image fb_pixel_t *image_cache; - ///current original image dimensions + ///current image dimensions int dx, dy; - + ///original image dimensions + int dx_orig, dy_orig; ///cached image dimensions int dxc, dyc; @@ -146,8 +147,8 @@ class CComponentsPicture : public CComponentsItem ///returns current assigned image name std::string getPictureName(){return pic_name;} -// ///handle image size -// void getSize(int* width_image, int *height_image); + ///get original image size + void getRealSize(int* dx_orig, int *dy_orig); ///return width of item int getWidth(); ///return height of item From 35f867b611c4c2da22582890a103c43f58b46232 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Tue, 25 Apr 2017 11:31:53 +0200 Subject: [PATCH 10/11] CComponentsHeader: optimize auto size mode for logos With very large font size settings it is possible that header is too large for reasonable display of logos, because of possible bad upscale effects (eg. step effects). So it seems it's better to use original size as largest possible size. Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/76cd93555db7043a8442727f5f2fcba50ddde36d Author: Thilo Graf Date: 2017-04-25 (Tue, 25 Apr 2017) --- src/gui/components/cc_frm_header.cpp | 8 ++++++++ src/gui/components/cc_frm_header.h | 1 + 2 files changed, 9 insertions(+) diff --git a/src/gui/components/cc_frm_header.cpp b/src/gui/components/cc_frm_header.cpp index 770c643de..0d5207d3b 100644 --- a/src/gui/components/cc_frm_header.cpp +++ b/src/gui/components/cc_frm_header.cpp @@ -281,6 +281,14 @@ void CComponentsHeader::initLogo() else cch_logo_obj->setChannel(cch_logo.Id, cch_logo.Name); + //ensure logo is not larger than original size if in auto mode + if (cch_logo.dy_max == -1){ + int dx_orig = 0, dy_orig = 0 ; + cch_logo_obj->getRealSize(&dx_orig, &dy_orig); + if (cch_logo.dy_max > dy_orig) + cch_logo.dy_max = dy_orig; + } + if (cch_logo_obj->hasLogo()){ cch_logo_obj->setHeight(cch_logo.dy_max, true); diff --git a/src/gui/components/cc_frm_header.h b/src/gui/components/cc_frm_header.h index a525a3ecc..320c59282 100644 --- a/src/gui/components/cc_frm_header.h +++ b/src/gui/components/cc_frm_header.h @@ -319,6 +319,7 @@ class CComponentsHeader : public CComponentsForm, public CCTextScreen * CC_LOGO_RIGHT \n * @param[in] dy * @li optional logo height, default = -1 (auto) + * @note In auto mode, logo use full height minus inner offset but not larger than original logo height. */ void setChannelLogo( const uint64_t& channelId, const std::string& channelName, From 9a6fed158c4be78667d8a3cf84ac03ecd5e16fb8 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Tue, 25 Apr 2017 16:38:47 +0200 Subject: [PATCH 11/11] fix logo position with clock Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/b696007ec8d0ecb624cfbd9a31583cdc549f393e Author: Jacek Jendrzej Date: 2017-04-25 (Tue, 25 Apr 2017) --- src/gui/components/cc_frm_header.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gui/components/cc_frm_header.cpp b/src/gui/components/cc_frm_header.cpp index 0d5207d3b..2c1d45f14 100644 --- a/src/gui/components/cc_frm_header.cpp +++ b/src/gui/components/cc_frm_header.cpp @@ -299,6 +299,7 @@ void CComponentsHeader::initLogo() //right end int x_logo_right = getCCItem(next_id) ? getCCItem(next_id)->getXPos() - cch_logo_obj->getWidth() : width - cch_logo_obj->getWidth()-OFFSET_INNER_MID; + x_logo_right -= cch_cl_enable ? cch_cl_obj->getWidth() : 0; //left end int x_logo_left = getCCItem(prev_id) ? getCCItem(prev_id)->getXPos() + getCCItem(prev_id)->getWidth() : 0;