Optimize cTimeLine::drawClock

This commit is contained in:
kamel5 2019-10-19 13:25:02 +02:00
parent 8794891599
commit e236d9e571

View File

@ -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,7 +261,6 @@ void cTimeLine::setTimeline() {
bool cTimeLine::drawClock() {
cString currentTime = timeManager->GetCurrentTime();
if (strcmp(currentTime, lastClock)) {
if (config.displayMode == eVertical)
clock->Fill(clrTransparent);
const cFont *font = (config.displayMode == eVertical) ? fontManager.FontTimeLineTime : fontManager.FontTimeLineTimeHorizontal;
int textHeight = font->Height();