summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--baserender.c19
-rw-r--r--baserender.h3
-rw-r--r--displayvolume.c2
3 files changed, 14 insertions, 10 deletions
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
{
diff --git a/baserender.h b/baserender.h
index fb54b5f2..db1fa3a2 100644
--- a/baserender.h
+++ b/baserender.h
@@ -55,6 +55,7 @@ class cFlatBaseRender
cPixmap *progressBarPixmapBg;
int progressBarHeight, progressBarTop, progressBarWidth, progressBarMarginHor, progressBarMarginVer;
int ProgressType;
+ bool progressBarSetBackground;
tColor progressBarColorFg, progressBarColorBarFg, progressBarColorBarCurFg, progressBarColorBg;
tColor progressBarColorMark, progressBarColorMarkCurrent;
@@ -130,7 +131,7 @@ class cFlatBaseRender
void MessageClear(void);
void ProgressBarDrawRaw(cPixmap *Pixmap, cPixmap *PixmapBg, cRect rec, cRect recBg, int Current, int Total, tColor ColorFg, tColor ColorBarFg, tColor ColorBg, int Type);
- void ProgressBarCreate(int Left, int Top, int Width, int Height, int MarginHor, int MarginVer, tColor ColorFg, tColor ColorBarFg, tColor ColorBg, int Type);
+ void ProgressBarCreate(int Left, int Top, int Width, int Height, int MarginHor, int MarginVer, tColor ColorFg, tColor ColorBarFg, tColor ColorBg, int Type, bool SetBackground = false);
void ProgressBarDrawBgColor(void);
void ProgressBarDraw(int Current, int Total);
void ProgressBarDrawMarks(int Current, int Total, const cMarks *Marks, tColor Color, tColor ColorCurrent);
diff --git a/displayvolume.c b/displayvolume.c
index 1efb66cd..cc2aee73 100644
--- a/displayvolume.c
+++ b/displayvolume.c
@@ -17,7 +17,7 @@ cFlatDisplayVolume::cFlatDisplayVolume(void) {
muteLogoPixmap = osd->CreatePixmap(2, cRect(0, top, osdWidth, labelHeight));
ProgressBarCreate(left, osdHeight - 50 - Config.decorProgressVolumeSize, width, Config.decorProgressVolumeSize, marginItem, marginItem,
- Config.decorProgressVolumeFg, Config.decorProgressVolumeBarFg, Config.decorProgressVolumeBg, Config.decorProgressVolumeType);
+ Config.decorProgressVolumeFg, Config.decorProgressVolumeBarFg, Config.decorProgressVolumeBg, Config.decorProgressVolumeType, true);
}
cFlatDisplayVolume::~cFlatDisplayVolume() {