summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkamel5 <vdr.kamel5 (at) gmx (dot) net>2022-01-31 13:38:07 +0100
committerkamel5 <vdr.kamel5 (at) gmx (dot) net>2022-06-25 13:29:18 +0200
commit5638c408c15d64d363d49e788993f5cf9c3687af (patch)
tree33f1ea26d3859f3ad6b633fbdff3098cfa6ee605
parent519a87a4715d4479884ff347ccbc3cd564ea5ba9 (diff)
downloadvdr-plugin-tvguide-5638c408c15d64d363d49e788993f5cf9c3687af.tar.gz
vdr-plugin-tvguide-5638c408c15d64d363d49e788993f5cf9c3687af.tar.bz2
Better fit channel logo in search result
-rw-r--r--recmenuitem.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/recmenuitem.c b/recmenuitem.c
index 918014a..00df893 100644
--- a/recmenuitem.c
+++ b/recmenuitem.c
@@ -1878,12 +1878,11 @@ void cRecMenuItemEvent::Draw(void) {
if (channel)
channelName = channel->Name();
int logoWidth = height * config.logoWidthRatio / config.logoHeightRatio;
- cImageLoader imgLoader;
if (!config.hideChannelLogos) {
- if (imgLoader.LoadLogo(channel, logoWidth, height)) {
+ cImageLoader imgLoader;
+ if (imgLoader.LoadLogo(channel, logoWidth * 0.8, height * 0.8)) {
cImage logo = imgLoader.GetImage();
- pixmapText->DrawImage(cPoint(logoX, (height - logo.Height()) / 2), logo);
-// logoX += logoWidth + 5;
+ pixmapText->DrawImage(cPoint(logoX + (logoWidth - logo.Width()) / 2, (height - logo.Height()) / 2), logo);
}
logoX += logoWidth + 5;
}