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 b313ff6bc..91bd002d0 100644 --- a/src/gui/audioplayer.cpp +++ b/src/gui/audioplayer.cpp @@ -1803,7 +1803,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 9fade03d4..5be657afd 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; int sbs= (selected/listmaxshow); diff --git a/src/gui/bookmarkmanager.cpp b/src/gui/bookmarkmanager.cpp index 3c6aa9112..ab2369838 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 4da59c74b..80660531a 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -100,7 +100,6 @@ extern bool autoshift; static CComponentsPIP *cc_minitv = NULL; extern CBouquetManager *g_bouquetManager; extern int old_b_id; -static CComponentsChannelLogoScalable* CChannelLogo = NULL; static CComponentsHeader *header = NULL; extern bool timeset; @@ -130,7 +129,6 @@ CChannelList::CChannelList(const char * const pName, bool phistoryMode, bool _vl cc_minitv = NULL; logo_off = 0; minitv_is_active = false; - CChannelLogo = NULL; headerNew = true; bouquet = NULL; chanlist = &channels; @@ -974,11 +972,6 @@ void CChannelList::hide() } if(header) header->kill(); - if (CChannelLogo){ - CChannelLogo->kill(); - delete CChannelLogo; - CChannelLogo = NULL; - } frameBuffer->paintBackground(); //NI clear whole screen clearItem2DetailsLine(); @@ -2151,6 +2144,7 @@ void CChannelList::paintHead() } header->setDimensionsAll(x, y, full_width, theight); + header->setCorner(RADIUS_LARGE, CORNER_TOP); if (bouquet && bouquet->zapitBouquet && bouquet->zapitBouquet->bLocked != g_settings.parentallock_defaultlocked) header->setIcon(NEUTRINO_ICON_LOCK); @@ -2161,11 +2155,6 @@ void CChannelList::paintHead() header->setCaption(header_txt, CTextBox::NO_AUTO_LINEBREAK, header_txt_col); - if (header->enableColBodyGradient(g_settings.theme.menu_Head_gradient, COL_MENUCONTENT_PLUS_0)){ - if (CChannelLogo) - CChannelLogo->clearFbData(); - } - if (timeset) { if(!edit_state){ if (header->getContextBtnObject()) @@ -2191,6 +2180,8 @@ void CChannelList::paintHead() header->setChannelLogo((*chanlist)[selected]->getChannelID(), (*chanlist)[selected]->getName()); header->getChannelLogoObject()->allowPaint(false); } + else + header->setChannelLogo(0, string()); header->paint(CC_SAVE_SCREEN_NO); showChannelLogo(); } @@ -2212,10 +2203,6 @@ void CChannelList::ResetModules() delete cc_minitv; cc_minitv = NULL; } - if (CChannelLogo) { - delete CChannelLogo; - CChannelLogo = NULL; - } } void CChannelList::paintBody() @@ -2253,7 +2240,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/color.h b/src/gui/color.h index 013c3d2ee..fc005420b 100644 --- a/src/gui/color.h +++ b/src/gui/color.h @@ -124,19 +124,22 @@ #endif // some wrappers to get more readability -#define COL_FRAME COL_MENUCONTENT_PLUS_1 //NI -#define COL_FRAME_PLUS_0 COL_FRAME +#define COL_FRAME COL_MENUCONTENT_PLUS_1 //NI +#define COL_FRAME_PLUS_0 COL_FRAME -#define COL_SCROLLBAR COL_MENUCONTENT_PLUS_1 -#define COL_SCROLLBAR_ACTIVE COL_MENUCONTENT_PLUS_3 -#define COL_SCROLLBAR_ACTIVE_PLUS_0 COL_SCROLLBAR_ACTIVE -#define COL_SCROLLBAR_PASSIVE COL_MENUCONTENT_PLUS_2 -#define COL_SCROLLBAR_PASSIVE_PLUS_0 COL_SCROLLBAR_PASSIVE +#define COL_SCROLLBAR COL_MENUCONTENT_PLUS_1 +#define COL_SCROLLBAR_PLUS_0 COL_SCROLLBAR +#define COL_SCROLLBAR_ACTIVE COL_MENUCONTENT_PLUS_3 +#define COL_SCROLLBAR_ACTIVE_PLUS_0 COL_SCROLLBAR_ACTIVE +#define COL_SCROLLBAR_PASSIVE COL_MENUCONTENT_PLUS_2 +#define COL_SCROLLBAR_PASSIVE_PLUS_0 COL_SCROLLBAR_PASSIVE -//NI #define COL_PROGRESSBAR_ACTIVE COL_MENUCONTENT_PLUS_7 -//NI #define COL_PROGRESSBAR_ACTIVE_PLUS_0 COL_PROGRESSBAR_ACTIVE -//NI #define COL_PROGRESSBAR_PASSIVE COL_MENUCONTENT_PLUS_1 -//NI #define COL_PROGRESSBAR_PASSIVE_PLUS_0 COL_PROGRESSBAR_PASSIVE +/* //NI +#define COL_PROGRESSBAR_ACTIVE COL_MENUCONTENT_PLUS_7 +#define COL_PROGRESSBAR_ACTIVE_PLUS_0 COL_PROGRESSBAR_ACTIVE +#define COL_PROGRESSBAR_PASSIVE COL_MENUCONTENT_PLUS_1 +#define COL_PROGRESSBAR_PASSIVE_PLUS_0 COL_PROGRESSBAR_PASSIVE +*/ int convertSetupColor2RGB(unsigned char r, unsigned char g, unsigned char b); int convertSetupAlpha2Alpha(unsigned char alpha); diff --git a/src/gui/components/cc_frm.cpp b/src/gui/components/cc_frm.cpp index 962315748..26e43e085 100644 --- a/src/gui/components/cc_frm.cpp +++ b/src/gui/components/cc_frm.cpp @@ -532,6 +532,12 @@ void CComponentsForm::killCCItems(const fb_pixel_t& bg_color, bool ignore_parent v_cc_items[i]->kill(bg_color, ignore_parent); } +void CComponentsForm::hideCCItems() +{ + for(size_t i=0; ihide(); +} + void CComponentsForm::setPageCount(const u_int8_t& pageCount) { u_int8_t new_val = pageCount; diff --git a/src/gui/components/cc_frm.h b/src/gui/components/cc_frm.h index 3561e495a..59f488fdb 100644 --- a/src/gui/components/cc_frm.h +++ b/src/gui/components/cc_frm.h @@ -81,6 +81,16 @@ class CComponentsForm : public CComponentsItem ///NOTE: Items always have parent bindings to "this" and use the parent background color as default! Set parameter 'ignore_parent=true' to ignore parent background color! virtual void killCCItems(const fb_pixel_t& bg_color, bool ignore_parent); + /** + Removes possible contained items and finally removes + current form from screen and + restores last displayed background before form was painted. + */ + void hide(){hideCCItems(); CCDraw::hide();} + + ///restore background for all items inside form, + void hideCCItems(); + ///add an item to form collection, returns id virtual int addCCItem(CComponentsItem* cc_Item); ///add items from a vector to form collection, returns size/count of items diff --git a/src/gui/components/cc_frm_header.cpp b/src/gui/components/cc_frm_header.cpp index b0b5ab948..94f38b825 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; @@ -274,23 +274,35 @@ void CComponentsHeader::initIcon() void CComponentsHeader::initLogo() { - cch_logo.dy_max = cch_logo.dy_max == -1 ? height - 2*OFFSET_INNER_SMALL : cch_logo.dy_max; + int h_logo = cch_logo.dy_max == -1 ? height - 2*OFFSET_INNER_MIN : cch_logo.dy_max; if(!cch_logo_obj) - cch_logo_obj = new CComponentsChannelLogoScalable(width/2, height/2 - cch_logo.dy_max/2, cch_logo.Name, cch_logo.Id, this); + cch_logo_obj = new CComponentsChannelLogoScalable(width/2, height/2 - h_logo/2, cch_logo.Name, cch_logo.Id, this); 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 (h_logo > dy_orig) + h_logo = dy_orig; + } + if (cch_logo_obj->hasLogo()){ - cch_logo_obj->setHeight(cch_logo.dy_max, true); + cch_logo_obj->setHeight(h_logo, true); // set id of logo item depends of neighbor items int logo_id = getCCItemId(cch_logo_obj); - int next_id = logo_id + 1; int prev_id = logo_id - 1; //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; + int x_logo_right = width - cch_logo_obj->getWidth(); + if (cch_btn_obj) + x_logo_right -= cch_btn_obj->getWidth(); + if (cch_cl_obj) + x_logo_right -= cch_cl_obj->getWidth(); + //left end int x_logo_left = getCCItem(prev_id) ? getCCItem(prev_id)->getXPos() + getCCItem(prev_id)->getWidth() : 0; @@ -307,8 +319,15 @@ void CComponentsHeader::initLogo() x_logo = x_logo_right; if (cch_logo.Align == CC_LOGO_LEFT) x_logo = x_logo_left; - if (cch_logo.Align == CC_LOGO_CENTER) - x_logo = x_logo_left + logo_space/2 - cch_logo_obj->getWidth()/2; + if (cch_logo.Align == CC_LOGO_CENTER){ + x_logo = width/2 - cch_logo_obj->getWidth()/2; + //fallback if previous item and logo are overlapping + if (getCCItem(prev_id)){ + int x_tmp = x_logo_left + logo_space/2 - cch_logo_obj->getWidth()/2; + if (x_logo <= x_logo_left) + x_logo = x_tmp; + } + } cch_logo_obj->setXPos(x_logo); cch_logo_obj->setYPos(height/2 - cch_logo_obj->getHeight()/2); diff --git a/src/gui/components/cc_frm_header.h b/src/gui/components/cc_frm_header.h index 1a0f1c8d4..9550d1134 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 @@ -297,7 +299,7 @@ class CComponentsHeader : public CComponentsForm, public CCTextScreen virtual void paint(bool do_save_bg = CC_SAVE_SCREEN_YES); ///hides item, arg: no_restore see hideCCItem() - void hide(){disableClock(); CComponents::hide();} + void hide(){disableClock(); CComponentsForm::hide();} ///erase current screen without restore of background, it's similar to paintBackgroundBoxRel() from CFrameBuffer void kill(const fb_pixel_t& bg_color = COL_BACKGROUND_PLUS_0, const int& corner_radius = -1, const int& fblayer_type = CC_FBDATA_TYPES, bool disable_clock = true); @@ -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_frm_scrollbar.h b/src/gui/components/cc_frm_scrollbar.h index 9fd1ab984..8658d5428 100644 --- a/src/gui/components/cc_frm_scrollbar.h +++ b/src/gui/components/cc_frm_scrollbar.h @@ -79,11 +79,11 @@ class CComponentsScrollBar : public CComponentsFrmChain * usual paraemters: * @param[in] parent optional, exepts type pointer to a parent CComponentsForm object, default NULL * @param[in] shadow_mode optional, exepts type int defined by shadow mode enums, default CC_SHADOW_OFF - * @param[in] color_frame optional, exepts type fb_pixel_t, default COL_SCROLLBAR - * @param[in] color_body optional, exepts type fb_pixel_t, default COL_SCROLLBAR + * @param[in] color_frame optional, exepts type fb_pixel_t, default COL_SCROLLBAR_PLUS_0 + * @param[in] color_body optional, exepts type fb_pixel_t, default COL_SCROLLBAR_PLUS_0 * @param[in] color_shadow optional, exepts type fb_pixel_t, default COL_SHADOW_PLUS_0 - * @param[in] color_select optional, exepts type fb_pixel_t, default COL_SCROLLBAR_ACTIVE - * @param[in] color_passive optional, exepts type fb_pixel_t, default COL_SCROLLBAR_PASSIVE + * @param[in] color_select optional, exepts type fb_pixel_t, default COL_SCROLLBAR_ACTIVE_PLUS_0 + * @param[in] color_passive optional, exepts type fb_pixel_t, default COL_SCROLLBAR_PASSIVE_PLUS_0 */ CComponentsScrollBar( const int &x_pos, const int &y_pos, @@ -92,11 +92,11 @@ class CComponentsScrollBar : public CComponentsFrmChain const int& count = 1, CComponentsForm *parent = NULL, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_SCROLLBAR, - fb_pixel_t color_body = COL_SCROLLBAR, + fb_pixel_t color_frame = COL_SCROLLBAR_PLUS_0, + fb_pixel_t color_body = COL_SCROLLBAR_PLUS_0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0, - fb_pixel_t color_select = COL_SCROLLBAR_ACTIVE, - fb_pixel_t color_passive = COL_SCROLLBAR_PASSIVE); + fb_pixel_t color_select = COL_SCROLLBAR_ACTIVE_PLUS_0, + fb_pixel_t color_passive = COL_SCROLLBAR_PASSIVE_PLUS_0); // ~CComponentsScrollBar(); //inherited from CComponentsForm /**Set current page number @@ -158,11 +158,11 @@ class CComponentsScrollBar : public CComponentsFrmChain * usual paraemters: * @param[in] parent optional, exepts type pointer to a parent CComponentsForm object, default NULL * @param[in] shadow_mode optional, exepts type int defined by shadow mode enums, default CC_SHADOW_OFF - * @param[in] color_frame optional, exepts type fb_pixel_t, default COL_SCROLLBAR_ACTIVE_PLUS_0 - * @param[in] color_body optional, exepts type fb_pixel_t, default COL_SCROLLBAR_PASSIVE_PLUS_0 + * @param[in] color_frame optional, exepts type fb_pixel_t, default COL_SCROLLBAR_PLUS_0 + * @param[in] color_body optional, exepts type fb_pixel_t, default COL_SCROLLBAR_PLUS_0 * @param[in] color_shadow optional, exepts type fb_pixel_t, default COL_SHADOW_PLUS_0 - * @param[in] color_select optional, exepts type fb_pixel_t, default COL_SCROLLBAR_ACTIVE - * @param[in] color_passive optional, exepts type fb_pixel_t, default COL_SCROLLBAR_PASSIVE + * @param[in] color_select optional, exepts type fb_pixel_t, default COL_SCROLLBAR_ACTIVE_PLUS_0 + * @param[in] color_passive optional, exepts type fb_pixel_t, default COL_SCROLLBAR_PASSIVE_PLUS_0 */ void paintScrollBar( const int &x_pos, const int &y_pos, @@ -171,10 +171,10 @@ void paintScrollBar( const int &x_pos, const int& count, const int& current_num, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_SCROLLBAR, - fb_pixel_t color_body = COL_SCROLLBAR, + fb_pixel_t color_frame = COL_SCROLLBAR_PLUS_0, + fb_pixel_t color_body = COL_SCROLLBAR_PLUS_0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0, - fb_pixel_t color_select = COL_SCROLLBAR_ACTIVE, - fb_pixel_t color_passive = COL_SCROLLBAR_PASSIVE); + fb_pixel_t color_select = COL_SCROLLBAR_ACTIVE_PLUS_0, + fb_pixel_t color_passive = COL_SCROLLBAR_PASSIVE_PLUS_0); #endif 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/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 297554872..fac773ac1 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 9b43c9fbe..a69818abb 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/lua/lua_api_version.h b/src/gui/lua/lua_api_version.h index 9e8343ca1..078e88ef8 100644 --- a/src/gui/lua/lua_api_version.h +++ b/src/gui/lua/lua_api_version.h @@ -4,4 +4,4 @@ * to luainstance.h changes */ #define LUA_API_VERSION_MAJOR 1 -#define LUA_API_VERSION_MINOR 72 +#define LUA_API_VERSION_MINOR 73 diff --git a/src/gui/lua/luainstance.cpp b/src/gui/lua/luainstance.cpp index 17fa1cb34..f1cd18d62 100644 --- a/src/gui/lua/luainstance.cpp +++ b/src/gui/lua/luainstance.cpp @@ -175,6 +175,7 @@ static void set_lua_variables(lua_State *L) { "MENUCONTENTINACTIVE", MAGIC_COLOR | (COL_MENUCONTENTINACTIVE) }, { "MENUFOOT", MAGIC_COLOR | (COL_MENUFOOT) }, { "FRAME", MAGIC_COLOR | (COL_FRAME) }, + { "SCROLLBAR", MAGIC_COLOR | (COL_SCROLLBAR) }, { "SCROLLBAR_ACTIVE", MAGIC_COLOR | (COL_SCROLLBAR_ACTIVE) }, { "SCROLLBAR_PASSIVE", MAGIC_COLOR | (COL_SCROLLBAR_PASSIVE) }, { "PROGRESSBAR_ACTIVE", MAGIC_COLOR | (COL_PROGRESSBAR_ACTIVE_PLUS_0) }, //NI @@ -226,6 +227,7 @@ static void set_lua_variables(lua_State *L) { "MENUCONTENTINACTIVE_PLUS_0", (lua_Unsigned) (COL_MENUCONTENTINACTIVE_PLUS_0) }, { "MENUFOOT_PLUS_0", (lua_Unsigned) (COL_MENUFOOT_PLUS_0) }, { "FRAME_PLUS_0", (lua_Unsigned) (COL_FRAME_PLUS_0) }, + { "SCROLLBAR_PLUS_0", (lua_Unsigned) (COL_SCROLLBAR_PLUS_0) }, { "SCROLLBAR_ACTIVE_PLUS_0", (lua_Unsigned) (COL_SCROLLBAR_ACTIVE_PLUS_0) }, { "SCROLLBAR_PASSIVE_PLUS_0", (lua_Unsigned) (COL_SCROLLBAR_PASSIVE_PLUS_0) }, { "PROGRESSBAR_ACTIVE_PLUS_0", (lua_Unsigned) (COL_PROGRESSBAR_ACTIVE_PLUS_0) }, diff --git a/src/gui/moviebrowser/mb.cpp b/src/gui/moviebrowser/mb.cpp index 083415c40..ae2f09f44 100644 --- a/src/gui/moviebrowser/mb.cpp +++ b/src/gui/moviebrowser/mb.cpp @@ -2985,8 +2985,11 @@ bool CMovieBrowser::loadTsFileNamesFromDir(const std::string & dirname) } else { result |= addFile(flist[i], dirItNr); } +//NI +#if 0 if (result) OnLocalProgress(i, count, dirname ); +#endif } //result = true; } @@ -3228,7 +3231,7 @@ void CMovieBrowser::loadMovies(bool doRefresh) struct timeval t1, t2; gettimeofday(&t1, NULL); - CProgressWindow loadBox((show_mode == MB_SHOW_YT) ? LOCALE_MOVIEPLAYER_YTPLAYBACK : LOCALE_MOVIEBROWSER_SCAN_FOR_MOVIES, CCW_PERCENT 50, CCW_PERCENT 10, NULL, show_mode == MB_SHOW_YT ? &ytparser.OnProgress : &OnLocalProgress, &OnGlobalProgress); + CProgressWindow loadBox((show_mode == MB_SHOW_YT) ? LOCALE_MOVIEPLAYER_YTPLAYBACK : LOCALE_MOVIEBROWSER_SCAN_FOR_MOVIES, CCW_PERCENT 50, CCW_PERCENT 10, NULL, show_mode == MB_SHOW_YT ? &ytparser.OnProgress : /* //NI &OnLocalProgress, */ &OnGlobalProgress); loadBox.enableShadow(); loadBox.paint(); diff --git a/src/gui/osd_setup.cpp b/src/gui/osd_setup.cpp index a8712fdc8..542ee5033 100644 --- a/src/gui/osd_setup.cpp +++ b/src/gui/osd_setup.cpp @@ -326,6 +326,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 44f51aa1b..4ac249668 100644 --- a/src/gui/pictureviewer.cpp +++ b/src/gui/pictureviewer.cpp @@ -762,7 +762,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 ca4feb4ab..b668ae110 100644 --- a/src/gui/timerlist.cpp +++ b/src/gui/timerlist.cpp @@ -1437,7 +1437,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 905902743..e44245404 100644 --- a/src/gui/upnpbrowser.cpp +++ b/src/gui/upnpbrowser.cpp @@ -947,6 +947,7 @@ void CUpnpBrowserGui::paintDeviceInfo() tmp += m_devices[m_selecteddevice].modelurl; topbox.setDimensionsAll(m_x, m_y, m_width, m_topbox_height); + topbox.setCorner(RADIUS_LARGE); topbox.setText(tmp, CTextBox::AUTO_WIDTH); topbox.paint0(); } @@ -997,7 +998,7 @@ void CUpnpBrowserGui::paintDevices() header.addContextButton(NEUTRINO_ICON_BUTTON_MUTE_SMALL); else header.removeContextButtons(); - //header.enableShadow(); + header.setCorner(RADIUS_LARGE, CORNER_TOP); header.paint(CC_SAVE_SCREEN_NO); // Items @@ -1005,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; @@ -1018,6 +1019,7 @@ void CUpnpBrowserGui::paintDevices() m_frameBuffer->paintBoxRel(m_x + m_width, m_item_y + OFFSET_SHADOW, OFFSET_SHADOW, sb, COL_SHADOW_PLUS_0); // Foot + footer.setCorner(RADIUS_LARGE, CORNER_BOTTOM); footer.paintButtons(m_x, m_footer_y, m_width, m_footer_height, 1, &RescanButton, m_width/2); paintItem2DetailsLine(-1); // clear it @@ -1154,6 +1156,7 @@ void CUpnpBrowserGui::paintItemInfo(UPnPEntry *entry) } } + topbox.setCorner(RADIUS_LARGE); topbox.setText(tmp, CTextBox::AUTO_WIDTH); topbox.paint0(); } @@ -1182,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); @@ -1203,7 +1206,9 @@ void CUpnpBrowserGui::paintDetails(UPnPEntry *entry, bool use_playing) char tmp_time[] = "000:00"; int timebox_width = timebox.getFont()->getRenderWidth(tmp_time) + OFFSET_INNER_MID*2; infobox.setDimensionsAll(m_x, m_infobox_y, m_width - OFFSET_SHADOW - OFFSET_INTER - timebox_width, m_infobox_height); + infobox.setCorner(RADIUS_LARGE); timebox.setDimensionsAll(m_x + m_width - timebox_width, infobox.getYPos(), timebox_width, m_infobox_height); + timebox.setCorner(RADIUS_LARGE); printf("paintDetails: use_playing %d shown %d\n", use_playing, m_playing_entry_is_shown); if ((!use_playing) && entry->isdir){ diff --git a/src/gui/widget/listbox.cpp b/src/gui/widget/listbox.cpp index 82bdabc75..9fb13a4a6 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; int sbs= (selected/listmaxshow); 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 e5a2700ed..3e25f0356 100644 --- a/src/zapit/src/femanager.cpp +++ b/src/zapit/src/femanager.cpp @@ -382,7 +382,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;