diff options
author | kamel5 <kamel5 (at) gmx (dot) net> | 2018-04-01 12:09:13 +0200 |
---|---|---|
committer | kamel5 <vdr.kamel5 (at) gmx (dot) net> | 2019-01-27 11:38:27 +0100 |
commit | 8f1f2dea33f8b14791df1c6ad7e0145b8c08b817 (patch) | |
tree | c0e6707547dc94b000b797becf6428daa77356fa | |
parent | f5920124428d23f9d1f55342f82c47f4e86e7a6c (diff) | |
download | vdr-plugin-tvguide-8f1f2dea33f8b14791df1c6ad7e0145b8c08b817.tar.gz vdr-plugin-tvguide-8f1f2dea33f8b14791df1c6ad7e0145b8c08b817.tar.bz2 |
Correct view of vdr's switchtimer
-rw-r--r-- | epggrid.c | 22 |
1 files changed, 12 insertions, 10 deletions
@@ -40,7 +40,7 @@ void cEpgGrid::PositionPixmap() { y0 += (StartTime() - column->Start())/60*geoManager.minutePixel;
}
if (!pixmap) {
- pixmap = osdManager.requestPixmap(-1, cRect(x0, y0, geoManager.colWidth, viewportHeight),
+ pixmap = osdManager.requestPixmap(-1, cRect(x0, y0, geoManager.colWidth, viewportHeight),
cRect(0, 0, geoManager.colWidth, Duration()/60*geoManager.minutePixel));
} else {
pixmap->SetViewPort(cRect(x0, y0, geoManager.colWidth, viewportHeight));
@@ -52,7 +52,7 @@ void cEpgGrid::PositionPixmap() { x0 += (StartTime() - column->Start())/60*geoManager.minutePixel;
}
if (!pixmap) {
- pixmap = osdManager.requestPixmap(-1, cRect(x0, y0, viewportHeight, geoManager.rowHeight),
+ pixmap = osdManager.requestPixmap(-1, cRect(x0, y0, viewportHeight, geoManager.rowHeight),
cRect(0, 0, Duration()/60*geoManager.minutePixel, geoManager.rowHeight));
} else {
pixmap->SetViewPort(cRect(x0, y0, viewportHeight, geoManager.rowHeight ));
@@ -151,7 +151,7 @@ void cEpgGrid::drawText() { }
pixmap->DrawText(cPoint(borderWidth, titleY), *strTitle, colorText, colorTextBack, fontManager.FontGridHorizontal);
}
- if (hasSwitchTimer)
+ if (hasSwitchTimer)
drawIcon("Switch", theme.Color(clrButtonYellow));
if (hasTimer) {
const cTimer *timer = NULL;
@@ -161,8 +161,10 @@ void cEpgGrid::drawText() { #ifdef USE_SWITCHONLY
if (timer->HasFlags(tfSwitchOnly))
drawIcon("Switch", theme.Color(clrButtonYellow));
-#endif /* SWITCHONLY */
else if (timer->HasFlags(tfActive))
+#else /* SWITCHONLY */
+ if (timer->HasFlags(tfActive))
+#endif /* SWITCHONLY */
drawIcon("REC", theme.Color(clrButtonRed));
else
drawIcon("REC", theme.Color(clrButtonGreen));
@@ -170,14 +172,14 @@ void cEpgGrid::drawText() { }
void cEpgGrid::drawIcon(cString iconText, tColor color) {
-
+
const cFont *font = (tvguideConfig.displayMode == eVertical)
?fontManager.FontGrid
:fontManager.FontGridHorizontalSmall;
int textWidth = font->Width(*iconText)+2*borderWidth;
int textHeight = font->Height()+10;
pixmap->DrawRectangle( cRect(Width() - textWidth - borderWidth, Height() - textHeight - borderWidth, textWidth, textHeight), color);
- pixmap->DrawText(cPoint(Width() - textWidth, Height() - textHeight - borderWidth/2), *iconText, theme.Color(clrFont), color, font);
+ pixmap->DrawText(cPoint(Width() - textWidth, Height() - textHeight - borderWidth/2), *iconText, theme.Color(clrFont), color, font);
}
cString cEpgGrid::getTimeString(void) {
@@ -185,11 +187,11 @@ cString cEpgGrid::getTimeString(void) { }
void cEpgGrid::debug() {
- esyslog("tvguide epggrid: %s: %s, %s, viewportHeight: %d px, Duration: %d min, active: %d",
+ esyslog("tvguide epggrid: %s: %s, %s, viewportHeight: %d px, Duration: %d min, active: %d",
column->Name(),
- *(event->GetTimeString()),
- event->Title(),
- viewportHeight,
+ *(event->GetTimeString()),
+ event->Title(),
+ viewportHeight,
event->Duration()/60,
active);
}
|