aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJoel Bodenmann <joel@seriouslyembedded.com>2015-12-18 22:49:59 +0100
committerJoel Bodenmann <joel@seriouslyembedded.com>2015-12-18 22:49:59 +0100
commite75f165bb45be0fd8a56efda4a11564211651cdf (patch)
tree88c3d260297c04b6af7eb4a7b43e1255a2b21957 /src
parent0befb2ffce6c85ad9c04137ec2d1bb0fbba29f47 (diff)
downloaduGFX-e75f165bb45be0fd8a56efda4a11564211651cdf.tar.gz
uGFX-e75f165bb45be0fd8a56efda4a11564211651cdf.tar.bz2
uGFX-e75f165bb45be0fd8a56efda4a11564211651cdf.zip
Fixing progressbar widget rendering
Diffstat (limited to 'src')
-rw-r--r--src/gwin/gwin_progressbar.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/gwin/gwin_progressbar.c b/src/gwin/gwin_progressbar.c
index be8de700..b1bc917c 100644
--- a/src/gwin/gwin_progressbar.c
+++ b/src/gwin/gwin_progressbar.c
@@ -238,7 +238,7 @@ void gwinProgressbarDraw_Std(GWidgetObject *gw, void *param) {
// get the colors right
if ((gw->g.flags & GWIN_FLG_SYSENABLED))
- pcol = &gw->pstyle->pressed;
+ pcol = &gw->pstyle->enabled;
else
pcol = &gw->pstyle->disabled;
@@ -247,14 +247,14 @@ void gwinProgressbarDraw_Std(GWidgetObject *gw, void *param) {
if (gsw->dpos != gw->g.height-1)
gdispGFillArea(gw->g.display, gw->g.x, gw->g.y+gsw->dpos, gw->g.width, gw->g.height - gsw->dpos, pcol->progress); // Active Area
if (gsw->dpos != 0)
- gdispGFillArea(gw->g.display, gw->g.x, gw->g.y, gw->g.width, gsw->dpos, gw->pstyle->enabled.progress); // Inactive area
+ gdispGFillArea(gw->g.display, gw->g.x, gw->g.y, gw->g.width, gsw->dpos, pcol->fill); // Inactive area
gdispGDrawBox(gw->g.display, gw->g.x, gw->g.y, gw->g.width, gw->g.height, pcol->edge); // Edge
gdispGDrawLine(gw->g.display, gw->g.x, gw->g.y+gsw->dpos, gw->g.x+gw->g.width-1, gw->g.y+gsw->dpos, pcol->edge); // Thumb
// Horizontal progressbar
} else {
if (gsw->dpos != gw->g.width-1)
- gdispGFillArea(gw->g.display, gw->g.x+gsw->dpos, gw->g.y, gw->g.width-gsw->dpos, gw->g.height, gw->pstyle->enabled.progress); // Inactive area
+ gdispGFillArea(gw->g.display, gw->g.x+gsw->dpos, gw->g.y, gw->g.width-gsw->dpos, gw->g.height, pcol->fill); // Inactive area
if (gsw->dpos != 0)
gdispGFillArea(gw->g.display, gw->g.x, gw->g.y, gsw->dpos, gw->g.height, pcol->progress); // Active Area
gdispGDrawBox(gw->g.display, gw->g.x, gw->g.y, gw->g.width, gw->g.height, pcol->edge); // Edge
@@ -276,11 +276,12 @@ void gwinProgressbarDraw_Image(GWidgetObject *gw, void *param) {
return;
if ((gw->g.flags & GWIN_FLG_SYSENABLED))
- pcol = &gw->pstyle->pressed;
+ pcol = &gw->pstyle->enabled;
else
pcol = &gw->pstyle->disabled;
- if (gw->g.width < gw->g.height) { // Vertical progressbar
+ // Vertical progressbar
+ if (gw->g.width < gw->g.height) {
if (gsw->dpos != 0) // The unfilled area
gdispGFillArea(gw->g.display, gw->g.x, gw->g.y, gw->g.width, gsw->dpos, gw->pstyle->enabled.progress); // Inactive area
if (gsw->dpos != gw->g.height-1) { // The filled area