mirror of
https://projects.vdr-developer.org/git/vdr-plugin-tvguide.git
synced 2023-10-05 15:01:48 +02:00
Clock in timeline if displaymode horizontal
This commit is contained in:
parent
e62ea368e8
commit
0f092903e8
0
po/de_DE.po
Executable file → Normal file
0
po/de_DE.po
Executable file → Normal file
@ -57,7 +57,11 @@ void cStatusHeader::ScaleVideo(void) {
|
||||
|
||||
void cStatusHeader::DrawInfoText(cGrid *grid) {
|
||||
int border = 10;
|
||||
int textWidth = width - 2 * border - geoManager.clockWidth - 2;
|
||||
int textWidth = 0;
|
||||
if (tvguideConfig.displayMode == eVertical)
|
||||
textWidth = width - 2 * border - geoManager.clockWidth - 2;
|
||||
else
|
||||
textWidth = width - 2 * border;
|
||||
tColor colorTextBack = (tvguideConfig.style == eStyleFlat)?color:clrTransparent;
|
||||
pixmapText->Fill(clrTransparent);
|
||||
int x = border;
|
||||
|
21
timeline.c
21
timeline.c
@ -21,9 +21,9 @@ cTimeLine::cTimeLine(cMyTime *myTime) {
|
||||
geoManager.osdWidth,
|
||||
geoManager.timeLineGridHeight));
|
||||
} else if (tvguideConfig.displayMode == eHorizontal) {
|
||||
dateViewer = new cStyledPixmap(osdManager.requestPixmap(1, cRect(0,
|
||||
dateViewer = new cStyledPixmap(osdManager.requestPixmap(1, cRect(geoManager.clockWidth,
|
||||
geoManager.statusHeaderHeight,
|
||||
geoManager.dateVieverWidth,
|
||||
geoManager.dateVieverWidth - geoManager.clockWidth,
|
||||
geoManager.dateVieverHeight)));
|
||||
timeline = osdManager.requestPixmap(2, cRect(geoManager.channelHeaderWidth + geoManager.channelGroupsWidth,
|
||||
geoManager.statusHeaderHeight,
|
||||
@ -39,13 +39,21 @@ cTimeLine::cTimeLine(cMyTime *myTime) {
|
||||
geoManager.timeLineHeight + tvguideConfig.channelRows * geoManager.rowHeight));
|
||||
}
|
||||
timeBase->Fill(clrTransparent);
|
||||
int clockY = 10;
|
||||
int clockY;
|
||||
int clockX;
|
||||
if (tvguideConfig.displayMode == eVertical) {
|
||||
clockY = 10;
|
||||
if (tvguideConfig.scaleVideo) {
|
||||
clockX = geoManager.osdWidth - geoManager.tvFrameWidth - geoManager.clockWidth - 4;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
clockX = geoManager.osdWidth - geoManager.clockWidth - 10;
|
||||
}
|
||||
}
|
||||
else {
|
||||
clockY = geoManager.statusHeaderHeight;
|
||||
clockX = 0;
|
||||
}
|
||||
clock = new cStyledPixmap(osdManager.requestPixmap(3, cRect(clockX,
|
||||
clockY,
|
||||
geoManager.clockWidth,
|
||||
@ -74,7 +82,7 @@ void cTimeLine::drawDateViewer() {
|
||||
else
|
||||
dateViewer->Fill(clrTransparent);
|
||||
}
|
||||
tColor colorFont = theme.Color(clrFont);
|
||||
tColor colorFont = theme.Color(clrButtonYellow);
|
||||
tColor colorFontBack = (tvguideConfig.style == eStyleFlat)?theme.Color(clrHeader):clrTransparent;
|
||||
|
||||
if (tvguideConfig.displayMode == eVertical) {
|
||||
@ -85,7 +93,7 @@ void cTimeLine::drawDateViewer() {
|
||||
dateViewer->DrawText(cPoint((geoManager.timeLineWidth-dateWidth)/2, (geoManager.channelHeaderHeight + geoManager.channelGroupsHeight -2*textHeight)/2 + textHeight + 5), *date, colorFont, colorFontBack, fontManager.FontTimeLineDate);
|
||||
} else if (tvguideConfig.displayMode == eHorizontal) {
|
||||
cString strDate = cString::sprintf("%s %s", *weekDay, *date);
|
||||
int x = (dateViewer->Width() - fontManager.FontTimeLineDateHorizontal->Width(*strDate))/2;
|
||||
int x = ((dateViewer->Width() - fontManager.FontTimeLineDateHorizontal->Width(*strDate)) / 2);
|
||||
int y = (dateViewer->Height() - fontManager.FontTimeLineDateHorizontal->Height())/2;
|
||||
dateViewer->DrawText(cPoint(x, y), *strDate, colorFont, colorFontBack, fontManager.FontTimeLineDateHorizontal);
|
||||
}
|
||||
@ -259,6 +267,7 @@ void cTimeLine::setTimeline() {
|
||||
}
|
||||
|
||||
void cTimeLine::drawClock() {
|
||||
if (tvguideConfig.displayMode == eVertical)
|
||||
clock->Fill(clrTransparent);
|
||||
cString currentTime = myTime->GetCurrentTime();
|
||||
const cFont *font = (tvguideConfig.displayMode == eVertical)?fontManager.FontTimeLineTime:fontManager.FontTimeLineTimeHorizontal;
|
||||
|
Loading…
Reference in New Issue
Block a user