summaryrefslogtreecommitdiffstats
path: root/apps/gui/skin_engine/skin_display.c
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2012-07-05 22:44:13 +1000
committerJonathan Gordon <rockbox@jdgordon.info>2012-07-05 23:30:06 +1000
commit65f9df3083623484efccf502c33ecc959555d247 (patch)
tree6d55b2eb2d874166be00306a5cc3a7c67ebea227 /apps/gui/skin_engine/skin_display.c
parentf6d6a4602c9bb94565f8bb421b465a06f215fb7d (diff)
downloadrockbox-65f9df3083623484efccf502c33ecc959555d247.tar.gz
rockbox-65f9df3083623484efccf502c33ecc959555d247.zip
skin_engine: Allow the %St() (setting) skin tag be used as a bar
%St(<setting name>) or %St(<bar tags>, setting, <setting name>) Change-Id: I71396d683634d4d1ad2357018c4029ecb4229677
Diffstat (limited to 'apps/gui/skin_engine/skin_display.c')
-rw-r--r--apps/gui/skin_engine/skin_display.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/gui/skin_engine/skin_display.c b/apps/gui/skin_engine/skin_display.c
index 08d17a0258..4f491dea24 100644
--- a/apps/gui/skin_engine/skin_display.c
+++ b/apps/gui/skin_engine/skin_display.c
@@ -44,6 +44,7 @@
#include "audio.h"
#include "tagcache.h"
#include "list.h"
+#include "option_select.h"
#ifdef HAVE_LCD_BITMAP
#include "peakmeter.h"
@@ -145,6 +146,13 @@ void draw_progressbar(struct gui_wps *gwps, int line, struct progressbar *pb)
end = val - min;
length = max - min;
}
+ else if (pb->type == SKIN_TOKEN_SETTINGBAR)
+ {
+ int val, count;
+ get_setting_info_for_bar(pb->setting_id, &count, &val);
+ length = count - 1;
+ end = val;
+ }
#if CONFIG_TUNER
else if (in_radio_screen() || (get_radio_status() != FMRADIO_OFF))
{