summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY1
-rw-r--r--baserender.c15
-rw-r--r--baserender.h1
-rw-r--r--displaychannel.c17
-rw-r--r--displaychannel.h1
-rw-r--r--displaymenu.c25
-rw-r--r--displaymenu.h2
-rw-r--r--icons/default/logo_background.pngbin0 -> 639 bytes
-rw-r--r--icons/default/radio.pngbin12878 -> 12823 bytes
-rw-r--r--icons/default/tv.pngbin2101 -> 1807 bytes
10 files changed, 58 insertions, 4 deletions
diff --git a/HISTORY b/HISTORY
index 5828e9c5..22995e24 100644
--- a/HISTORY
+++ b/HISTORY
@@ -4,6 +4,7 @@ VDR Plugin 'skinflatplus' Revision History
2014-XX-XX: Version 0.2.1
- [fix] epgsearch progessbar in SetItemEvent, if start time is after now (2 minutes tolerance)
- [add] theme color clrMenuItemExtraTextCurrentFont
+- [add] logo background for channel logos (filename: logo_background.png)
2014-02-22: Version 0.2.0
- [fix] load user decor settings
diff --git a/baserender.c b/baserender.c
index fdeb56a4..4c290676 100644
--- a/baserender.c
+++ b/baserender.c
@@ -65,6 +65,8 @@ cFlatBaseRender::~cFlatBaseRender(void) {
osd->DestroyPixmap(decorPixmap);
if( topBarIconPixmap )
osd->DestroyPixmap(topBarIconPixmap);
+ if( topBarIconBGPixmap )
+ osd->DestroyPixmap(topBarIconBGPixmap);
delete osd;
}
@@ -105,8 +107,11 @@ void cFlatBaseRender::TopBarCreate(void) {
topBarHeight = topBarFontSmlHeight * 2;
topBarPixmap = osd->CreatePixmap(1, cRect(Config.decorBorderTopBarSize, Config.decorBorderTopBarSize, osdWidth - Config.decorBorderTopBarSize*2, topBarHeight));
- topBarIconPixmap = osd->CreatePixmap(2, cRect(Config.decorBorderTopBarSize, Config.decorBorderTopBarSize, osdWidth - Config.decorBorderTopBarSize*2, topBarHeight));
+ topBarIconBGPixmap = osd->CreatePixmap(2, cRect(Config.decorBorderTopBarSize, Config.decorBorderTopBarSize, osdWidth - Config.decorBorderTopBarSize*2, topBarHeight));
+ topBarIconPixmap = osd->CreatePixmap(3, cRect(Config.decorBorderTopBarSize, Config.decorBorderTopBarSize, osdWidth - Config.decorBorderTopBarSize*2, topBarHeight));
topBarPixmap->Fill(clrTransparent);
+ topBarIconBGPixmap->Fill(clrTransparent);
+ topBarIconPixmap->Fill(clrTransparent);
}
void cFlatBaseRender::TopBarSetTitle(cString title) {
@@ -182,6 +187,7 @@ void cFlatBaseRender::TopBarUpdate(void) {
RecLeft = extraLeft + extraMaxWidth + marginItem;
topBarIconPixmap->Fill(clrTransparent);
+ topBarIconBGPixmap->Fill(clrTransparent);
if( topBarExtraIconSet ) {
int extraIconLeft = extraLeft + extraMaxWidth + marginItem;
cImage *img = imgLoader.LoadIcon(*topBarExtraIcon, 999, topBarHeight);
@@ -206,6 +212,13 @@ void cFlatBaseRender::TopBarUpdate(void) {
if( topBarMenuLogoSet && Config.TopBarMenuIconShow ) {
int IconLeft = marginItem;
+
+ cImage *imgBG = imgLoader.LoadIcon("logo_background", 999, topBarHeight - marginItem*2);
+ if( imgBG ) {
+ int iconTop = (topBarHeight / 2 - imgBG->Height()/2);
+ topBarIconBGPixmap->DrawImage( cPoint(IconLeft, iconTop), *imgBG );
+ }
+
cImage *img = imgLoader.LoadLogo(*topBarMenuLogo, 999, topBarHeight - marginItem*2);
if( img ) {
int iconTop = (topBarHeight / 2 - img->Height()/2);
diff --git a/baserender.h b/baserender.h
index f9920a2c..82e552c8 100644
--- a/baserender.h
+++ b/baserender.h
@@ -38,6 +38,7 @@ class cFlatBaseRender
// TopBar
cPixmap *topBarPixmap;
cPixmap *topBarIconPixmap;
+ cPixmap *topBarIconBGPixmap;
cFont *topBarFont, *topBarFontSml;
int topBarFontHeight, topBarFontSmlHeight;
diff --git a/displaychannel.c b/displaychannel.c
index 6b579874..4738518b 100644
--- a/displaychannel.c
+++ b/displaychannel.c
@@ -13,6 +13,7 @@ cFlatDisplayChannel::cFlatDisplayChannel(bool WithInfo) {
chanInfoTopPixmap = NULL;
chanInfoBottomPixmap = NULL;
chanLogoPixmap = NULL;
+ chanLogoBGPixmap = NULL;
chanIconsPixmap = NULL;
isGroup = false;
@@ -49,10 +50,14 @@ cFlatDisplayChannel::cFlatDisplayChannel(bool WithInfo) {
Config.decorBorderChannelSize+channelHeight - height, channelWidth, heightBottom));
chanIconsPixmap->Fill( clrTransparent );
- chanLogoPixmap = osd->CreatePixmap(2, cRect(Config.decorBorderChannelSize,
+ chanLogoBGPixmap = osd->CreatePixmap(2, cRect(Config.decorBorderChannelSize,
+ Config.decorBorderChannelSize+channelHeight - height, heightBottom, heightBottom));
+ chanLogoBGPixmap->Fill( clrTransparent );
+
+ chanLogoPixmap = osd->CreatePixmap(3, cRect(Config.decorBorderChannelSize,
Config.decorBorderChannelSize+channelHeight - height, heightBottom, heightBottom));
chanLogoPixmap->Fill( clrTransparent );
-
+
height += Config.decorProgressChannelSize + marginItem*2;
ProgressBarCreate(Config.decorBorderChannelSize, Config.decorBorderChannelSize+channelHeight - height + marginItem,
channelWidth, Config.decorProgressChannelSize, marginItem, 0,
@@ -80,6 +85,8 @@ cFlatDisplayChannel::~cFlatDisplayChannel() {
osd->DestroyPixmap(chanInfoBottomPixmap);
if( chanLogoPixmap )
osd->DestroyPixmap(chanLogoPixmap);
+ if( chanLogoBGPixmap )
+ osd->DestroyPixmap(chanLogoBGPixmap);
if( chanIconsPixmap )
osd->DestroyPixmap(chanIconsPixmap);
}
@@ -113,9 +120,15 @@ void cFlatDisplayChannel::SetChannel(const cChannel *Channel, int Number) {
chanInfoTopPixmap->DrawText(cPoint(50, 0), channelString, Theme.Color(clrChannelFontTitle), Theme.Color(clrChannelBg), font);
chanLogoPixmap->Fill(clrTransparent);
+ chanLogoBGPixmap->Fill(clrTransparent);
int imageHeight = heightImageLogo - marginItem*2;
int imageLeft = marginItem*2;
int imageTop = marginItem;
+ cImage *imgBG = imgLoader.LoadIcon("logo_background", imageHeight, imageHeight);
+ if( imgBG ) {
+ chanLogoBGPixmap->DrawImage( cPoint(imageLeft, imageTop), *imgBG );
+ }
+
cImage *img = imgLoader.LoadLogo(*channelName, imageHeight, imageHeight);
if( img ) {
chanLogoPixmap->DrawImage( cPoint(imageLeft, imageTop), *img );
diff --git a/displaychannel.h b/displaychannel.h
index a1953e2a..584c8836 100644
--- a/displaychannel.h
+++ b/displaychannel.h
@@ -16,6 +16,7 @@ class cFlatDisplayChannel : public cFlatBaseRender, public cSkinDisplayChannel {
cPixmap *chanInfoTopPixmap;
cPixmap *chanInfoBottomPixmap;
cPixmap *chanLogoPixmap;
+ cPixmap *chanLogoBGPixmap;
cPixmap *chanIconsPixmap;
int screenWidth, lastScreenWidth;
diff --git a/displaymenu.c b/displaymenu.c
index 14e54377..0fe9ca8d 100644
--- a/displaymenu.c
+++ b/displaymenu.c
@@ -54,7 +54,9 @@ cFlatDisplayMenu::cFlatDisplayMenu(void) {
menuWidth = osdWidth;
menuTop = topBarHeight + marginItem + Config.decorBorderTopBarSize*2 + Config.decorBorderMenuItemSize;
menuPixmap = osd->CreatePixmap(1, cRect(0, menuTop, menuWidth, scrollBarHeight ));
- menuIconsPixmap = osd->CreatePixmap(2, cRect(0, menuTop, menuWidth, scrollBarHeight ));
+
+ menuIconsBGPixmap = osd->CreatePixmap(2, cRect(0, menuTop, menuWidth, scrollBarHeight ));
+ menuIconsPixmap = osd->CreatePixmap(3, cRect(0, menuTop, menuWidth, scrollBarHeight ));
chLeft = Config.decorBorderMenuContentHeadSize;
chTop = topBarHeight + marginItem + Config.decorBorderTopBarSize*2 + Config.decorBorderMenuContentHeadSize;
@@ -66,6 +68,7 @@ cFlatDisplayMenu::cFlatDisplayMenu(void) {
menuPixmap->Fill(clrTransparent);
menuIconsPixmap->Fill(clrTransparent);
+ menuIconsBGPixmap->Fill(clrTransparent);
scrollbarPixmap->Fill(clrTransparent);
menuCategory = mcUndefined;
@@ -81,6 +84,7 @@ cFlatDisplayMenu::cFlatDisplayMenu(void) {
cFlatDisplayMenu::~cFlatDisplayMenu() {
osd->DestroyPixmap(menuPixmap);
osd->DestroyPixmap(menuIconsPixmap);
+ osd->DestroyPixmap(menuIconsBGPixmap);
osd->DestroyPixmap(scrollbarPixmap);
osd->DestroyPixmap(contentHeadPixmap);
}
@@ -185,6 +189,7 @@ void cFlatDisplayMenu::Clear(void) {
textScroller.Reset();
menuPixmap->Fill(clrTransparent);
menuIconsPixmap->Fill(clrTransparent);
+ menuIconsBGPixmap->Fill(clrTransparent);
scrollbarPixmap->Fill(clrTransparent);
contentHeadPixmap->Fill(clrTransparent);
ContentClear();
@@ -679,6 +684,12 @@ bool cFlatDisplayMenu::SetItemChannel(const cChannel *Channel, int Index, bool C
int imageHeight = fontHeight;
int imageLeft = Left;
int imageTop = Top;
+
+ cImage *imgBG = imgLoader.LoadIcon("logo_background", imageHeight, imageHeight);
+ if( imgBG ) {
+ imageTop = Top + (fontHeight - imgBG->Height()) / 2;
+ menuIconsBGPixmap->DrawImage( cPoint(imageLeft, imageTop), *imgBG );
+ }
cImage *img = imgLoader.LoadLogo(Channel->Name(), imageHeight, imageHeight);
if( img ) {
imageTop = Top + (fontHeight - img->Height()) / 2;
@@ -999,6 +1010,12 @@ bool cFlatDisplayMenu::SetItemTimer(const cTimer *Timer, int Index, bool Current
Left += Width + marginItem;
imageLeft = Left;
+
+ cImage *imgBG = imgLoader.LoadIcon("logo_background", imageHeight, imageHeight);
+ if( imgBG ) {
+ imageTop = Top + (fontHeight - imgBG->Height()) / 2;
+ menuIconsBGPixmap->DrawImage( cPoint(imageLeft, imageTop), *imgBG );
+ }
img = imgLoader.LoadLogo(Channel->Name(), imageHeight, imageHeight);
if( img ) {
@@ -1193,6 +1210,12 @@ bool cFlatDisplayMenu::SetItemEvent(const cEvent *Event, int Index, bool Current
menuPixmap->DrawText(cPoint(Left, Top), buffer, ColorFg, ColorBg, font, Width, fontHeight, taRight);
}
Left += w + marginItem;
+
+ cImage *imgBG = imgLoader.LoadIcon("logo_background", fontHeight, fontHeight);
+ if( imgBG ) {
+ imageTop = Top + (fontHeight - imgBG->Height()) / 2;
+ menuIconsBGPixmap->DrawImage( cPoint(Left, imageTop), *imgBG );
+ }
img = imgLoader.LoadLogo(Channel->Name(), fontHeight, fontHeight);
if( img ) {
diff --git a/displaymenu.h b/displaymenu.h
index 52f82e3c..ecc106d5 100644
--- a/displaymenu.h
+++ b/displaymenu.h
@@ -13,6 +13,8 @@ class cFlatDisplayMenu : public cFlatBaseRender, public cSkinDisplayMenu {
private:
cPixmap *menuPixmap;
cPixmap *menuIconsPixmap;
+ cPixmap *menuIconsBGPixmap;
+
int menuTop, menuWidth;
int menuItemWidth;
diff --git a/icons/default/logo_background.png b/icons/default/logo_background.png
new file mode 100644
index 00000000..b8e6fbf5
--- /dev/null
+++ b/icons/default/logo_background.png
Binary files differ
diff --git a/icons/default/radio.png b/icons/default/radio.png
index d1adb0e5..5a6469c4 100644
--- a/icons/default/radio.png
+++ b/icons/default/radio.png
Binary files differ
diff --git a/icons/default/tv.png b/icons/default/tv.png
index 4dbfdb6d..8419551a 100644
--- a/icons/default/tv.png
+++ b/icons/default/tv.png
Binary files differ