mirror of
https://projects.vdr-developer.org/git/vdr-plugin-tvguide.git
synced 2023-10-05 15:01:48 +02:00
Optimize cTimeLine::drawClock
This commit is contained in:
parent
8794891599
commit
e236d9e571
17
timeline.c
17
timeline.c
@ -32,18 +32,8 @@ cTimeLine::cTimeLine(cTimeManager *timeManager) {
|
|||||||
1440 * geoManager.minutePixel,
|
1440 * geoManager.minutePixel,
|
||||||
geoManager.timeLineHeight));
|
geoManager.timeLineHeight));
|
||||||
}
|
}
|
||||||
int clockY;
|
clock = new cStyledPixmap(osdManager.requestPixmap(4, cRect(0,
|
||||||
int clockX;
|
geoManager.statusHeaderHeight,
|
||||||
if (config.displayMode == eVertical) {
|
|
||||||
clockY = geoManager.statusHeaderHeight;
|
|
||||||
clockX = 0;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
clockY = geoManager.statusHeaderHeight;
|
|
||||||
clockX = 0;
|
|
||||||
}
|
|
||||||
clock = new cStyledPixmap(osdManager.requestPixmap(3, cRect(clockX,
|
|
||||||
clockY,
|
|
||||||
geoManager.clockWidth,
|
geoManager.clockWidth,
|
||||||
geoManager.clockHeight)));
|
geoManager.clockHeight)));
|
||||||
}
|
}
|
||||||
@ -271,8 +261,7 @@ void cTimeLine::setTimeline() {
|
|||||||
bool cTimeLine::drawClock() {
|
bool cTimeLine::drawClock() {
|
||||||
cString currentTime = timeManager->GetCurrentTime();
|
cString currentTime = timeManager->GetCurrentTime();
|
||||||
if (strcmp(currentTime, lastClock)) {
|
if (strcmp(currentTime, lastClock)) {
|
||||||
if (config.displayMode == eVertical)
|
clock->Fill(clrTransparent);
|
||||||
clock->Fill(clrTransparent);
|
|
||||||
const cFont *font = (config.displayMode == eVertical) ? fontManager.FontTimeLineTime : fontManager.FontTimeLineTimeHorizontal;
|
const cFont *font = (config.displayMode == eVertical) ? fontManager.FontTimeLineTime : fontManager.FontTimeLineTimeHorizontal;
|
||||||
int textHeight = font->Height();
|
int textHeight = font->Height();
|
||||||
int clockTextWidth = font->Width(*currentTime);
|
int clockTextWidth = font->Width(*currentTime);
|
||||||
|
Loading…
Reference in New Issue
Block a user