diff options
author | louis <louis.braun@gmx.de> | 2013-12-21 11:25:03 +0100 |
---|---|---|
committer | louis <louis.braun@gmx.de> | 2013-12-21 11:25:03 +0100 |
commit | 4c61104675de5f1fac7e7fa95fb5743e18defc02 (patch) | |
tree | 7a3ee90e3b28246e8d4595954d4559445fb7ebe7 /epggrid.c | |
parent | 8aa2c81d3165a0517115337362f1203ea4bdd899 (diff) | |
download | vdr-plugin-tvguide-4c61104675de5f1fac7e7fa95fb5743e18defc02.tar.gz vdr-plugin-tvguide-4c61104675de5f1fac7e7fa95fb5743e18defc02.tar.bz2 |
Version 1.2.0pre
Diffstat (limited to 'epggrid.c')
-rw-r--r-- | epggrid.c | 58 |
1 files changed, 29 insertions, 29 deletions
@@ -27,7 +27,7 @@ void cEpgGrid::SetViewportHeight() { } else {
viewportHeight = Duration() / 60;
}
- viewportHeight *= tvguideConfig.minutePixel;
+ viewportHeight *= geoManager.minutePixel;
if (viewportHeight != viewportHeightOld)
dirty = true;
}
@@ -36,27 +36,27 @@ void cEpgGrid::PositionPixmap() { int x0, y0;
if (tvguideConfig.displayMode == eVertical) {
int x0 = column->getX();
- int y0 = tvguideConfig.statusHeaderHeight + tvguideConfig.channelHeaderHeight + tvguideConfig.channelGroupsHeight;
+ int y0 = geoManager.statusHeaderHeight + geoManager.channelHeaderHeight + geoManager.channelGroupsHeight;
if ( column->Start() < StartTime() ) {
- y0 += (StartTime() - column->Start())/60*tvguideConfig.minutePixel;
+ y0 += (StartTime() - column->Start())/60*geoManager.minutePixel;
}
if (!pixmap) {
- pixmap = osdManager.requestPixmap(-1, cRect(x0, y0, tvguideConfig.colWidth, viewportHeight),
- cRect(0, 0, tvguideConfig.colWidth, Duration()/60*tvguideConfig.minutePixel));
+ 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, tvguideConfig.colWidth, viewportHeight));
+ pixmap->SetViewPort(cRect(x0, y0, geoManager.colWidth, viewportHeight));
}
} else if (tvguideConfig.displayMode == eHorizontal) {
- int x0 = tvguideConfig.channelHeaderWidth + tvguideConfig.channelGroupsWidth;
+ int x0 = geoManager.channelHeaderWidth + geoManager.channelGroupsWidth;
int y0 = column->getY();
if ( column->Start() < StartTime() ) {
- x0 += (StartTime() - column->Start())/60*tvguideConfig.minutePixel;
+ x0 += (StartTime() - column->Start())/60*geoManager.minutePixel;
}
if (!pixmap) {
- pixmap = osdManager.requestPixmap(-1, cRect(x0, y0, viewportHeight, tvguideConfig.rowHeight),
- cRect(0, 0, Duration()/60*tvguideConfig.minutePixel, tvguideConfig.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, tvguideConfig.rowHeight ));
+ pixmap->SetViewPort(cRect(x0, y0, viewportHeight, geoManager.rowHeight ));
}
}
@@ -89,8 +89,8 @@ void cEpgGrid::setText() { if (tvguideConfig.displayMode == eVertical) {
cString strText;
strText = cString::sprintf("%s - %s:\n%s", *(event->GetTimeString()), *(event->GetEndTimeString()), event->Title());
- text->Set(*(strText), tvguideConfig.FontGrid, tvguideConfig.colWidth-2*borderWidth);
- extText->Set(event->ShortText(), tvguideConfig.FontGridSmall, tvguideConfig.colWidth-2*borderWidth);
+ text->Set(*(strText), fontManager.FontGrid, geoManager.colWidth-2*borderWidth);
+ extText->Set(event->ShortText(), fontManager.FontGridSmall, geoManager.colWidth-2*borderWidth);
} else if (tvguideConfig.displayMode == eHorizontal) {
timeString = cString::sprintf("%s - %s", *(event->GetTimeString()), *(event->GetEndTimeString()));
}
@@ -98,38 +98,38 @@ void cEpgGrid::setText() { void cEpgGrid::drawText() {
tColor colorText = (active)?theme.Color(clrFontActive):theme.Color(clrFont);
- tColor colorTextBack = (tvguideConfig.useBlending==0)?color:clrTransparent;
+ tColor colorTextBack = (tvguideConfig.style == eStyleFlat)?color:clrTransparent;
if (tvguideConfig.displayMode == eVertical) {
- if (Height()/tvguideConfig.minutePixel < 6)
+ if (Height()/geoManager.minutePixel < 6)
return;
- int textHeight = tvguideConfig.FontGrid->Height();
+ int textHeight = fontManager.FontGrid->Height();
int textLines = text->Lines();
for (int i=0; i<textLines; i++) {
- pixmap->DrawText(cPoint(borderWidth, borderWidth + i*textHeight), text->GetLine(i), colorText, colorTextBack, tvguideConfig.FontGrid);
+ pixmap->DrawText(cPoint(borderWidth, borderWidth + i*textHeight), text->GetLine(i), colorText, colorTextBack, fontManager.FontGrid);
}
int extTextLines = extText->Lines();
int offset = (textLines+1)*textHeight - 0.5*textHeight;
- textHeight = tvguideConfig.FontGridSmall->Height();
+ textHeight = fontManager.FontGridSmall->Height();
if ((Height()-textHeight-10) > offset) {
for (int i=0; i<extTextLines; i++) {
- pixmap->DrawText(cPoint(borderWidth, borderWidth + offset + i*textHeight), extText->GetLine(i), colorText, colorTextBack, tvguideConfig.FontGridSmall);
+ pixmap->DrawText(cPoint(borderWidth, borderWidth + offset + i*textHeight), extText->GetLine(i), colorText, colorTextBack, fontManager.FontGridSmall);
}
}
} else if (tvguideConfig.displayMode == eHorizontal) {
- if (Width()/tvguideConfig.minutePixel < 10) {
- int titleY = (tvguideConfig.rowHeight - tvguideConfig.FontGridHorizontal->Height())/2;
- pixmap->DrawText(cPoint(borderWidth - 2, titleY), "...", colorText, colorTextBack, tvguideConfig.FontGridHorizontal);
+ if (Width()/geoManager.minutePixel < 10) {
+ int titleY = (geoManager.rowHeight - fontManager.FontGridHorizontal->Height())/2;
+ pixmap->DrawText(cPoint(borderWidth - 2, titleY), "...", colorText, colorTextBack, fontManager.FontGridHorizontal);
return;
}
- cString strTitle = CutText(event->Title(), viewportHeight, tvguideConfig.FontGridHorizontal).c_str();
+ cString strTitle = CutText(event->Title(), viewportHeight, fontManager.FontGridHorizontal).c_str();
int titleY = 0;
if (tvguideConfig.showTimeInGrid) {
- pixmap->DrawText(cPoint(borderWidth, borderWidth), *timeString, colorText, colorTextBack, tvguideConfig.FontGridHorizontalSmall);
- titleY = tvguideConfig.FontGridHorizontalSmall->Height() + (tvguideConfig.rowHeight - tvguideConfig.FontGridHorizontalSmall->Height() - tvguideConfig.FontGridHorizontal->Height())/2;
+ pixmap->DrawText(cPoint(borderWidth, borderWidth), *timeString, colorText, colorTextBack, fontManager.FontGridHorizontalSmall);
+ titleY = fontManager.FontGridHorizontalSmall->Height() + (geoManager.rowHeight - fontManager.FontGridHorizontalSmall->Height() - fontManager.FontGridHorizontal->Height())/2;
} else {
- titleY = (tvguideConfig.rowHeight - tvguideConfig.FontGridHorizontal->Height())/2;
+ titleY = (geoManager.rowHeight - fontManager.FontGridHorizontal->Height())/2;
}
- pixmap->DrawText(cPoint(borderWidth, titleY), *strTitle, colorText, colorTextBack, tvguideConfig.FontGridHorizontal);
+ pixmap->DrawText(cPoint(borderWidth, titleY), *strTitle, colorText, colorTextBack, fontManager.FontGridHorizontal);
}
if (hasSwitchTimer)
drawIcon("Switch", theme.Color(clrButtonYellow));
@@ -140,8 +140,8 @@ void cEpgGrid::drawText() { void cEpgGrid::drawIcon(cString iconText, tColor color) {
const cFont *font = (tvguideConfig.displayMode == eVertical)
- ?tvguideConfig.FontGrid
- :tvguideConfig.FontGridHorizontalSmall;
+ ?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);
|