From a06f6eedae542afc48cf0aa5e30b4647e18547a2 Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Wed, 8 Jul 2009 00:51:03 +0000 Subject: cleanup the remote+main statusbar handling a bit, and fix the bug where the remote wps might reserve the space for the statusbar even if its disabled git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21709 a1c6a512-1295-4272-9138-f99709370657 --- apps/gui/viewport.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) (limited to 'apps/gui/viewport.c') diff --git a/apps/gui/viewport.c b/apps/gui/viewport.c index 81baf1eab6..d635c10481 100644 --- a/apps/gui/viewport.c +++ b/apps/gui/viewport.c @@ -53,11 +53,7 @@ static bool showing_bars(enum screen_type screen) { #ifdef HAVE_LCD_BITMAP bool ignore = statusbar_enabled & VP_SB_IGNORE_SETTING(screen); -#ifdef HAVE_REMOTE_LCD - if (screen == SCREEN_REMOTE) - return global_settings.remote_statusbar || ignore; -#endif - return global_settings.statusbar || ignore; + return ignore || (statusbar_position(screen)); #else return true; #endif @@ -67,24 +63,15 @@ static bool showing_bars(enum screen_type screen) void viewport_set_defaults(struct viewport *vp, enum screen_type screen) { -#ifdef HAVE_LCD_BITMAP - bool bar_at_top = true; -#endif vp->x = 0; vp->width = screens[screen].lcdwidth; #ifdef HAVE_LCD_BITMAP vp->drawmode = DRMODE_SOLID; vp->font = FONT_UI; /* default to UI to discourage SYSFONT use */ -#ifdef HAVE_REMOTE_LCD - if (screen == SCREEN_REMOTE) - bar_at_top = global_settings.remote_statusbar != STATUSBAR_BOTTOM; - else -#endif - bar_at_top = global_settings.statusbar != STATUSBAR_BOTTOM; vp->height = screens[screen].lcdheight; - if (bar_at_top && showing_bars(screen)) + if (statusbar_position(screen) != STATUSBAR_BOTTOM && showing_bars(screen)) vp->y = STATUSBAR_HEIGHT; else vp->y = 0; -- cgit v1.2.3