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 /displayvolume.c | |
parent | fda74b31336497c3eb6eba85bf25353883f6590a (diff) | |
download | skin-flat-847834c444c7600ff9f1f16e8012a7af6c455b20.tar.gz skin-flat-847834c444c7600ff9f1f16e8012a7af6c455b20.tar.bz2 |
progressbar background
Diffstat (limited to 'displayvolume.c')
-rw-r--r-- | displayvolume.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/displayvolume.c b/displayvolume.c index 7e4eab9..f67bd30 100644 --- a/displayvolume.c +++ b/displayvolume.c @@ -36,16 +36,18 @@ void cFlatDisplayVolume::SetVolume(int Current, int Total, bool Mute) { } void cFlatDisplayVolume::DrawProgressBar(int Current, int Total) { + int top = progressBarHeight / 2 - 3; int barFullWidth = osdWidth * 3 / 4; int left = osdWidth - barFullWidth; left /= 2; double percentLeft = ((double)Current) / (double)Total; - progressBarPixmap->Fill(clrTransparent); + progressBarPixmap->Fill( clrTransparent ); + progressBarPixmap->DrawRectangle(cRect( left, 0, barFullWidth, progressBarHeight), Theme.Color(clrVolumeBg)); if (Current > 0) { - progressBarPixmap->DrawRectangle(cRect( left, 2, barFullWidth, 2), Theme.Color(clrVolumeProgressBg)); - progressBarPixmap->DrawRectangle(cRect( left, 0, (barFullWidth * percentLeft), 6), Theme.Color(clrVolumeProgressFg)); + progressBarPixmap->DrawRectangle(cRect( left, top + 2, barFullWidth, 2), Theme.Color(clrVolumeProgressBg)); + progressBarPixmap->DrawRectangle(cRect( left, top, (barFullWidth * percentLeft), 6), Theme.Color(clrVolumeProgressFg)); } } |