diff options
Diffstat (limited to 'geometrymanager.c')
-rw-r--r-- | geometrymanager.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/geometrymanager.c b/geometrymanager.c index 35da932..a0f3a66 100644 --- a/geometrymanager.c +++ b/geometrymanager.c @@ -20,39 +20,39 @@ bool cGeometryManager::SetGeometry(int osdWidth, int osdHeight, bool force) { this->osdHeight = osdHeight; esyslog("tvguide: Set OSD to %d x %d px", osdWidth, osdHeight); - statusHeaderHeight = (tvguideConfig.displayStatusHeader)?(tvguideConfig.headerHeightPercent * osdHeight / 100):0; + statusHeaderHeight = (config.displayStatusHeader) ? (config.headerHeightPercent * osdHeight / 100):0; tvFrameWidth = statusHeaderHeight * 16 / 9; - headerContentWidth = (tvguideConfig.scaleVideo)?(osdWidth - tvFrameWidth):osdWidth; - channelGroupsWidth = (tvguideConfig.displayChannelGroups)?(tvguideConfig.channelGroupsPercent * osdWidth / 100):0; - channelGroupsHeight = (tvguideConfig.displayChannelGroups)?(tvguideConfig.channelGroupsPercent * osdHeight / 100):0; - channelHeaderWidth = tvguideConfig.channelHeaderWidthPercent * osdWidth / 100; - channelHeaderHeight = tvguideConfig.channelHeaderHeightPercent * osdHeight / 100; - timeLineWidth = tvguideConfig.timeLineWidthPercent * osdWidth / 100; - timeLineHeight = tvguideConfig.timeLineHeightPercent * osdHeight / 100; - footerHeight = tvguideConfig.footerHeightPercent * osdHeight / 100; + headerContentWidth = (config.scaleVideo) ? (osdWidth - tvFrameWidth):osdWidth; + channelGroupsWidth = (config.displayChannelGroups) ? (config.channelGroupsPercent * osdWidth / 100):0; + channelGroupsHeight = (config.displayChannelGroups) ? (config.channelGroupsPercent * osdHeight / 100):0; + channelHeaderWidth = config.channelHeaderWidthPercent * osdWidth / 100; + channelHeaderHeight = config.channelHeaderHeightPercent * osdHeight / 100; + timeLineWidth = config.timeLineWidthPercent * osdWidth / 100; + timeLineHeight = config.timeLineHeightPercent * osdHeight / 100; + footerHeight = config.footerHeightPercent * osdHeight / 100; footerY = osdHeight - footerHeight; - if (tvguideConfig.displayMode == eVertical) { - colWidth = (osdWidth - timeLineWidth) / tvguideConfig.channelCols; + if (config.displayMode == eVertical) { + colWidth = (osdWidth - timeLineWidth) / config.channelCols; rowHeight = 0; - minutePixel = (osdHeight - statusHeaderHeight - channelGroupsHeight - channelHeaderHeight - footerHeight) / tvguideConfig.displayTime; + minutePixel = (osdHeight - statusHeaderHeight - channelGroupsHeight - channelHeaderHeight - footerHeight) / config.displayTime; channelLogoWidth = colWidth; channelLogoHeight = channelHeaderHeight; - logoWidth = channelLogoWidth/2 - 15; - logoHeight = logoWidth * tvguideConfig.logoHeightRatio / tvguideConfig.logoWidthRatio; + logoWidth = channelLogoWidth / 2 - 15; + logoHeight = logoWidth * config.logoHeightRatio / config.logoWidthRatio; timeLineGridWidth = timeLineWidth; timeLineGridHeight = minutePixel * 30; dateVieverWidth = timeLineWidth; dateVieverHeight = (channelHeaderHeight + channelGroupsHeight) * 2 / 3; clockWidth = dateVieverWidth; clockHeight = (channelHeaderHeight + channelGroupsHeight) - dateVieverHeight; - } else if (tvguideConfig.displayMode == eHorizontal) { + } else if (config.displayMode == eHorizontal) { colWidth = 0; - rowHeight = (osdHeight - statusHeaderHeight - timeLineHeight - footerHeight) / tvguideConfig.channelRows; - minutePixel = (osdWidth - channelHeaderWidth - channelGroupsWidth) / tvguideConfig.displayHorizontalTime; + rowHeight = (osdHeight - statusHeaderHeight - timeLineHeight - footerHeight) / config.channelRows; + minutePixel = (osdWidth - channelHeaderWidth - channelGroupsWidth) / config.displayHorizontalTime; channelLogoWidth = channelHeaderWidth; channelLogoHeight = rowHeight; - logoWidth = channelLogoHeight * tvguideConfig.logoWidthRatio / tvguideConfig.logoHeightRatio; + logoWidth = channelLogoHeight * config.logoWidthRatio / config.logoHeightRatio; logoHeight = channelLogoHeight; timeLineGridWidth = geoManager.minutePixel * 30; timeLineGridHeight = geoManager.timeLineHeight; @@ -65,7 +65,7 @@ bool cGeometryManager::SetGeometry(int osdWidth, int osdHeight, bool force) { buttonWidth = osdWidth / 4 - 2 * buttonBorder; buttonHeight = footerHeight - 3 * buttonBorder; - epgViewHeaderHeight = tvguideConfig.headerHeightPercent * osdHeight / 100; + epgViewHeaderHeight = config.headerHeightPercent * osdHeight / 100; borderRecMenus = 10; |