From ba6738dc00d068e5c54aae1cc3c9a8ea93681a91 Mon Sep 17 00:00:00 2001 From: kamel5 Date: Sun, 5 Jun 2022 12:14:14 +0200 Subject: No use of channelBorderVertical and channelBorderBottom in DisplayChannel This values can better used in GeometryManager. --- displaychannelview.c | 4 ++-- geometrymanager.c | 15 ++++++--------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/displaychannelview.c b/displaychannelview.c index 03debb2..840716a 100644 --- a/displaychannelview.c +++ b/displaychannelview.c @@ -515,8 +515,8 @@ void cNopacityDisplayChannelView::DrawPoster(const cEvent *event, bool initial) } else return; int border = config.GetValue("channelPosterBorder"); - pixmapPoster = osd->CreatePixmap(1, cRect(config.GetValue("channelBorderVertical"), - config.GetValue("channelBorderBottom"), + pixmapPoster = osd->CreatePixmap(1, cRect(0, + 0, mediaWidth + 2 * border, mediaHeight + 2 * border)); if (initial && config.GetValue("animation") && config.GetValue("channelFadeTime")) { diff --git a/geometrymanager.c b/geometrymanager.c index 9bc7c4c..552aa61 100644 --- a/geometrymanager.c +++ b/geometrymanager.c @@ -99,22 +99,19 @@ void cGeometryManager::SetGeometry(void) { menuTimersLogoHeight = timersLogoSize.Height(); // DisplayChannel Sizes - channelOsdLeft = osdLeft; - channelOsdTop = osdTop; - channelOsdWidth = osdWidth; - channelOsdHeight = osdHeight - config.GetValue("channelBorderBottom"); + channelOsdLeft = osdLeft + config.GetValue("channelBorderVertical"); + channelOsdTop = osdTop + config.GetValue("channelBorderBottom"); + channelOsdWidth = osdWidth - 2 * config.GetValue("channelBorderVertical"); + channelOsdHeight = osdHeight - 2 * config.GetValue("channelBorderBottom"); - channelX = config.GetValue("channelBorderVertical"); - channelWidth = channelOsdWidth - 2 * config.GetValue("channelBorderVertical"); + channelX = 0; + channelWidth = channelOsdWidth; channelHeight = channelOsdHeight * config.GetValue("channelHeight") / 100; channelTop = channelOsdHeight - channelHeight; if (!(config.GetValue("scraperInfo") && config.GetValue("displayPoster"))) { - channelOsdLeft += channelX; channelOsdTop += channelTop; - channelOsdWidth = channelWidth; channelOsdHeight = channelHeight; - channelX = 0; channelTop = 0; } -- cgit v1.2.3