Center some channel logos

This commit is contained in:
kamel5 2020-08-01 19:58:28 +02:00
parent 52c41ff5af
commit bf3a8a430b

View File

@ -1601,7 +1601,7 @@ void cRecMenuItemTimer::Draw(void) {
if (!config.hideChannelLogos) { if (!config.hideChannelLogos) {
if (imgLoader.LoadLogo(channel, logoWidth, height)) { if (imgLoader.LoadLogo(channel, logoWidth, height)) {
cImage logo = imgLoader.GetImage(); cImage logo = imgLoader.GetImage();
pixmapIcons->DrawImage(cPoint(logoX, 0), logo); pixmapIcons->DrawImage(cPoint(logoX, (height - logo.Height()) / 2), logo);
logoX += logoWidth + 5; logoX += logoWidth + 5;
} }
} }
@ -2013,7 +2013,7 @@ void cRecMenuItemChannelChooser::DrawValue(void) {
cImageLoader imgLoader; cImageLoader imgLoader;
if (imgLoader.LoadLogo(channel, logoWidth, height - 10)) { if (imgLoader.LoadLogo(channel, logoWidth, height - 10)) {
cImage logo = imgLoader.GetImage(); cImage logo = imgLoader.GetImage();
pixmapChannel->DrawImage(cPoint(logoX, 5), logo); pixmapChannel->DrawImage(cPoint(logoX, (height - logo.Height()) / 2), logo);
} }
} else { } else {
cString textVal = tr("all Channels"); cString textVal = tr("all Channels");
@ -2393,7 +2393,7 @@ void cRecMenuItemTimelineHeader::DrawCurrentTimer(void) {
if (!config.hideChannelLogos) { if (!config.hideChannelLogos) {
if (imgLoader.LoadLogo(channel, logoWidth, infoHeight)) { if (imgLoader.LoadLogo(channel, logoWidth, infoHeight)) {
cImage logo = imgLoader.GetImage(); cImage logo = imgLoader.GetImage();
pixmapTimerInfo->DrawImage(cPoint(0, 0), logo); pixmapTimerInfo->DrawImage(cPoint(0, (infoHeight - logo.Height()) / 2), logo);
x += logoWidth + 10; x += logoWidth + 10;
logoDrawn = true; logoDrawn = true;
} }