diff options
Diffstat (limited to 'apps/gui/skin_engine')
-rwxr-xr-x[-rw-r--r--] | apps/gui/skin_engine/skin_display.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/apps/gui/skin_engine/skin_display.c b/apps/gui/skin_engine/skin_display.c index 24958a46f2..c33e38392d 100644..100755 --- a/apps/gui/skin_engine/skin_display.c +++ b/apps/gui/skin_engine/skin_display.c | |||
@@ -207,27 +207,25 @@ void draw_progressbar(struct gui_wps *gwps, int line, struct progressbar *pb) | |||
207 | /* clear the slider */ | 207 | /* clear the slider */ |
208 | screen_clear_area(display, x, y, width, height); | 208 | screen_clear_area(display, x, y, width, height); |
209 | 209 | ||
210 | /* shrink the bar so the slider is inside bounds */ | 210 | /* account for the sliders width in the progressbar */ |
211 | if (flags&HORIZONTAL) | 211 | if (flags&HORIZONTAL) |
212 | { | 212 | { |
213 | width -= img->bm.width; | 213 | width -= img->bm.width; |
214 | x += img->bm.width / 2; | ||
215 | } | 214 | } |
216 | else | 215 | else |
217 | { | 216 | { |
218 | height -= img->bm.height; | 217 | height -= img->bm.height; |
219 | y += img->bm.height / 2; | ||
220 | } | 218 | } |
221 | } | 219 | } |
222 | 220 | ||
223 | if (SKINOFFSETTOPTR(get_skin_buffer(gwps->data), pb->backdrop)) | 221 | if (SKINOFFSETTOPTR(get_skin_buffer(gwps->data), pb->backdrop)) |
224 | { | 222 | { |
225 | struct gui_img *img = SKINOFFSETTOPTR(get_skin_buffer(gwps->data), pb->backdrop); | 223 | struct gui_img *img = SKINOFFSETTOPTR(get_skin_buffer(gwps->data), pb->backdrop); |
226 | img->bm.data = core_get_data(img->buflib_handle); | 224 | img->bm.data = core_get_data(img->buflib_handle); |
227 | display->bmp_part(&img->bm, 0, 0, x, y, width, height); | 225 | display->bmp_part(&img->bm, 0, 0, x, y, pb->width, height); |
228 | flags |= DONT_CLEAR_EXCESS; | 226 | flags |= DONT_CLEAR_EXCESS; |
229 | } | 227 | } |
230 | 228 | ||
231 | if (!pb->nobar) | 229 | if (!pb->nobar) |
232 | { | 230 | { |
233 | struct gui_img *img = SKINOFFSETTOPTR(get_skin_buffer(gwps->data), pb->image); | 231 | struct gui_img *img = SKINOFFSETTOPTR(get_skin_buffer(gwps->data), pb->image); |
@@ -257,7 +255,6 @@ void draw_progressbar(struct gui_wps *gwps, int line, struct progressbar *pb) | |||
257 | xoff = width * end / length; | 255 | xoff = width * end / length; |
258 | if (flags&INVERTFILL) | 256 | if (flags&INVERTFILL) |
259 | xoff = width - xoff; | 257 | xoff = width - xoff; |
260 | xoff -= w / 2; | ||
261 | } | 258 | } |
262 | else | 259 | else |
263 | { | 260 | { |
@@ -265,7 +262,6 @@ void draw_progressbar(struct gui_wps *gwps, int line, struct progressbar *pb) | |||
265 | yoff = height * end / length; | 262 | yoff = height * end / length; |
266 | if (flags&INVERTFILL) | 263 | if (flags&INVERTFILL) |
267 | yoff = height - yoff; | 264 | yoff = height - yoff; |
268 | yoff -= h / 2; | ||
269 | } | 265 | } |
270 | display->bmp_part(&img->bm, 0, 0, x + xoff, y + yoff, w, h); | 266 | display->bmp_part(&img->bm, 0, 0, x + xoff, y + yoff, w, h); |
271 | } | 267 | } |