From a9b5f4d810903996d868b0fcdcf9859cf3f47d7d Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Sat, 6 Mar 2010 00:29:46 +0000 Subject: 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 --- apps/gui/statusbar-skinned.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'apps/gui/statusbar-skinned.c') 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; -- cgit v1.2.3