diff options
author | louis <louis.braun@gmx.de> | 2013-10-03 10:37:54 +0200 |
---|---|---|
committer | louis <louis.braun@gmx.de> | 2013-10-03 10:37:54 +0200 |
commit | 4a821c98ed14954c0fc2745ff7c2b99c75d56b1f (patch) | |
tree | a02d9e59cd0981a687934ff3416165d58b785ba2 /timers.c | |
parent | 1b7943aea0f17b8891f6b201ded6fadd17555972 (diff) | |
download | skin-nopacity-4a821c98ed14954c0fc2745ff7c2b99c75d56b1f.tar.gz skin-nopacity-4a821c98ed14954c0fc2745ff7c2b99c75d56b1f.tar.bz2 |
Added additional configurable channel logo cache
Diffstat (limited to 'timers.c')
-rw-r--r-- | timers.c | 17 |
1 files changed, 10 insertions, 7 deletions
@@ -176,13 +176,16 @@ void cNopacityTimer::DrawLogo(void) { int logoWidth = config.timersLogoWidth; int logoHeight = config.timersLogoHeight; const cChannel *Channel = timer->Channel(); - if (Channel && Channel->Name()) { - cImageLoader imgLoader; - if (showTimerLogo && imgLoader.LoadLogo(Channel->Name(), logoWidth, logoHeight)) { - pixmapLogo->DrawImage(cPoint((width - logoWidth)/2, 1), imgLoader.GetImage()); - } else if (showTimerLogo && imgLoader.LoadLogo(*(Channel->GetChannelID().ToString()), logoWidth, logoHeight)) { - pixmapLogo->DrawImage(cPoint((width - logoWidth)/2, 1), imgLoader.GetImage()); - } else { + if (Channel) { + bool logoFound = false; + if (showTimerLogo) { + cImage *logo = imgCache->GetLogo(ctLogoTimer, Channel); + if (logo) { + logoFound = true; + pixmapLogo->DrawImage(cPoint((width - logoWidth)/2, 1), *logo); + } + } + if (!showTimerLogo || !logoFound) { cTextWrapper channel; channel.Set(Channel->Name(), fontLarge, width - 10); int lines = channel.Lines(); |