diff options
author | Jonathan Gordon <rockbox@jdgordon.info> | 2010-03-06 00:29:46 +0000 |
---|---|---|
committer | Jonathan Gordon <rockbox@jdgordon.info> | 2010-03-06 00:29:46 +0000 |
commit | a9b5f4d810903996d868b0fcdcf9859cf3f47d7d (patch) | |
tree | 4acbdcace28f00451d5b5c9687cc53c6f997886c /apps/gui/statusbar-skinned.c | |
parent | 43ed678b4645a48cf2072ab72c93e730f4d329ff (diff) | |
download | rockbox-a9b5f4d810903996d868b0fcdcf9859cf3f47d7d.tar.gz 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.c | 17 |
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) | |||
173 | { | 173 | { |
174 | char buf[128], *ptr, *ptr2; | 174 | char buf[128], *ptr, *ptr2; |
175 | int len, remaining = sizeof(buf); | 175 | int len, remaining = sizeof(buf); |
176 | 176 | int bar_position = statusbar_position(screen); | |
177 | ptr = buf; | 177 | ptr = buf; |
178 | ptr[0] = '\0'; | 178 | ptr[0] = '\0'; |
179 | 179 | ||
180 | /* setup the inbuilt statusbar */ | ||
181 | if (bar_position != STATUSBAR_OFF) | ||
182 | { | ||
183 | int y = 0, height = STATUSBAR_HEIGHT; | ||
184 | if (bar_position == STATUSBAR_BOTTOM) | ||
185 | { | ||
186 | y = screens[screen].lcdheight - STATUSBAR_HEIGHT; | ||
187 | } | ||
188 | len = snprintf(ptr, remaining, "%%V|0|%d|-|%d|0|-|-|\n%%wi\n", | ||
189 | y, height); | ||
190 | remaining -= len; | ||
191 | ptr += len; | ||
192 | } | ||
180 | /* %Vi viewport, colours handled by the parser */ | 193 | /* %Vi viewport, colours handled by the parser */ |
181 | #if NB_SCREENS > 1 | 194 | #if NB_SCREENS > 1 |
182 | if (screen == SCREEN_REMOTE) | 195 | if (screen == SCREEN_REMOTE) |
@@ -194,7 +207,7 @@ void sb_create_from_settings(enum screen_type screen) | |||
194 | else | 207 | else |
195 | { | 208 | { |
196 | int y = 0, height; | 209 | int y = 0, height; |
197 | switch (statusbar_position(screen)) | 210 | switch (bar_position) |
198 | { | 211 | { |
199 | case STATUSBAR_TOP: | 212 | case STATUSBAR_TOP: |
200 | y = STATUSBAR_HEIGHT; | 213 | y = STATUSBAR_HEIGHT; |