From 4628f81248fbd9e39b981182ed25fe32abf188f1 Mon Sep 17 00:00:00 2001 From: Martin Schirrmacher Date: Fri, 22 Nov 2013 10:14:07 +0100 Subject: fix display volume --- baserender.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'baserender.c') diff --git a/baserender.c b/baserender.c index 096d67fa..c1b410f8 100644 --- a/baserender.c +++ b/baserender.c @@ -518,7 +518,7 @@ void cFlatBaseRender::contentDraw(void) { } } -void cFlatBaseRender::ProgressBarCreate(int Left, int Top, int Width, int Height, int MarginHor, int MarginVer, tColor ColorFg, tColor ColorBarFg, tColor ColorBg, int Type) { +void cFlatBaseRender::ProgressBarCreate(int Left, int Top, int Width, int Height, int MarginHor, int MarginVer, tColor ColorFg, tColor ColorBarFg, tColor ColorBg, int Type, bool SetBackground) { progressBarTop = Top; progressBarWidth = Width; progressBarHeight = Height; @@ -530,6 +530,8 @@ void cFlatBaseRender::ProgressBarCreate(int Left, int Top, int Width, int Height progressBarColorBarFg = ColorBarFg; progressBarColorBg = ColorBg; + progressBarSetBackground = SetBackground; + progressBarColorBarCurFg = Theme.Color(clrReplayProgressBarCurFg); progressBarPixmap = osd->CreatePixmap(3, cRect(Left, Top, Width, progressBarHeight)); @@ -553,15 +555,16 @@ void cFlatBaseRender::ProgressBarDrawRaw(cPixmap *Pixmap, cPixmap *PixmapBg, cRe double percentLeft = ((double)Current) / (double)Total; - /* - if( PixmapBg ) + if( PixmapBg && progressBarSetBackground ) PixmapBg->DrawRectangle(cRect( rectBg.Left(), rectBg.Top(), rectBg.Width(), rectBg.Height()), ColorBg); - if( PixmapBg == Pixmap ) - Pixmap->DrawRectangle(cRect( rect.Left(), rect.Top(), rect.Width(), rect.Height()), ColorBg); - else - Pixmap->DrawRectangle(cRect( rect.Left(), rect.Top(), rect.Width(), rect.Height()), clrTransparent); - */ + if( progressBarSetBackground ) { + if( PixmapBg == Pixmap ) + Pixmap->DrawRectangle(cRect( rect.Left(), rect.Top(), rect.Width(), rect.Height()), ColorBg); + else + Pixmap->DrawRectangle(cRect( rect.Left(), rect.Top(), rect.Width(), rect.Height()), clrTransparent); + } + switch( Type ) { case 0: // small line + big line { -- cgit v1.2.3