Fixed OSD Background Color (Closes Ticket 1474)

This commit is contained in:
louis 2013-12-27 16:31:49 +01:00
parent 53fa2c70ca
commit c5af8c8017
12 changed files with 49 additions and 48 deletions

View File

@ -92,3 +92,4 @@ Version 1.1.0
- Added feature to jump to a specific channel with number keys
- Fixed Bug 1484
- Added Event Short Text (if available) to RecName (Closes Ticket 1490)
- Fixed OSD Background Color (Closes Ticket 1474)

View File

@ -8,9 +8,8 @@ cFooter::cFooter(cChannelGroups *channelGroups) {
currentGroup = -1;
buttonY = (geoManager.footerHeight - geoManager.buttonHeight)/2;
SetButtonPositions();
footer = osdManager.requestPixmap(2, cRect( 0,
geoManager.osdHeight - geoManager.footerHeight,
geoManager.footerY,
geoManager.osdWidth,
geoManager.footerHeight),
cRect::Null);

View File

@ -32,6 +32,7 @@ bool cGeometryManager::SetGeometry(int osdWidth, int osdHeight, bool force) {
clockWidth = tvFrameWidth / 3;
clockHeight = timeLineHeight;
footerHeight = tvguideConfig.footerHeightPercent * osdHeight / 100;
footerY = osdHeight - footerHeight;
if (tvguideConfig.displayMode == eVertical) {
colWidth = (osdWidth - timeLineWidth) / tvguideConfig.channelCols;
@ -58,7 +59,6 @@ bool cGeometryManager::SetGeometry(int osdWidth, int osdHeight, bool force) {
dateVieverWidth = channelHeaderWidth + channelGroupsWidth;
dateVieverHeight = timeLineHeight;
}
buttonBorder = footerHeight / 6;
buttonWidth = osdWidth / 4 - 2 * buttonBorder;
buttonHeight = footerHeight - 3 * buttonBorder;

View File

@ -37,6 +37,7 @@ public:
int clockWidth;
int clockHeight;
//Footer
int footerY;
int footerHeight;
int buttonWidth;
int buttonHeight;

View File

@ -623,11 +623,8 @@ void cImageCache::Clear(void) {
}
logoCache.clear();
if (tempStaticLogo) {
if (tempStaticLogo)
delete tempStaticLogo;
tempStaticLogo = NULL;
}
if (groupsHead)
delete groupsHead;
if (groupsBottom)
@ -636,7 +633,6 @@ void cImageCache::Clear(void) {
delete groupsLeft;
if (groupsRight)
delete groupsRight;
if (imgLeft)
delete imgLeft;
if (imgLeftActive)
@ -653,4 +649,18 @@ void cImageCache::Clear(void) {
delete imgBottom;
if (imgBottomActive)
delete imgBottomActive;
tempStaticLogo = NULL;
groupsHead = NULL;
groupsBottom = NULL;
groupsLeft = NULL;
groupsRight = NULL;
imgLeft = NULL;
imgLeftActive = NULL;
imgRight = NULL;
imgRightActive = NULL;
imgHead = NULL;
imgHeadActive = NULL;
imgBottom = NULL;
imgBottomActive = NULL;
}

View File

@ -16,6 +16,7 @@ bool cOsdManager::setOsd() {
}
void cOsdManager::setBackground() {
if (tvguideConfig.displayStatusHeader && tvguideConfig.scaleVideo) {
int widthStatus = cOsd::OsdWidth() - geoManager.statusHeaderHeight * 16 / 9;
osd->DrawRectangle(0, 0, widthStatus, geoManager.statusHeaderHeight, theme.Color(clrBackgroundOSD));
@ -23,6 +24,7 @@ void cOsdManager::setBackground() {
}
else
osd->DrawRectangle(0, 0, Width(), Height(), theme.Color(clrBackgroundOSD));
}
cPixmap *cOsdManager::requestPixmap(int Layer, const cRect &ViewPort, const cRect &DrawPort) {

View File

@ -133,13 +133,13 @@ int cStatusHeader::DrawPoster(const cEvent *event, int x, int y, int height, int
void cStatusHeader::DecorateVideoFrame(void) {
int radius = 16;
int frame = 10;
pixmapTVFrame->DrawRectangle(cRect(0, 0, tvFrameWidth, frame), theme.Color(clrBackground));
pixmapTVFrame->DrawEllipse(cRect(frame,frame,radius,radius), theme.Color(clrBackground), -2);
pixmapTVFrame->DrawRectangle(cRect(tvFrameWidth - frame, frame, frame, height - 2*frame), theme.Color(clrBackground));
pixmapTVFrame->DrawEllipse(cRect(tvFrameWidth - radius - frame, frame, radius, radius), theme.Color(clrBackground), -1);
pixmapTVFrame->DrawRectangle(cRect(0, frame, frame, height - 2*frame), theme.Color(clrBackground));
pixmapTVFrame->DrawEllipse(cRect(frame, height - radius - frame, radius, radius), theme.Color(clrBackground), -3);
pixmapTVFrame->DrawRectangle(cRect(0, height - frame, tvFrameWidth, frame), theme.Color(clrBackground));
pixmapTVFrame->DrawEllipse(cRect(tvFrameWidth - radius - frame, height - radius - frame, radius, radius), theme.Color(clrBackground), -4);
int frame = 2;
pixmapTVFrame->DrawRectangle(cRect(0, 0, tvFrameWidth, frame), theme.Color(clrBackgroundOSD));
pixmapTVFrame->DrawEllipse(cRect(frame,frame,radius,radius), theme.Color(clrBackgroundOSD), -2);
pixmapTVFrame->DrawRectangle(cRect(tvFrameWidth - frame, frame, frame, height - 2*frame), theme.Color(clrBackgroundOSD));
pixmapTVFrame->DrawEllipse(cRect(tvFrameWidth - radius - frame, frame, radius, radius), theme.Color(clrBackgroundOSD), -1);
pixmapTVFrame->DrawRectangle(cRect(0, frame, frame, height - 2*frame), theme.Color(clrBackgroundOSD));
pixmapTVFrame->DrawEllipse(cRect(frame, height - radius - frame, radius, radius), theme.Color(clrBackgroundOSD), -3);
pixmapTVFrame->DrawRectangle(cRect(0, height - frame, tvFrameWidth, frame), theme.Color(clrBackgroundOSD));
pixmapTVFrame->DrawEllipse(cRect(tvFrameWidth - radius - frame, height - radius - frame, radius, radius), theme.Color(clrBackgroundOSD), -4);
}

View File

@ -138,10 +138,10 @@ void cStyledPixmap::drawBorder() {
}
void cStyledPixmap::drawDefaultBorder(int width, int height) {
pixmap->DrawRectangle(cRect(0,0,width,2), theme.Color(clrBackground)); //top
pixmap->DrawRectangle(cRect(0,0,2,height), theme.Color(clrBackground)); //left
pixmap->DrawRectangle(cRect(0,height-2,width,2), theme.Color(clrBackground)); //bottom
pixmap->DrawRectangle(cRect(width-2,0,2,height), theme.Color(clrBackground)); //right
pixmap->DrawRectangle(cRect(0,0,width,2), clrTransparent); //top
pixmap->DrawRectangle(cRect(0,0,2,height), clrTransparent); //left
pixmap->DrawRectangle(cRect(0,height-2,width,2), clrTransparent); //bottom
pixmap->DrawRectangle(cRect(width-2,0,2,height), clrTransparent); //right
pixmap->DrawRectangle(cRect(2,2,width-4,1), theme.Color(clrBorder)); //top
pixmap->DrawRectangle(cRect(2,2,1,height-4), theme.Color(clrBorder)); //left
@ -160,17 +160,17 @@ void cStyledPixmap::drawBoldBorder() {
void cStyledPixmap::drawRoundedCorners(int width, int height, int radius) {
pixmap->DrawEllipse(cRect(2,2,radius,radius), theme.Color(clrBorder), -2);
pixmap->DrawEllipse(cRect(1,1,radius,radius), theme.Color(clrBackground), -2);
pixmap->DrawEllipse(cRect(1,1,radius,radius), clrTransparent, -2);
pixmap->DrawEllipse(cRect(width-radius - 2,2,radius,radius), theme.Color(clrBorder), -1);
pixmap->DrawEllipse(cRect(width-radius - 1,1,radius,radius), theme.Color(clrBackground), -1);
pixmap->DrawEllipse(cRect(width-radius - 1,1,radius,radius), clrTransparent, -1);
if( height > 2*radius) {
pixmap->DrawEllipse(cRect(2,height-radius - 2,radius,radius), theme.Color(clrBorder), -3);
pixmap->DrawEllipse(cRect(1,height-radius - 1,radius,radius), theme.Color(clrBackground), -3);
pixmap->DrawEllipse(cRect(1,height-radius - 1,radius,radius), clrTransparent, -3);
pixmap->DrawEllipse(cRect(width-radius - 2,height-radius - 2,radius,radius), theme.Color(clrBorder), -4);
pixmap->DrawEllipse(cRect(width-radius - 1,height-radius - 1,radius,radius), theme.Color(clrBackground), -4);
pixmap->DrawEllipse(cRect(width-radius - 1,height-radius - 1,radius,radius), clrTransparent, -4);
}
}

View File

@ -1,7 +1,7 @@
Description = IceBlue
clrStyle = 00000000
clrBackground = DDFFFFFF
clrBackgroundOSD = DDFFFFFF
clrBackgroundOSD = FFFFFFFF
clrGrid1 = BB555555
clrGrid2 = BB888888
clrHighlight = FF000044

View File

@ -16,10 +16,6 @@ cTimeLine::cTimeLine(cMyTime *myTime) {
0,
geoManager.timeLineWidth,
1440*geoManager.minutePixel));
timelineBack = osdManager.requestPixmap(1, cRect(0,
geoManager.statusHeaderHeight + geoManager.channelHeaderHeight + geoManager.channelGroupsHeight,
geoManager.timeLineWidth,
geoManager.osdHeight - geoManager.statusHeaderHeight - geoManager.channelHeaderHeight - geoManager.channelGroupsHeight - geoManager.footerHeight));
} else if (tvguideConfig.displayMode == eHorizontal) {
dateViewer = new cStyledPixmap(osdManager.requestPixmap(1, cRect(0,
geoManager.statusHeaderHeight,
@ -33,10 +29,6 @@ cTimeLine::cTimeLine(cMyTime *myTime) {
0,
1440*geoManager.minutePixel,
geoManager.timeLineHeight));
timelineBack = osdManager.requestPixmap(1, cRect(geoManager.channelHeaderWidth + geoManager.channelGroupsWidth,
geoManager.statusHeaderHeight,
geoManager.osdWidth - geoManager.channelHeaderWidth - geoManager.channelGroupsWidth,
geoManager.timeLineHeight));
}
int clockY = 10;
@ -55,7 +47,6 @@ cTimeLine::cTimeLine(cMyTime *myTime) {
cTimeLine::~cTimeLine(void) {
delete dateViewer;
osdManager.releasePixmap(timeline);
osdManager.releasePixmap(timelineBack);
if (clock)
delete clock;
}
@ -75,7 +66,7 @@ void cTimeLine::drawDateViewer() {
else
dateViewer->Fill(clrTransparent);
}
tColor colorFont = theme.Color(clrTimeline1);
tColor colorFont = theme.Color(clrFont);
tColor colorFontBack = (tvguideConfig.style == eStyleFlat)?theme.Color(clrHeader):clrTransparent;
if (tvguideConfig.displayMode == eVertical) {
@ -93,9 +84,8 @@ void cTimeLine::drawDateViewer() {
}
void cTimeLine::drawTimeline() {
timelineBack->Fill(clrBlack);
timeline->SetTile(true);
timeline->Fill(theme.Color(clrBackground));
timeline->Fill(clrTransparent);
tColor colorFont, colorBackground;
int imgWidth = geoManager.timeLineGridWidth;
@ -170,10 +160,10 @@ void cTimeLine::drawTimeline() {
}
void cTimeLine::decorateTile(int posX, int posY, int tileWidth, int tileHeight) {
timeline->DrawRectangle(cRect(posX,posY,tileWidth,2), theme.Color(clrBackground)); //top
timeline->DrawRectangle(cRect(posX,posY,2,tileHeight), theme.Color(clrBackground)); //left
timeline->DrawRectangle(cRect(posX,posY + tileHeight-2,tileWidth,2), theme.Color(clrBackground)); //bottom
timeline->DrawRectangle(cRect(posX + tileWidth-2,posY,2,tileHeight), theme.Color(clrBackground)); //right
timeline->DrawRectangle(cRect(posX,posY,tileWidth,2), clrTransparent); //top
timeline->DrawRectangle(cRect(posX,posY,2,tileHeight), clrTransparent); //left
timeline->DrawRectangle(cRect(posX,posY + tileHeight-2,tileWidth,2), clrTransparent); //bottom
timeline->DrawRectangle(cRect(posX + tileWidth-2,posY,2,tileHeight), clrTransparent); //right
timeline->DrawRectangle(cRect(2+posX,posY+2,tileWidth-4,1), theme.Color(clrBorder)); //top
timeline->DrawRectangle(cRect(2+posX,posY+2,1,tileHeight-4), theme.Color(clrBorder)); //left
@ -188,17 +178,17 @@ void cTimeLine::decorateTile(int posX, int posY, int tileWidth, int tileHeight)
void cTimeLine::drawRoundedCorners(int posX, int posY, int width, int height, int radius) {
timeline->DrawEllipse(cRect(posX+2,posY+2,radius,radius), theme.Color(clrBorder), -2);
timeline->DrawEllipse(cRect(posX+1,posY+1,radius,radius), theme.Color(clrBackground), -2);
timeline->DrawEllipse(cRect(posX+1,posY+1,radius,radius), clrTransparent, -2);
timeline->DrawEllipse(cRect(posX+width-radius - 2,posY+2,radius,radius), theme.Color(clrBorder), -1);
timeline->DrawEllipse(cRect(posX+width-radius - 1,posY+1,radius,radius), theme.Color(clrBackground), -1);
timeline->DrawEllipse(cRect(posX+width-radius - 1,posY+1,radius,radius), clrTransparent, -1);
if( height > 2*radius) {
timeline->DrawEllipse(cRect(posX+2,posY+height-radius - 2,radius,radius), theme.Color(clrBorder), -3);
timeline->DrawEllipse(cRect(posX+1,posY+height-radius - 1,radius,radius), theme.Color(clrBackground), -3);
timeline->DrawEllipse(cRect(posX+1,posY+height-radius - 1,radius,radius), clrTransparent, -3);
timeline->DrawEllipse(cRect(posX+width-radius - 2,posY+height-radius - 2,radius,radius), theme.Color(clrBorder), -4);
timeline->DrawEllipse(cRect(posX+width-radius - 1,posY+height-radius - 1,radius,radius), theme.Color(clrBackground), -4);
timeline->DrawEllipse(cRect(posX+width-radius - 1,posY+height-radius - 1,radius,radius), clrTransparent, -4);
}
}

View File

@ -11,7 +11,6 @@ private:
cMyTime *myTime;
cStyledPixmap *dateViewer;
cPixmap *timeline;
cPixmap *timelineBack;
cStyledPixmap *clock;
cImage *createBackgroundImage(int width, int height, tColor clrBgr, tColor clrBlend);
void decorateTile(int posX, int posY, int tileWidth, int tileHeight);

View File

@ -533,7 +533,6 @@ void cTvGuideOsd::DetailedEPG() {
}
void cTvGuideOsd::processNumKey(int numKey) {
esyslog("tvguide: %d pressed", numKey);
if (tvguideConfig.numkeyMode == 0) {
//timely jumps with 1,3,4,6,7,9
TimeJump(numKey);