diff options
author | Teruaki Kawashima <teru@rockbox.org> | 2010-10-03 14:19:30 +0000 |
---|---|---|
committer | Teruaki Kawashima <teru@rockbox.org> | 2010-10-03 14:19:30 +0000 |
commit | 0f8fe94f46b5c14b5f67b747131a5a66ed883e4c (patch) | |
tree | 858f0544f1fad5db8b7425d15c52e357c1842de3 /apps/gui/skin_engine/skin_display.c | |
parent | c80dd635abb959646ed8c3262df591dfb189cd57 (diff) | |
download | rockbox-0f8fe94f46b5c14b5f67b747131a5a66ed883e4c.tar.gz rockbox-0f8fe94f46b5c14b5f67b747131a5a66ed883e4c.zip |
correct drawing of the bar type tags when nofill is set.
draw the slider bitmap before drawing A-B repeat markers so that they are visible.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28204 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/skin_engine/skin_display.c')
-rw-r--r-- | apps/gui/skin_engine/skin_display.c | 70 |
1 files changed, 29 insertions, 41 deletions
diff --git a/apps/gui/skin_engine/skin_display.c b/apps/gui/skin_engine/skin_display.c index 4c96782280..91e8bbfafc 100644 --- a/apps/gui/skin_engine/skin_display.c +++ b/apps/gui/skin_engine/skin_display.c @@ -135,8 +135,6 @@ void draw_progressbar(struct gui_wps *gwps, int line, struct progressbar *pb) unsigned long length, end; int flags = HORIZONTAL; - int drawn_length, drawn_end; - if (height < 0) height = font_get(vp->font)->height; @@ -180,17 +178,6 @@ void draw_progressbar(struct gui_wps *gwps, int line, struct progressbar *pb) end = 0; } - if (pb->nofill) - { - drawn_length = 1; - drawn_end = 0; - } - else - { - drawn_length = length; - drawn_end = end; - } - if (!pb->horizontal) { /* we want to fill upwards which is technically inverted. */ @@ -202,37 +189,19 @@ void draw_progressbar(struct gui_wps *gwps, int line, struct progressbar *pb) flags ^= INVERTFILL; } - + if (pb->nofill) + { + flags |= INNER_NOFILL; + } + if (pb->have_bitmap_pb) gui_bitmap_scrollbar_draw(display, &pb->bm, pb->x, y, pb->width, pb->bm.height, - drawn_length, 0, drawn_end, flags); + length, 0, end, flags); else gui_scrollbar_draw(display, pb->x, y, pb->width, height, - drawn_length, 0, drawn_end, flags); - - if (pb->type == SKIN_TOKEN_PROGRESSBAR) - { - if (id3 && id3->length) - { -#ifdef AB_REPEAT_ENABLE - if (ab_repeat_mode_enabled()) - ab_draw_markers(display, id3->length, - pb->x, y, pb->width, height); -#endif + length, 0, end, flags); - if (id3->cuesheet) - cue_draw_markers(display, id3->cuesheet, id3->length, - pb->x, y+1, pb->width, height-2); - } -#if 0 /* disable for now CONFIG_TUNER */ - else if (in_radio_screen() || (get_radio_status() != FMRADIO_OFF)) - { - presets_draw_markers(display, pb->x, y, pb->width, height); - } -#endif - } - if (pb->slider) { int x = pb->x, y = pb->y; @@ -267,6 +236,28 @@ void draw_progressbar(struct gui_wps *gwps, int line, struct progressbar *pb) } #endif } + + if (pb->type == SKIN_TOKEN_PROGRESSBAR) + { + if (id3 && id3->length) + { +#ifdef AB_REPEAT_ENABLE + if (ab_repeat_mode_enabled()) + ab_draw_markers(display, id3->length, + pb->x, y, pb->width, height); +#endif + + if (id3->cuesheet) + cue_draw_markers(display, id3->cuesheet, id3->length, + pb->x, y+1, pb->width, height-2); + } +#if 0 /* disable for now CONFIG_TUNER */ + else if (in_radio_screen() || (get_radio_status() != FMRADIO_OFF)) + { + presets_draw_markers(display, pb->x, y, pb->width, height); + } +#endif + } } /* clears the area where the image was shown */ @@ -783,6 +774,3 @@ int skin_wait_for_action(enum skinnable_screens skin, int context, int timeout) } return button; } - - - |