diff options
author | louis <louis.braun@gmx.de> | 2013-05-26 16:54:22 +0200 |
---|---|---|
committer | louis <louis.braun@gmx.de> | 2013-05-26 16:54:22 +0200 |
commit | d775c945bf9312a4aa87ab6e76ba4e0e46c4d7cd (patch) | |
tree | bc514f2ed5b750ec904c09c1736efe9d483eea8a | |
parent | 4067a403db3e28afe7bcb025e03c1979d7e0026f (diff) | |
download | vdr-plugin-tvguide-d775c945bf9312a4aa87ab6e76ba4e0e46c4d7cd.tar.gz vdr-plugin-tvguide-d775c945bf9312a4aa87ab6e76ba4e0e46c4d7cd.tar.bz2 |
Fixed a bug in color display
-rw-r--r-- | osdmanager.c | 6 | ||||
-rw-r--r-- | themes/tvguide-nOpacitydarkred.theme | 4 | ||||
-rw-r--r-- | timeline.c | 18 |
3 files changed, 18 insertions, 10 deletions
diff --git a/osdmanager.c b/osdmanager.c index ab7eaad..9347f8c 100644 --- a/osdmanager.c +++ b/osdmanager.c @@ -38,13 +38,15 @@ bool cOsdManager::setOsd() { }
void cOsdManager::setBackground() {
+esyslog("tvguide: %d %d", Width(), Height());
+
if (tvguideConfig.displayStatusHeader && tvguideConfig.scaleVideo) {
int widthStatus = cOsd::OsdWidth() - tvguideConfig.statusHeaderHeight * 16 / 9;
osd->DrawRectangle(0, 0, widthStatus, tvguideConfig.statusHeaderHeight, theme.Color(clrBackgroundOSD));
- osd->DrawRectangle(0, tvguideConfig.statusHeaderHeight, cOsd::OsdWidth(), cOsd::OsdHeight() - tvguideConfig.statusHeaderHeight, theme.Color(clrBackgroundOSD));
+ osd->DrawRectangle(0, tvguideConfig.statusHeaderHeight, Width(), Height(), theme.Color(clrBackgroundOSD));
}
else
- osd->DrawRectangle(0, 0, cOsd::OsdWidth(), cOsd::OsdHeight(), theme.Color(clrBackgroundOSD));
+ osd->DrawRectangle(0, 0, Width(), Height(), theme.Color(clrBackgroundOSD));
}
cPixmap *cOsdManager::requestPixmap(int Layer, const cRect &ViewPort, const cRect &DrawPort) {
diff --git a/themes/tvguide-nOpacitydarkred.theme b/themes/tvguide-nOpacitydarkred.theme index 63d9214..0b6cb85 100644 --- a/themes/tvguide-nOpacitydarkred.theme +++ b/themes/tvguide-nOpacitydarkred.theme @@ -12,7 +12,9 @@ clrFontHeader = FFFFFFFF clrFontButtons = FFFFFFFF clrHeader = EE888888 clrHeaderBlending = 90000000 -clrBorder = AABB0000 +clrBorder = AABB0000 +clrStatusHeader = 00000000 +clrStatusHeaderBlending = 00000000 clrTimeline1 = BBFFFFFF clrTimeline1Blending = 90828282 clrTimeline2 = BB000000 @@ -48,25 +48,26 @@ void cTimeLine::drawDateViewer() { dateViewer->setColor(theme.Color(clrHeader), theme.Color(clrHeaderBlending));
dateViewer->drawBackground();
dateViewer->drawBorder();
+ tColor colorFontBack = (tvguideConfig.useBlending==0)?theme.Color(clrHeader):clrTransparent;
if (tvguideConfig.displayMode == eVertical) {
int textHeight = tvguideConfig.FontTimeLineWeekday->Height();
int weekdayWidth = tvguideConfig.FontTimeLineWeekday->Width(*weekDay);
int dateWidth = tvguideConfig.FontTimeLineDate->Width(*date);
- dateViewer->DrawText(cPoint((tvguideConfig.timeLineWidth-weekdayWidth)/2, (tvguideConfig.channelHeaderHeight-2*textHeight)/2), *weekDay, theme.Color(clrFontHeader), clrTransparent, tvguideConfig.FontTimeLineWeekday);
- dateViewer->DrawText(cPoint((tvguideConfig.timeLineWidth-dateWidth)/2, (tvguideConfig.channelHeaderHeight-2*textHeight)/2 + textHeight + 5), *date, theme.Color(clrFontHeader), clrTransparent, tvguideConfig.FontTimeLineDate);
+ dateViewer->DrawText(cPoint((tvguideConfig.timeLineWidth-weekdayWidth)/2, (tvguideConfig.channelHeaderHeight-2*textHeight)/2), *weekDay, theme.Color(clrFontHeader), colorFontBack, tvguideConfig.FontTimeLineWeekday);
+ dateViewer->DrawText(cPoint((tvguideConfig.timeLineWidth-dateWidth)/2, (tvguideConfig.channelHeaderHeight-2*textHeight)/2 + textHeight + 5), *date, theme.Color(clrFontHeader), colorFontBack, tvguideConfig.FontTimeLineDate);
} else if (tvguideConfig.displayMode == eHorizontal) {
cString strDate = cString::sprintf("%s %s", *weekDay, *date);
int x = (dateViewer->Width() - tvguideConfig.FontTimeLineDateHorizontal->Width(*strDate))/2;
int y = (dateViewer->Height() - tvguideConfig.FontTimeLineDateHorizontal->Height())/2;
- dateViewer->DrawText(cPoint(x, y), *strDate, theme.Color(clrFontHeader), clrTransparent, tvguideConfig.FontTimeLineDateHorizontal);
+ dateViewer->DrawText(cPoint(x, y), *strDate, theme.Color(clrFontHeader), colorFontBack, tvguideConfig.FontTimeLineDateHorizontal);
}
}
void cTimeLine::drawTimeline() {
timeline->SetTile(true);
timeline->Fill(theme.Color(clrBackground));
- tColor colorFont;
+ tColor colorFont, colorBackground;
int imgWidth, imgHeight;
if (tvguideConfig.displayMode == eVertical) {
@@ -87,6 +88,7 @@ void cTimeLine::drawTimeline() { if (i%2==0) {
img = img1;
colorFont = theme.Color(clrTimeline2);
+ colorBackground = (tvguideConfig.useBlending==0)?theme.Color(clrTimeline1):clrTransparent;
if (tvguideConfig.timeFormat == e12Hours) {
if (i == 0)
sprintf(timetext, "12:00 PM");
@@ -100,6 +102,7 @@ void cTimeLine::drawTimeline() { } else {
img = img2;
colorFont = theme.Color(clrTimeline1);
+ colorBackground = (tvguideConfig.useBlending==0)?theme.Color(clrTimeline2):clrTransparent;
if (tvguideConfig.timeFormat == e12Hours) {
if (i == 1)
sprintf(timetext, "12:30 PM");
@@ -115,11 +118,11 @@ void cTimeLine::drawTimeline() { posY = i*tvguideConfig.minutePixel*30;
timeline->DrawImage(cPoint(2, posY), *img);
textWidth = tvguideConfig.FontTimeLineTime->Width(timetext);
- timeline->DrawText(cPoint((tvguideConfig.timeLineWidth-textWidth)/2, posY + 5), timetext, colorFont, clrTransparent, tvguideConfig.FontTimeLineTime);
+ timeline->DrawText(cPoint((tvguideConfig.timeLineWidth-textWidth)/2, posY + 5), timetext, colorFont, colorBackground, tvguideConfig.FontTimeLineTime);
} else if (tvguideConfig.displayMode == eHorizontal) {
posX = i*tvguideConfig.minutePixel*30;
timeline->DrawImage(cPoint(posX, 2), *img);
- timeline->DrawText(cPoint(posX + 2, (dateViewer->Height() - tvguideConfig.FontTimeLineTimeHorizontal->Height())/2), timetext, colorFont, clrTransparent, tvguideConfig.FontTimeLineTimeHorizontal);
+ timeline->DrawText(cPoint(posX + 2, (dateViewer->Height() - tvguideConfig.FontTimeLineTimeHorizontal->Height())/2), timetext, colorFont, colorBackground, tvguideConfig.FontTimeLineTimeHorizontal);
}
}
setTimeline();
@@ -173,8 +176,9 @@ void cTimeLine::drawClock() { cString currentTime = myTime->GetCurrentTime();
int textHeight = tvguideConfig.FontTimeLineTime->Height();
int clockWidth = tvguideConfig.FontTimeLineTime->Width(*currentTime);
+ tColor colorFontBack = (tvguideConfig.useBlending==0)?theme.Color(clrHeader):clrTransparent;
clock->setColor(theme.Color(clrHeader), theme.Color(clrHeaderBlending));
clock->drawBackground();
clock->drawBorder();
- clock->DrawText(cPoint((tvguideConfig.timeLineWidth-clockWidth)/2, (tvguideConfig.footerHeight-textHeight)/2), *currentTime, theme.Color(clrFontHeader), clrTransparent, tvguideConfig.FontTimeLineTime);
+ clock->DrawText(cPoint((tvguideConfig.timeLineWidth-clockWidth)/2, (tvguideConfig.footerHeight-textHeight)/2), *currentTime, theme.Color(clrFontHeader), colorFontBack, tvguideConfig.FontTimeLineTime);
}
\ No newline at end of file |