diff options
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; |