summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-x[-rw-r--r--]apps/gui/skin_engine/skin_display.c12
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)
/* clear the slider */
screen_clear_area(display, x, y, width, height);
- /* shrink the bar so the slider is inside bounds */
+ /* account for the sliders width in the progressbar */
if (flags&HORIZONTAL)
{
width -= img->bm.width;
- x += img->bm.width / 2;
}
else
{
height -= img->bm.height;
- y += img->bm.height / 2;
}
}
-
+
if (SKINOFFSETTOPTR(get_skin_buffer(gwps->data), pb->backdrop))
{
struct gui_img *img = SKINOFFSETTOPTR(get_skin_buffer(gwps->data), pb->backdrop);
img->bm.data = core_get_data(img->buflib_handle);
- display->bmp_part(&img->bm, 0, 0, x, y, width, height);
+ display->bmp_part(&img->bm, 0, 0, x, y, pb->width, height);
flags |= DONT_CLEAR_EXCESS;
}
-
+
if (!pb->nobar)
{
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)
xoff = width * end / length;
if (flags&INVERTFILL)
xoff = width - xoff;
- xoff -= w / 2;
}
else
{
@@ -265,7 +262,6 @@ void draw_progressbar(struct gui_wps *gwps, int line, struct progressbar *pb)
yoff = height * end / length;
if (flags&INVERTFILL)
yoff = height - yoff;
- yoff -= h / 2;
}
display->bmp_part(&img->bm, 0, 0, x + xoff, y + yoff, w, h);
}