summaryrefslogtreecommitdiffstats
path: root/apps/gui/statusbar-skinned.c
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2010-03-06 00:29:46 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2010-03-06 00:29:46 +0000
commita9b5f4d810903996d868b0fcdcf9859cf3f47d7d (patch)
tree4acbdcace28f00451d5b5c9687cc53c6f997886c /apps/gui/statusbar-skinned.c
parent43ed678b4645a48cf2072ab72c93e730f4d329ff (diff)
downloadrockbox-a9b5f4d810903996d868b0fcdcf9859cf3f47d7d.tar.gz
rockbox-a9b5f4d810903996d868b0fcdcf9859cf3f47d7d.tar.bz2
rockbox-a9b5f4d810903996d868b0fcdcf9859cf3f47d7d.zip
cleanup statusbar+base skin relationship...
* remove the "custom" option from the statusbar setting. if a sbs file is set then statusbar setting is ignored, no other user visible change there. * new tag, %wi - use to draw the inbuilt statusbar in the current viewport git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25038 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/statusbar-skinned.c')
-rw-r--r--apps/gui/statusbar-skinned.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/apps/gui/statusbar-skinned.c b/apps/gui/statusbar-skinned.c
index 2ebdcca048..840ad63c40 100644
--- a/apps/gui/statusbar-skinned.c
+++ b/apps/gui/statusbar-skinned.c
@@ -173,10 +173,23 @@ void sb_create_from_settings(enum screen_type screen)
{
char buf[128], *ptr, *ptr2;
int len, remaining = sizeof(buf);
-
+ int bar_position = statusbar_position(screen);
ptr = buf;
ptr[0] = '\0';
+ /* setup the inbuilt statusbar */
+ if (bar_position != STATUSBAR_OFF)
+ {
+ int y = 0, height = STATUSBAR_HEIGHT;
+ if (bar_position == STATUSBAR_BOTTOM)
+ {
+ y = screens[screen].lcdheight - STATUSBAR_HEIGHT;
+ }
+ len = snprintf(ptr, remaining, "%%V|0|%d|-|%d|0|-|-|\n%%wi\n",
+ y, height);
+ remaining -= len;
+ ptr += len;
+ }
/* %Vi viewport, colours handled by the parser */
#if NB_SCREENS > 1
if (screen == SCREEN_REMOTE)
@@ -194,7 +207,7 @@ void sb_create_from_settings(enum screen_type screen)
else
{
int y = 0, height;
- switch (statusbar_position(screen))
+ switch (bar_position)
{
case STATUSBAR_TOP:
y = STATUSBAR_HEIGHT;