summaryrefslogtreecommitdiff
path: root/timeline.c
diff options
context:
space:
mode:
authorkamel5 <vdr.kamel5 (at) gmx (dot) net>2019-10-19 13:25:02 +0200
committerkamel5 <vdr.kamel5 (at) gmx (dot) net>2019-10-19 15:10:20 +0200
commite236d9e571b7720030490f7a2ea69ca922fab96d (patch)
treecbaecf89d0c1d3f7a4949302eb58401d90856807 /timeline.c
parent87948915995c0d2752a3aaa80d470ee7e5366902 (diff)
downloadvdr-plugin-tvguide-e236d9e571b7720030490f7a2ea69ca922fab96d.tar.gz
vdr-plugin-tvguide-e236d9e571b7720030490f7a2ea69ca922fab96d.tar.bz2
Optimize cTimeLine::drawClock
Diffstat (limited to 'timeline.c')
-rw-r--r--timeline.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/timeline.c b/timeline.c
index 149ba51..5fe1c99 100644
--- a/timeline.c
+++ b/timeline.c
@@ -32,18 +32,8 @@ cTimeLine::cTimeLine(cTimeManager *timeManager) {
1440 * geoManager.minutePixel,
geoManager.timeLineHeight));
}
- int clockY;
- int clockX;
- if (config.displayMode == eVertical) {
- clockY = geoManager.statusHeaderHeight;
- clockX = 0;
- }
- else {
- clockY = geoManager.statusHeaderHeight;
- clockX = 0;
- }
- clock = new cStyledPixmap(osdManager.requestPixmap(3, cRect(clockX,
- clockY,
+ clock = new cStyledPixmap(osdManager.requestPixmap(4, cRect(0,
+ geoManager.statusHeaderHeight,
geoManager.clockWidth,
geoManager.clockHeight)));
}
@@ -271,8 +261,7 @@ void cTimeLine::setTimeline() {
bool cTimeLine::drawClock() {
cString currentTime = timeManager->GetCurrentTime();
if (strcmp(currentTime, lastClock)) {
- if (config.displayMode == eVertical)
- clock->Fill(clrTransparent);
+ clock->Fill(clrTransparent);
const cFont *font = (config.displayMode == eVertical) ? fontManager.FontTimeLineTime : fontManager.FontTimeLineTimeHorizontal;
int textHeight = font->Height();
int clockTextWidth = font->Width(*currentTime);