summaryrefslogtreecommitdiff
path: root/displaychannel.c
diff options
context:
space:
mode:
authorMartin Schirrmacher <vdr.skinflatplus@schirrmacher.eu>2014-04-03 18:13:11 +0200
committerMartin Schirrmacher <vdr.skinflatplus@schirrmacher.eu>2014-04-03 18:13:11 +0200
commit9df36839398d1b3ddba93860cdb9d4923b55155c (patch)
treed7639cbff442b916adba9dea51bfbc12c3429a43 /displaychannel.c
parentf1050be7475b98f2a3a094c1451f7360d18663e4 (diff)
downloadskin-flatplus-9df36839398d1b3ddba93860cdb9d4923b55155c.tar.gz
skin-flatplus-9df36839398d1b3ddba93860cdb9d4923b55155c.tar.bz2
wide format channel logos in menu and topbar
Diffstat (limited to 'displaychannel.c')
-rw-r--r--displaychannel.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/displaychannel.c b/displaychannel.c
index 71338395..6c84c841 100644
--- a/displaychannel.c
+++ b/displaychannel.c
@@ -140,7 +140,7 @@ void cFlatDisplayChannel::SetChannel(const cChannel *Channel, int Number) {
int imageBGWidth = imageHeight;
int imageLeft = marginItem*2;
int imageTop = marginItem;
- cImage *imgBG = imgLoader.LoadIcon("logo_background", imageHeight*1.3, imageHeight);
+ cImage *imgBG = imgLoader.LoadIcon("logo_background", imageHeight*1.34, imageHeight);
if( imgBG ) {
imageBGHeight = imgBG->Height();
imageBGWidth = imgBG->Width();
@@ -547,15 +547,23 @@ void cFlatDisplayChannel::Flush(void) {
void cFlatDisplayChannel::PreLoadImages(void) {
int height = (fontHeight*2) + (fontSmlHeight*2) + marginItem - marginItem*2;
imgLoader.LoadIcon("logo_background", height, height);
- imgLoader.LoadIcon("radio", height, height);
- imgLoader.LoadIcon("tv", height, height);
-
+ int imageBGHeight, imageBGWidth;
+ imageBGHeight = imageBGWidth = height;
+
+ cImage *imgBG = imgLoader.LoadIcon("logo_background", height*1.34, height);
+ if( imgBG ) {
+ imageBGHeight = imgBG->Height();
+ imageBGWidth = imgBG->Width();
+ }
+ imgLoader.LoadIcon("radio", imageBGWidth - 10, imageBGHeight - 10);
+ imgLoader.LoadIcon("tv", imageBGWidth - 10, imageBGHeight - 10);
+
int index = 0;
height = ((fontHeight*2) + (fontSmlHeight*2) + marginItem) - marginItem*2;
cImage *img = NULL;
for(cChannel *Channel = Channels.First(); Channel && index < LOGO_PRE_CACHE; Channel = Channels.Next(Channel) )
{
- img = imgLoader.LoadLogo(Channel->Name(), height, height);
+ img = imgLoader.LoadLogo(Channel->Name(), imageBGWidth - 4, imageBGHeight - 4);
if( img )
index++;
}