diff --git a/apps/gui/skin_engine/skin_display.c b/apps/gui/skin_engine/skin_display.c index 1a012dc1a6..2affd23c87 100644 --- a/apps/gui/skin_engine/skin_display.c +++ b/apps/gui/skin_engine/skin_display.c @@ -158,10 +158,11 @@ void ab_draw_markers(struct screen * screen, int capacity, #endif -void draw_progressbar(struct gui_wps *gwps, int line, struct progressbar *pb) +void draw_progressbar(struct gui_wps *gwps, struct skin_viewport* skin_viewport, + int line, struct progressbar *pb) { struct screen *display = gwps->display; - struct viewport *vp = SKINOFFSETTOPTR(get_skin_buffer(gwps->data), pb->vp); + struct viewport *vp = &skin_viewport->vp; struct wps_state *state = get_wps_state(); struct mp3entry *id3 = state->id3; int x = pb->x, y = pb->y, width = pb->width, height = pb->height; diff --git a/apps/gui/skin_engine/skin_display.h b/apps/gui/skin_engine/skin_display.h index 5ca66fa3ba..56af12aa03 100644 --- a/apps/gui/skin_engine/skin_display.h +++ b/apps/gui/skin_engine/skin_display.h @@ -29,7 +29,8 @@ #define _SKIN_DISPLAY_H_ -void draw_progressbar(struct gui_wps *gwps, int line, struct progressbar *pb); +void draw_progressbar(struct gui_wps *gwps, struct skin_viewport* skin_viewport, + int line, struct progressbar *pb); void draw_playlist_viewer_list(struct gui_wps *gwps, struct playlistviewer *viewer); /* clears the area where the image was shown */ void clear_image_pos(struct gui_wps *gwps, struct gui_img *img); diff --git a/apps/gui/skin_engine/skin_parser.c b/apps/gui/skin_engine/skin_parser.c index e68d5e4d3c..f59ae09e54 100644 --- a/apps/gui/skin_engine/skin_parser.c +++ b/apps/gui/skin_engine/skin_parser.c @@ -966,7 +966,6 @@ static int parse_progressbar_tag(struct skin_element* element, if (!pb) return WPS_ERROR_INVALID_PARAM; - pb->vp = PTRTOSKINOFFSET(skin_buffer, vp); pb->follow_lang_direction = follow_lang_direction > 0; pb->nofill = false; pb->noborder = false; diff --git a/apps/gui/skin_engine/skin_render.c b/apps/gui/skin_engine/skin_render.c index e8f081e7f5..07d8a13658 100644 --- a/apps/gui/skin_engine/skin_render.c +++ b/apps/gui/skin_engine/skin_render.c @@ -241,7 +241,7 @@ static bool do_non_text_tags(struct gui_wps *gwps, struct skin_draw_info *info, { struct progressbar *bar = (struct progressbar*)SKINOFFSETTOPTR(skin_buffer, token->value.data); if (do_refresh) - draw_progressbar(gwps, info->line_number, bar); + draw_progressbar(gwps, info->skin_vp, info->line_number, bar); } break; case SKIN_TOKEN_IMAGE_DISPLAY: diff --git a/apps/gui/skin_engine/wps_internals.h b/apps/gui/skin_engine/wps_internals.h index 87ccb9ad89..1049954caf 100644 --- a/apps/gui/skin_engine/wps_internals.h +++ b/apps/gui/skin_engine/wps_internals.h @@ -112,7 +112,6 @@ struct image_display { struct progressbar { enum skin_token_type type; - OFFSETTYPE(struct viewport *) vp; /* regular pb */ short x; /* >=0: explicitly set in the tag -> y-coord within the viewport