mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-08 12:45:26 -05:00
skin engine: Remove progressbar viewport field
Again, we don't need to store the viewport in the progressbar struct because it's known at render time. Change-Id: I12514ceaace7c897194b18929364340871ef4635
This commit is contained in:
parent
f242b0ec6c
commit
9368844ad1
5 changed files with 6 additions and 6 deletions
|
|
@ -158,10 +158,11 @@ void ab_draw_markers(struct screen * screen, int capacity,
|
||||||
|
|
||||||
#endif
|
#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 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 wps_state *state = get_wps_state();
|
||||||
struct mp3entry *id3 = state->id3;
|
struct mp3entry *id3 = state->id3;
|
||||||
int x = pb->x, y = pb->y, width = pb->width, height = pb->height;
|
int x = pb->x, y = pb->y, width = pb->width, height = pb->height;
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,8 @@
|
||||||
#define _SKIN_DISPLAY_H_
|
#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);
|
void draw_playlist_viewer_list(struct gui_wps *gwps, struct playlistviewer *viewer);
|
||||||
/* clears the area where the image was shown */
|
/* clears the area where the image was shown */
|
||||||
void clear_image_pos(struct gui_wps *gwps, struct gui_img *img);
|
void clear_image_pos(struct gui_wps *gwps, struct gui_img *img);
|
||||||
|
|
|
||||||
|
|
@ -966,7 +966,6 @@ static int parse_progressbar_tag(struct skin_element* element,
|
||||||
|
|
||||||
if (!pb)
|
if (!pb)
|
||||||
return WPS_ERROR_INVALID_PARAM;
|
return WPS_ERROR_INVALID_PARAM;
|
||||||
pb->vp = PTRTOSKINOFFSET(skin_buffer, vp);
|
|
||||||
pb->follow_lang_direction = follow_lang_direction > 0;
|
pb->follow_lang_direction = follow_lang_direction > 0;
|
||||||
pb->nofill = false;
|
pb->nofill = false;
|
||||||
pb->noborder = false;
|
pb->noborder = false;
|
||||||
|
|
|
||||||
|
|
@ -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);
|
struct progressbar *bar = (struct progressbar*)SKINOFFSETTOPTR(skin_buffer, token->value.data);
|
||||||
if (do_refresh)
|
if (do_refresh)
|
||||||
draw_progressbar(gwps, info->line_number, bar);
|
draw_progressbar(gwps, info->skin_vp, info->line_number, bar);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SKIN_TOKEN_IMAGE_DISPLAY:
|
case SKIN_TOKEN_IMAGE_DISPLAY:
|
||||||
|
|
|
||||||
|
|
@ -112,7 +112,6 @@ struct image_display {
|
||||||
|
|
||||||
struct progressbar {
|
struct progressbar {
|
||||||
enum skin_token_type type;
|
enum skin_token_type type;
|
||||||
OFFSETTYPE(struct viewport *) vp;
|
|
||||||
/* regular pb */
|
/* regular pb */
|
||||||
short x;
|
short x;
|
||||||
/* >=0: explicitly set in the tag -> y-coord within the viewport
|
/* >=0: explicitly set in the tag -> y-coord within the viewport
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue