diff options
author | Martin Schirrmacher <vdr.skinflat@schirrmacher.eu> | 2013-07-30 17:22:20 +0200 |
---|---|---|
committer | Martin Schirrmacher <vdr.skinflat@schirrmacher.eu> | 2013-07-30 17:22:20 +0200 |
commit | 847834c444c7600ff9f1f16e8012a7af6c455b20 (patch) | |
tree | 51e082eaa31af7a2e0eee018526284fc4741a4f1 /displaychannel.c | |
parent | fda74b31336497c3eb6eba85bf25353883f6590a (diff) | |
download | skin-flat-847834c444c7600ff9f1f16e8012a7af6c455b20.tar.gz skin-flat-847834c444c7600ff9f1f16e8012a7af6c455b20.tar.bz2 |
progressbar background
Diffstat (limited to 'displaychannel.c')
-rw-r--r-- | displaychannel.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/displaychannel.c b/displaychannel.c index c7501dd..ff1c430 100644 --- a/displaychannel.c +++ b/displaychannel.c @@ -12,18 +12,18 @@ cFlatDisplayChannel::cFlatDisplayChannel(bool WithInfo) { // von unten noch oben // 2 * EPG + 2 * EPGsml - int heightProgress = 8; - heightBottom = (fontHeight * 2) + (fontSmlHeight * 2) + heightProgress; // Top, Buttom, Between + progressBarHeight = 20; + heightBottom = (fontHeight * 2) + (fontSmlHeight * 2) + progressBarHeight; // Top, Buttom, Between int heightTop = fontHeight; int height = heightBottom; chanInfoBottomPixmap = osd->CreatePixmap(1, cRect(0, osdHeight - height, osdWidth, heightBottom)); - height += heightProgress; - chanInfoProgressPixmap = osd->CreatePixmap(2, cRect(0, osdHeight - height, osdWidth, heightProgress)); - chanInfoProgressPixmap->Fill( clrTransparent ); + height += progressBarHeight; + chanInfoProgressPixmap = osd->CreatePixmap(2, cRect(0, osdHeight - height, osdWidth, progressBarHeight)); + chanInfoProgressPixmap->Fill( Theme.Color(clrChannelBg) ); - height += heightTop + 2; + height += heightTop; chanInfoTopPixmap = osd->CreatePixmap(1, cRect(0, osdHeight - height, osdWidth, heightTop)); } @@ -155,14 +155,15 @@ void cFlatDisplayChannel::SetEvents(const cEvent *Present, const cEvent *Followi } void cFlatDisplayChannel::DrawProgressBar(int Current, int Total) { + int top = progressBarHeight / 2 - 3; int barFullWidth = chanInfoProgressPixmap->ViewPort().Width(); double percentLeft = ((double)Current) / (double)Total; - chanInfoProgressPixmap->Fill( clrTransparent ); + chanInfoProgressPixmap->Fill( Theme.Color(clrChannelBg) ); if (Current > 0) { - chanInfoProgressPixmap->DrawRectangle(cRect( 0, 2, barFullWidth, 2), Theme.Color(clrChannelProgressBg)); - chanInfoProgressPixmap->DrawRectangle(cRect( 0, 0, (barFullWidth * percentLeft), 6), Theme.Color(clrChannelProgressFg)); + chanInfoProgressPixmap->DrawRectangle(cRect( 0, top + 2, barFullWidth, 2), Theme.Color(clrChannelProgressBg)); + chanInfoProgressPixmap->DrawRectangle(cRect( 0, top, (barFullWidth * percentLeft), 6), Theme.Color(clrChannelProgressFg)); } } |