Better fit channel logo in search result

This commit is contained in:
kamel5 2022-01-31 13:38:07 +01:00
parent 519a87a471
commit 5638c408c1

View File

@ -1878,12 +1878,11 @@ void cRecMenuItemEvent::Draw(void) {
if (channel) if (channel)
channelName = channel->Name(); channelName = channel->Name();
int logoWidth = height * config.logoWidthRatio / config.logoHeightRatio; int logoWidth = height * config.logoWidthRatio / config.logoHeightRatio;
cImageLoader imgLoader;
if (!config.hideChannelLogos) { 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(); cImage logo = imgLoader.GetImage();
pixmapText->DrawImage(cPoint(logoX, (height - logo.Height()) / 2), logo); pixmapText->DrawImage(cPoint(logoX + (logoWidth - logo.Width()) / 2, (height - logo.Height()) / 2), logo);
// logoX += logoWidth + 5;
} }
logoX += logoWidth + 5; logoX += logoWidth + 5;
} }