diff options
-rw-r--r-- | apps/gui/skin_engine/skin_display.c | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/apps/gui/skin_engine/skin_display.c b/apps/gui/skin_engine/skin_display.c index 91e8bbfafc..a4588bb861 100644 --- a/apps/gui/skin_engine/skin_display.c +++ b/apps/gui/skin_engine/skin_display.c | |||
@@ -181,7 +181,7 @@ void draw_progressbar(struct gui_wps *gwps, int line, struct progressbar *pb) | |||
181 | if (!pb->horizontal) | 181 | if (!pb->horizontal) |
182 | { | 182 | { |
183 | /* we want to fill upwards which is technically inverted. */ | 183 | /* we want to fill upwards which is technically inverted. */ |
184 | flags = VERTICAL|INVERTFILL; | 184 | flags = INVERTFILL; |
185 | } | 185 | } |
186 | 186 | ||
187 | if (pb->invert_fill_direction) | 187 | if (pb->invert_fill_direction) |
@@ -209,15 +209,29 @@ void draw_progressbar(struct gui_wps *gwps, int line, struct progressbar *pb) | |||
209 | int height = pb->height; | 209 | int height = pb->height; |
210 | struct gui_img *img = pb->slider; | 210 | struct gui_img *img = pb->slider; |
211 | 211 | ||
212 | if (flags&VERTICAL) | 212 | if ((flags&HORIZONTAL) == 0) |
213 | { | 213 | { |
214 | y += pb->height*end/length; | ||
215 | height = img->bm.height; | 214 | height = img->bm.height; |
215 | if (flags&INVERTFILL) | ||
216 | y += pb->height - pb->height*end/length; | ||
217 | else | ||
218 | y += pb->height*end/length; | ||
219 | #if 0 /* maybe add this in later, make the slider bmp overlap abit */ | ||
220 | if ((flags&INNER_NOFILL) == 0) | ||
221 | y -= img->bm.height/2; | ||
222 | #endif | ||
216 | } | 223 | } |
217 | else | 224 | else |
218 | { | 225 | { |
219 | x += pb->width*end/length; | 226 | width = img->bm.width; |
220 | width = img->bm.width; | 227 | if (flags&INVERTFILL) |
228 | x += pb->width - pb->width*end/length; | ||
229 | else | ||
230 | x += pb->width*end/length; | ||
231 | #if 0 /* maybe add this in later, make the slider bmp overlap abit */ | ||
232 | if ((flags&INNER_NOFILL) == 0) | ||
233 | x -= img->bm.width/2; | ||
234 | #endif | ||
221 | } | 235 | } |
222 | #if LCD_DEPTH > 1 | 236 | #if LCD_DEPTH > 1 |
223 | if(img->bm.format == FORMAT_MONO) { | 237 | if(img->bm.format == FORMAT_MONO) { |