From b2eb44ce0eb24632a46b0ea8c8c46a8f2ba35e24 Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Wed, 9 Dec 2009 07:25:46 +0000 Subject: FS#10824 - viewport/statusbar API rework. Hopefully the only user visible changes are: - fm and recording screens go by the statusbar setting (sbs or inbuilt) - plugins go back to using the theme as they should for menus and lists - splash screens might get cut a bit... entirely theme and splash dependant.. if there is a problematic one we can look at it later. - hopefully nothing more than very minor screen flickerings... let me know exactly where they are so they can be fixed New GUI screen rules: * Screens assume that the theme (sbs+ui viewport+ maybe background image) are always enabled. They may be disabled on a per display basis, but MUST be re-enabled on exit * Screens must not be coded in a way that requires a statusbar of any type.. the inbuilt bar will be removed shortly. ALWAYS RESPECT THE USERS SETTINGS unless the screen requires the full display to fit. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23904 a1c6a512-1295-4272-9138-f99709370657 --- apps/gui/usb_screen.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'apps/gui/usb_screen.c') diff --git a/apps/gui/usb_screen.c b/apps/gui/usb_screen.c index f6285f995e..29d88daf06 100644 --- a/apps/gui/usb_screen.c +++ b/apps/gui/usb_screen.c @@ -150,7 +150,7 @@ static void usb_screen_fix_viewports(struct screen *screen, viewport_set_defaults(parent, screen->screen_type); if (parent->width < logo_width || parent->height < logo_height) - viewport_set_fullscreen(parent, screen->screen_type); + viewportmanager_theme_enable(screen->screen_type, false, parent); *logo = *parent; logo->x = parent->x + parent->width - logo_width; @@ -180,8 +180,6 @@ static void usb_screen_fix_viewports(struct screen *screen, static void usb_screens_draw(struct usb_screen_vps_t *usb_screen_vps_ar) { int i; - int usb_bars = VP_SB_ALLSCREENS; /* force statusbars */ - lcd_clear_display(); #ifdef HAVE_LCD_REMOTE lcd_remote_clear_display(); @@ -236,18 +234,12 @@ static void usb_screens_draw(struct usb_screen_vps_t *usb_screen_vps_ar) screen->update_viewport(); screen->set_viewport(NULL); - - /* force statusbar by ignoring the setting */ - usb_bars |= VP_SB_IGNORE_SETTING(i); } - - viewportmanager_set_statusbar(usb_bars); } void gui_usb_screen_run(void) { int i; - int old_bars = viewportmanager_get_statusbar(); struct usb_screen_vps_t usb_screen_vps_ar[NB_SCREENS]; #if defined HAVE_TOUCHSCREEN enum touchscreen_mode old_mode = touchscreen_get_mode(); @@ -319,9 +311,8 @@ void gui_usb_screen_run(void) FOR_NB_SCREENS(i) { screens[i].backlight_on(); + viewportmanager_theme_undo(i); } - viewportmanager_set_statusbar(old_bars); - send_event(GUI_EVENT_REFRESH, NULL); } #endif /* !defined(USB_NONE) */ -- cgit v1.2.3