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@ diff --git a/src/gui/audioplayer.cpp b/src/gui/audioplayer.cpp index 05ff1961e..83bda84b1 100644 --- a/src/gui/audioplayer.cpp +++ b/src/gui/audioplayer.cpp @@ -1802,7 +1802,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 f18ff2334..9eca97c67 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -2232,7 +2232,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/components/cc_frm_header.cpp b/src/gui/components/cc_frm_header.cpp index 9161a0fe3..2c1d45f14 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; @@ -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); @@ -291,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; diff --git a/src/gui/components/cc_frm_header.h b/src/gui/components/cc_frm_header.h index 1a0f1c8d4..320c59282 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 @@ -317,10 +319,11 @@ 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, - 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 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 diff --git a/src/gui/components/cc_item_progressbar.h b/src/gui/components/cc_item_progressbar.h index 02d351c26..cb3af78b9 100644 --- a/src/gui/components/cc_item_progressbar.h +++ b/src/gui/components/cc_item_progressbar.h @@ -166,6 +166,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__ */ diff --git a/src/gui/epgplus.cpp b/src/gui/epgplus.cpp index bec6573d1..8c81fbd5c 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 @@ -111,20 +110,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 +138,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..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__ @@ -69,6 +68,8 @@ class EpgPlus class Header { + private: + CComponentsChannelLogoScalable *logo; //// construction / destruction public: Header(CFrameBuffer* frameBuffer, diff --git a/src/gui/epgview.cpp b/src/gui/epgview.cpp index de702fc62..7d42cdba8 100644 --- a/src/gui/epgview.cpp +++ b/src/gui/epgview.cpp @@ -367,7 +367,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 f766d06d0..6718680ed 100644 --- a/src/gui/eventlist.cpp +++ b/src/gui/eventlist.cpp @@ -928,7 +928,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/osd_setup.cpp b/src/gui/osd_setup.cpp index 7c0f2457b..0d8d66204 100644 --- a/src/gui/osd_setup.cpp +++ b/src/gui/osd_setup.cpp @@ -324,6 +324,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; diff --git a/src/gui/pictureviewer.cpp b/src/gui/pictureviewer.cpp index e1cccf611..b60e8efbb 100644 --- a/src/gui/pictureviewer.cpp +++ b/src/gui/pictureviewer.cpp @@ -761,7 +761,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 984775b5b..6bd04a6fb 100644 --- a/src/gui/timerlist.cpp +++ b/src/gui/timerlist.cpp @@ -1436,7 +1436,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 697006cb1..e44245404 100644 --- a/src/gui/upnpbrowser.cpp +++ b/src/gui/upnpbrowser.cpp @@ -1006,7 +1006,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; @@ -1185,7 +1185,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 05045212c..e78943e69 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 f37e3d257..23ed96132 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, 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;