diff options
23 files changed, 193 insertions, 127 deletions
@@ -12,7 +12,7 @@ VDR Plugin 'skinflatplus' Revision History - [update] MV-Themes - [update] left align number recordings of folders in recording view - [update] Makefile, add --remove-destination to install icons, to override symlinks -- [update] clock symbols +- [update] add icons for text xpm-symbols (new icons are text_???) - [add] theme colors clrMenuEventTitleLine and clrMenuRecTitleLine for the line under title in event and recording - [add] theme color clrChannelEPGBorderFg and clrChannelEPGBorderBg for border color of epg image in chanel info - [add] decor option ChannelEPGBorderType and ChannelEPGBorderSize for border of epg image in chanel info diff --git a/displaymenu.c b/displaymenu.c index e4391b8a..c1b0783c 100644 --- a/displaymenu.c +++ b/displaymenu.c @@ -6,22 +6,9 @@ #define VDRLOGO "vdrlogo_default" #endif -#include "symbols/1080/Cnew.xpm" -#include "symbols/1080/Carrowturn.xpm" -#include "symbols/1080/Crec.xpm" -#include "symbols/1080/Cclock.xpm" -#include "symbols/1080/Cclocksml.xpm" -#include "symbols/1080/Cvpssml.xpm" #include "flat.h" #include "locale" -cBitmap cFlatDisplayMenu::bmCNew(Cnew_xpm); -cBitmap cFlatDisplayMenu::bmCArrowTurn(Carrowturn_xpm); -cBitmap cFlatDisplayMenu::bmCRec(Crec_xpm); -cBitmap cFlatDisplayMenu::bmCClock(Cclock_xpm); -cBitmap cFlatDisplayMenu::bmCClocksml(Cclocksml_xpm); -cBitmap cFlatDisplayMenu::bmCVPS(Cvpssml_xpm); - /* Possible values of the stream content descriptor according to ETSI EN 300 468 */ enum stream_content { @@ -79,12 +66,6 @@ cFlatDisplayMenu::cFlatDisplayMenu(void) { menuCategory = mcUndefined; - bmNew = &bmCNew; - bmRec = &bmCRec; - bmArrowTurn = &bmCArrowTurn; - bmClock = &bmCClock; - bmClocksml = &bmCClocksml; - bmVPS = &bmCVPS; } cFlatDisplayMenu::~cFlatDisplayMenu() { @@ -288,14 +269,35 @@ void cFlatDisplayMenu::SetItem(const char *Text, int Index, bool Current, bool S ColorFg = Theme.Color(clrItemCurrentFont); ColorBg = Theme.Color(clrItemCurrentBg); ColorExtraTextFg = Theme.Color(clrMenuItemExtraTextCurrentFont); + + iconTimerFull = imgLoader.LoadIcon("text_timer_full_cur", fontHeight, fontHeight); + iconTimerPartial = imgLoader.LoadIcon("text_timer_partial_cur", fontHeight, fontHeight); + iconArrowTurn = imgLoader.LoadIcon("text_arrowturn_cur", fontHeight, fontHeight); + iconRec = imgLoader.LoadIcon("text_rec_cur", fontHeight, fontHeight); + iconVps = imgLoader.LoadIcon("text_vps_cur", fontHeight, fontHeight); + iconNew = imgLoader.LoadIcon("text_new_cur", fontHeight, fontHeight); } else { if( Selectable ) { ColorFg = Theme.Color(clrItemSelableFont); ColorBg = Theme.Color(clrItemSelableBg); + + iconTimerFull = imgLoader.LoadIcon("text_timer_full_sel", fontHeight, fontHeight); + iconTimerPartial = imgLoader.LoadIcon("text_timer_partial_sel", fontHeight, fontHeight); + iconArrowTurn = imgLoader.LoadIcon("text_arrowturn_sel", fontHeight, fontHeight); + iconRec = imgLoader.LoadIcon("text_rec_sel", fontHeight, fontHeight); + iconVps = imgLoader.LoadIcon("text_vps_sel", fontHeight, fontHeight); + iconNew = imgLoader.LoadIcon("text_new_sel", fontHeight, fontHeight); } else { ColorFg = Theme.Color(clrItemFont); ColorBg = Theme.Color(clrItemBg); + + iconTimerFull = imgLoader.LoadIcon("text_timer_full", fontHeight, fontHeight); + iconTimerPartial = imgLoader.LoadIcon("text_timer_partial", fontHeight, fontHeight); + iconArrowTurn = imgLoader.LoadIcon("text_arrowturn", fontHeight, fontHeight); + iconRec = imgLoader.LoadIcon("text_rec", fontHeight, fontHeight); + iconVps = imgLoader.LoadIcon("text_vps", fontHeight, fontHeight); + iconNew = imgLoader.LoadIcon("text_new", fontHeight, fontHeight); } } menuPixmap->DrawRectangle(cRect(Config.decorBorderMenuItemSize, y, menuItemWidth, fontHeight), ColorBg); @@ -352,33 +354,37 @@ void cFlatDisplayMenu::SetItem(const char *Text, int Index, bool Current, bool S // timer menu switch( s[0] ) { case '!': - menuPixmap->DrawBitmap(cPoint(xOff, y + (lh - bmArrowTurn->Height()) / 2), *bmArrowTurn, ColorFg, ColorBg); - break; + if( iconArrowTurn ) + menuIconsPixmap->DrawImage( cPoint(xOff, y + (lh - iconArrowTurn->Height()) / 2), *iconArrowTurn ); + break; case '#': - menuPixmap->DrawBitmap(cPoint(xOff, y + (lh - bmRec->Height()) / 2), *bmRec, ColorFg, ColorBg); - break; + if( iconRec ) + menuIconsPixmap->DrawImage( cPoint(xOff, y + (lh - iconRec->Height()) / 2), *iconRec ); + break; case '>': - menuPixmap->DrawBitmap(cPoint(xOff, y + (lh - bmClock->Height()) / 2), *bmClock, ColorFg, ColorBg); - break; + if( iconTimerFull ) + menuIconsPixmap->DrawImage( cPoint(xOff, y + (lh - iconTimerFull->Height()) / 2), *iconTimerFull ); + break; case ' ': default: break; } } else if( isRecording || hasEventtimer || haspartEventtimer || hasVPS || isRunning ) { // program schedule menu - if( isRecording ) - menuPixmap->DrawBitmap(cPoint(xOff, y + (lh - bmRec->Height()) / 2), *bmRec, ColorFg, ColorBg); + if( isRecording && iconRec ) + menuIconsPixmap->DrawImage( cPoint(xOff, y + (lh - iconRec->Height()) / 2), *iconRec ); else { - if( hasEventtimer ) - menuPixmap->DrawBitmap(cPoint(xOff, y + (lh - bmClock->Height()) / 2), *bmClock, ColorFg, ColorBg); - if( haspartEventtimer ) - menuPixmap->DrawBitmap(cPoint(xOff + (bmClock->Height() - bmClocksml->Height()) / 2, y + (lh - bmClocksml->Height()) / 2), *bmClocksml, ColorFg, ColorBg); + if( hasEventtimer && iconTimerFull ) + menuIconsPixmap->DrawImage( cPoint(xOff, y + (lh - iconTimerFull->Height()) / 2), *iconTimerFull ); + if( haspartEventtimer && iconTimerPartial ) + menuIconsPixmap->DrawImage( cPoint(xOff, y + (lh - iconTimerPartial->Height()) / 2), *iconTimerPartial ); } - xOff += bmClock->Width(); // clock is wider than rec + xOff += iconTimerFull->Width(); // clock is wider than rec - if( hasVPS ) - menuPixmap->DrawBitmap(cPoint(xOff, y + (lh - bmVPS->Height()) / 2), *bmVPS, ColorFg, ColorBg); - xOff += bmVPS->Width(); + if( hasVPS && iconVps ) { + menuIconsPixmap->DrawImage( cPoint(xOff, y + (lh - iconVps->Height()) / 2), *iconVps ); + xOff += iconVps->Width(); + } if( isRunning ) menuPixmap->DrawText(cPoint(xOff, y), "*", ColorFg, ColorBg, font, AvailableTextWidth - xOff); @@ -388,8 +394,10 @@ void cFlatDisplayMenu::SetItem(const char *Text, int Index, bool Current, bool S menuPixmap->DrawText(cPoint(xOff, y), buffer, ColorFg, ColorBg, font, AvailableTextWidth - xOff); // draw symbol "new" centered - int gap = std::max(0, (Tab(i+1)-Tab(i)- font->Width(buffer) - bmNew->Width()) / 2); - menuPixmap->DrawBitmap(cPoint(xOff + font->Width(buffer) + gap, y + (lh - bmNew->Height()) / 2), *bmNew, ColorFg, ColorBg); + if( iconNew ) { + int gap = std::max(0, (Tab(i+1)-Tab(i)- font->Width(buffer) - iconNew->Width()) / 2); + menuIconsPixmap->DrawImage( cPoint(xOff + font->Width(buffer) + gap, y + (lh - iconNew->Height()) / 2), *iconNew ); + } } else if( CheckProgressBar( s ) ) { int colWidth = Tab(i+1) - Tab(i); diff --git a/displaymenu.h b/displaymenu.h index 50e1f560..26919c9c 100644 --- a/displaymenu.h +++ b/displaymenu.h @@ -41,6 +41,15 @@ class cFlatDisplayMenu : public cFlatBaseRender, public cSkinDisplayMenu { cString ItemEventLastChannelName; + // Icons + cImage *iconTimerFull; + cImage *iconTimerPartial; + cImage *iconArrowTurn; + cImage *iconRec; + cImage *iconVps; + cImage *iconNew; + // Icons + void ItemBorderInsertUnique(sDecorBorder ib); void ItemBorderDrawAllWithScrollbar(void); void ItemBorderDrawAllWithoutScrollbar(void); @@ -60,8 +69,7 @@ class cFlatDisplayMenu : public cFlatBaseRender, public cSkinDisplayMenu { bool CheckProgressBar(const char *text); void DrawProgressBarFromText(cRect rec, cRect recBg, const char *bar, tColor ColorFg, tColor ColorBarFg, tColor ColorBg); - cBitmap *bmNew, *bmRec, *bmArrowTurn, *bmClock, *bmClocksml, *bmVPS; - static cBitmap bmCNew, bmCRec, bmCArrowTurn, bmCClock, bmCClocksml, bmCHD, bmCVPS; + static cBitmap bmCNew, bmCRec, bmCArrowTurn, bmCHD, bmCVPS; void DrawItemExtraEvent(const cEvent *Event, cString EmptyText); void DrawItemExtraRecording(const cRecording *Recording, cString EmptyText); public: diff --git a/icons/default/text_arrowturn.png b/icons/default/text_arrowturn.png Binary files differnew file mode 100644 index 00000000..da97ac6d --- /dev/null +++ b/icons/default/text_arrowturn.png diff --git a/icons/default/text_arrowturn_cur.png b/icons/default/text_arrowturn_cur.png Binary files differnew file mode 100644 index 00000000..da97ac6d --- /dev/null +++ b/icons/default/text_arrowturn_cur.png diff --git a/icons/default/text_arrowturn_sel.png b/icons/default/text_arrowturn_sel.png Binary files differnew file mode 100644 index 00000000..da97ac6d --- /dev/null +++ b/icons/default/text_arrowturn_sel.png diff --git a/icons/default/text_new.png b/icons/default/text_new.png Binary files differnew file mode 100644 index 00000000..b073dcbe --- /dev/null +++ b/icons/default/text_new.png diff --git a/icons/default/text_new_cur.png b/icons/default/text_new_cur.png Binary files differnew file mode 100644 index 00000000..b073dcbe --- /dev/null +++ b/icons/default/text_new_cur.png diff --git a/icons/default/text_new_sel.png b/icons/default/text_new_sel.png Binary files differnew file mode 100644 index 00000000..b073dcbe --- /dev/null +++ b/icons/default/text_new_sel.png diff --git a/icons/default/text_rec.png b/icons/default/text_rec.png Binary files differnew file mode 100644 index 00000000..123978f7 --- /dev/null +++ b/icons/default/text_rec.png diff --git a/icons/default/text_rec_cur.png b/icons/default/text_rec_cur.png Binary files differnew file mode 100644 index 00000000..123978f7 --- /dev/null +++ b/icons/default/text_rec_cur.png diff --git a/icons/default/text_rec_sel.png b/icons/default/text_rec_sel.png Binary files differnew file mode 100644 index 00000000..123978f7 --- /dev/null +++ b/icons/default/text_rec_sel.png diff --git a/icons/default/text_timer_full.png b/icons/default/text_timer_full.png Binary files differnew file mode 100644 index 00000000..f4256296 --- /dev/null +++ b/icons/default/text_timer_full.png diff --git a/icons/default/text_timer_full_cur.png b/icons/default/text_timer_full_cur.png Binary files differnew file mode 100644 index 00000000..f4256296 --- /dev/null +++ b/icons/default/text_timer_full_cur.png diff --git a/icons/default/text_timer_full_sel.png b/icons/default/text_timer_full_sel.png Binary files differnew file mode 100644 index 00000000..f4256296 --- /dev/null +++ b/icons/default/text_timer_full_sel.png diff --git a/icons/default/text_timer_partial.png b/icons/default/text_timer_partial.png Binary files differnew file mode 100644 index 00000000..1940f5c7 --- /dev/null +++ b/icons/default/text_timer_partial.png diff --git a/icons/default/text_timer_partial_cur.png b/icons/default/text_timer_partial_cur.png Binary files differnew file mode 100644 index 00000000..1940f5c7 --- /dev/null +++ b/icons/default/text_timer_partial_cur.png diff --git a/icons/default/text_timer_partial_sel.png b/icons/default/text_timer_partial_sel.png Binary files differnew file mode 100644 index 00000000..1940f5c7 --- /dev/null +++ b/icons/default/text_timer_partial_sel.png diff --git a/icons/default/text_vps.png b/icons/default/text_vps.png Binary files differnew file mode 100644 index 00000000..7ec5a981 --- /dev/null +++ b/icons/default/text_vps.png diff --git a/icons/default/text_vps_cur.png b/icons/default/text_vps_cur.png Binary files differnew file mode 100644 index 00000000..7ec5a981 --- /dev/null +++ b/icons/default/text_vps_cur.png diff --git a/icons/default/text_vps_sel.png b/icons/default/text_vps_sel.png Binary files differnew file mode 100644 index 00000000..7ec5a981 --- /dev/null +++ b/icons/default/text_vps_sel.png diff --git a/symbols/1080/Cclock.xpm b/symbols/1080/Cclock.xpm index 2e0b956a..5198c5b0 100644 --- a/symbols/1080/Cclock.xpm +++ b/symbols/1080/Cclock.xpm @@ -1,45 +1,69 @@ /* XPM */ static const char *const Cclock_xpm[] = { -"40 40 2 1", +"64 64 2 1", " c None", ". c #FFFFFF", -" ", -" ", -" ", -" ", -" ...... ", -" ........ ", -" ........ ", -" ...... ", -" .... .. ", -" ...... .... ", -" ................. ", -" ................. ", -" .................. ", -" ...... ...... ", -" ..... ..... ", -" .... .... ", -" ..... .... ", -" ....... .... ", -" .... .... .... ", -" .... .... .... ", -" .... ...... .... ", -" .... ...... .... ", -" ... ..... ... ", -" .... .... .... ", -" .... .. .... ", -" .... .... ", -" .... .... ", -" .... .... ", -" ..... ..... ", -" ..... ..... ", -" ..... ..... ", -" ...... ...... ", -" .................. ", -" .............. ", -" .......... ", -" .... ", -" ", -" ", -" ", -" "}; +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" .......... ", +" ............ ", +" ............ ", +" ............ ", +" ............ ", +" .......... ", +" ........ .. ", +" ........ .... ", +" ............ ...... ", +" ................. ........ ", +" ............................ ", +" ............................ ", +" ............................ ", +" ............. .. ............. ", +" ........... ........... ", +" ........ ........ ", +" ........ ........ ", +" ........ ........ ", +" ....... ....... ", +" ....... ....... ", +" ......... ...... ", +" ...... ..... ...... ", +" ...... ...... ...... ", +" ...... ....... ...... ", +" ...... ........ ...... ", +" ...... ........... ...... ", +" ...... .......... ...... ", +" ...... .......... ...... ", +" ...... ......... ...... ", +" ...... ........ ...... ", +" ...... ...... ...... ", +" ...... ...... ...... ", +" ...... .. ...... ", +" ...... ...... ", +" ...... ...... ", +" ...... ...... ", +" ....... ....... ", +" ...... ...... ", +" ....... ....... ", +" ....... ....... ", +" ........ ........ ", +" ........ ........ ", +" ......... ......... ", +" .......... .......... ", +" ............................ ", +" .......................... ", +" ........................ ", +" .................... ", +" ................ ", +" .......... ", +" ", +" ", +" ", +" ", +" ", +" ", +" "}; diff --git a/symbols/1080/Cclocksml.xpm b/symbols/1080/Cclocksml.xpm index 716f0fbc..6d2ed771 100644 --- a/symbols/1080/Cclocksml.xpm +++ b/symbols/1080/Cclocksml.xpm @@ -1,51 +1,77 @@ /* XPM */ static const char *const Cclocksml_xpm[] = { -"40 40 8 1", +"64 64 10 1", " c None", -". c #ACACAC", +". c #ADADAD", "+ c #AAAAAA", -"@ c #ADADAD", -"# c #AFAFAF", +"@ c #B0B0B0", +"# c #ACACAC", "$ c #AEAEAE", -"% c #ABABAB", -"& c #B0B0B0", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" .++. ", -" ++++ ", -" @++@ ", -" #++++$ ++# ", -" .++++++++++ ", -" %++%%&&%%+++ ", -" .++ ++. ", -" +% %+ ", -" .+$%. %+. ", -" ++ %%+ ++ ", -" ++ +++% ++ ", -" +% @++& %+ ", -" ++ %% ++ ", -" ++ ++ ", -" %+. .+% ", -" ++ ++ ", -" %++ ++% ", -" .++% @%++. ", -" .++++++++. ", -" @%..%@ ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" "}; +"% c #B1B1B1", +"& c #ABABAB", +"* c #B2B2B2", +"= c #AFAFAF", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" .++++. ", +" @++++++@ ", +" @++++++@ ", +" .++++. ", +" ++++ +# ", +" $++++++$ #+++% ", +" &++++++++++&++++& ", +" .+++++++++++++++++ ", +" &+++++#&**&#++++++$ ", +" +++++$ $+++++ ", +" #++++ ++++# ", +" #+++# #+++# ", +" +++& #+++ ", +" $+++@++. +++$ ", +" #++& $++#* &++# ", +" +++# &+++ #+++ ", +" +++ ++++&# +++ ", +" ++++ ++++++ ++++ ", +" ++++ =++++* ++++ ", +" ++++ ++++ ++++ ", +" +++ .. +++ ", +" +++& &+++ ", +" .+++ +++. ", +" $+++$ .+++$ ", +" &+++ +++& ", +" $++++ ++++$ ", +" +++++ +++++ ", +" &+++++ +++++& ", +" .+++++&.&&.&+++++. ", +" $++++++++++++++$ ", +" $++++++++++$ ", +" @&=##=&@ ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" "}; |