diff options
author | Soeren Moch <smoch@web.de> | 2022-05-05 18:23:45 +0200 |
---|---|---|
committer | kamel5 <vdr.kamel5 (at) gmx (dot) net> | 2022-05-09 12:58:58 +0200 |
commit | cce127af68231c4924d7198856b8b52c1df52e67 (patch) | |
tree | 40b75baa20f8097a690e53a46e22eeac6cc8cde6 | |
parent | 908d85b1d5aaedfb4ac8b7cc9b2bd3bd25860e01 (diff) | |
download | skin-nopacity-cce127af68231c4924d7198856b8b52c1df52e67.tar.gz skin-nopacity-cce127af68231c4924d7198856b8b52c1df52e67.tar.bz2 |
Optimize channelview OSD size
When displayPoster is disabled, most of the OSD area is not used in
channelview. Reduze the requested osd size in this case. This helps to
speed-up the display and reduces the variation in osd flush time, e.g.
for animations.
Signed-off-by: Soeren Moch <smoch@web.de>
-rw-r--r-- | displaychannel.c | 2 | ||||
-rw-r--r-- | displaychannelview.c | 4 | ||||
-rw-r--r-- | geometrymanager.c | 14 | ||||
-rw-r--r-- | geometrymanager.h | 2 |
4 files changed, 19 insertions, 3 deletions
diff --git a/displaychannel.c b/displaychannel.c index c8f1177..d711712 100644 --- a/displaychannel.c +++ b/displaychannel.c @@ -16,7 +16,7 @@ cNopacityDisplayChannel::cNopacityDisplayChannel(bool WithInfo) : cThread("Displ fadeout = false; initial = true; - osd = CreateOsd(geoManager->osdLeft, geoManager->osdTop, geoManager->osdWidth, geoManager->osdHeight); + osd = CreateOsd(geoManager->channelOsdLeft, geoManager->channelOsdTop, geoManager->channelOsdWidth, geoManager->channelOsdHeight); channelView = new cNopacityDisplayChannelView(osd); } diff --git a/displaychannelview.c b/displaychannelview.c index a3f5ed1..bb726fb 100644 --- a/displaychannelview.c +++ b/displaychannelview.c @@ -109,8 +109,8 @@ void cNopacityDisplayChannelView::CreatePixmaps(void) { geoManager->channelEpgInfoHeight) ); int statusIconsWidth = 8 * statusIconSize + 6 * statusIconBorder; - int statusIconX = geoManager->osdWidth - - config.GetValue("channelBorderVertical") + int statusIconX = geoManager->channelX + + geoManager->channelWidth - statusIconsWidth - 3*statusIconBorder; if (config.GetValue("logoPosition") == lpRight) diff --git a/geometrymanager.c b/geometrymanager.c index d979ab5..4dc5c6b 100644 --- a/geometrymanager.c +++ b/geometrymanager.c @@ -99,11 +99,25 @@ void cGeometryManager::SetGeometry(void) { menuTimersLogoHeight = timersLogoSize.Height(); // DisplayChannel Sizes + channelOsdLeft = osdLeft; + channelOsdTop = osdTop; + channelOsdWidth = osdWidth; + channelOsdHeight = osdHeight; + channelX = config.GetValue("channelBorderVertical"); channelWidth = osdWidth - 2 * config.GetValue("channelBorderVertical"); channelHeight = osdHeight * config.GetValue("channelHeight") / 100; channelTop = osdHeight - channelHeight - config.GetValue("channelBorderBottom"); + if (!config.GetValue("displayPoster")) { + channelOsdLeft += channelX; + channelOsdTop += channelTop; + channelOsdWidth = channelWidth; + channelOsdHeight = channelHeight; + channelX = 0; + channelTop = 0; + } + channelHeaderHeight = 0.2 * channelHeight; channelFooterHeight = 0.2 * channelHeight; channelContentHeight = channelHeight - channelHeaderHeight - channelFooterHeight; diff --git a/geometrymanager.h b/geometrymanager.h index 08fce75..4428128 100644 --- a/geometrymanager.h +++ b/geometrymanager.h @@ -57,6 +57,8 @@ class cGeometryManager { int menuDiskUsageHeight; int menuTimersWidth; //DisplayChannel Sizes + int channelOsdLeft, channelOsdTop; + int channelOsdWidth, channelOsdHeight; int channelX, channelTop; int channelWidth, channelHeight; int channelHeaderHeight; |