diff options
| author | Jonathan Gordon <rockbox@jdgordon.info> | 2010-05-31 11:12:15 +0000 |
|---|---|---|
| committer | Jonathan Gordon <rockbox@jdgordon.info> | 2010-05-31 11:12:15 +0000 |
| commit | 22b12cafbb7aa4463170ad5752edcf2093b20c7b (patch) | |
| tree | 88bcc32aa322c39b30aec5f8a949f55690105952 /apps/gui/skin_engine | |
| parent | 5b4a9b5e35594eafea7e0981a9fab9cd266debb1 (diff) | |
| download | rockbox-22b12cafbb7aa4463170ad5752edcf2093b20c7b.zip rockbox-22b12cafbb7aa4463170ad5752edcf2093b20c7b.tar.gz rockbox-22b12cafbb7aa4463170ad5752edcf2093b20c7b.tar.bz2 rockbox-22b12cafbb7aa4463170ad5752edcf2093b20c7b.tar.xz | |
draw markers on the FM frequency bar for presets (like cuesheet markers in the WPS).
seems nice but if it ends up looking crap we can revert..
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26429 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/skin_engine')
| -rw-r--r-- | apps/gui/skin_engine/skin_display.c | 23 | ||||
| -rw-r--r-- | apps/gui/skin_engine/skin_parser.c | 1 |
2 files changed, 17 insertions, 7 deletions
diff --git a/apps/gui/skin_engine/skin_display.c b/apps/gui/skin_engine/skin_display.c index d0e94c7..4b1c747 100644 --- a/apps/gui/skin_engine/skin_display.c +++ b/apps/gui/skin_engine/skin_display.c @@ -185,17 +185,26 @@ static void draw_progressbar(struct gui_wps *gwps, gui_scrollbar_draw(display, pb->x, y, pb->width, height, length, 0, elapsed, HORIZONTAL); - if (pb->type == WPS_TOKEN_PROGRESSBAR && id3 && id3->length) + if (pb->type == WPS_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); + 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 (id3->cuesheet) + cue_draw_markers(display, id3->cuesheet, id3->length, + pb->x, y+1, pb->width, height-2); + } +#if CONFIG_TUNER + else if (in_radio_screen() || (get_radio_status() != FMRADIO_OFF)) + { + presets_draw_markers(display, pb->x, y, pb->width, height); + } +#endif } } diff --git a/apps/gui/skin_engine/skin_parser.c b/apps/gui/skin_engine/skin_parser.c index 932c3ba..158f2eb 100644 --- a/apps/gui/skin_engine/skin_parser.c +++ b/apps/gui/skin_engine/skin_parser.c @@ -1211,6 +1211,7 @@ static int parse_progressbar(const char *wps_bufptr, pb->y = -line_num - 1; /* Will be computed during the rendering */ if (token->type == WPS_TOKEN_VOLUME || token->type == WPS_TOKEN_BATTERY_PERCENT) return 0; /* dont add it, let the regular token handling do the work */ + pb->type = token->type; add_to_ll_chain(&wps_data->progressbars, item); return 0; } |