diff options
author | Thomas Martitz <kugel@rockbox.org> | 2010-01-26 20:14:42 +0000 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2010-01-26 20:14:42 +0000 |
commit | 5629d551d710bd57a1cef129ce5a69b76cbbdd12 (patch) | |
tree | 1196849b9a02ebf39fa5d6c33df1db9334aeead2 /apps/gui | |
parent | 7a73a9cd4e882ebbc37831160ec18d0f251f14bd (diff) |
Accept the last patch FS#10797 with a few changes by me (fixing side effects and adding the new backdrop_hide() to the multi screen api). It changes the hide_bars parameter to mean hide_theme.
This makes plugins show the menu backdrop in their backdrop so that they don't look like crap if you have an sbs and look more integrated. I've test about all plugins and all work fine.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24335 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui')
-rw-r--r-- | apps/gui/backdrop.c | 13 | ||||
-rw-r--r-- | apps/gui/backdrop.h | 4 | ||||
-rw-r--r-- | apps/gui/viewport.c | 6 | ||||
-rw-r--r-- | apps/gui/wps.c | 3 |
4 files changed, 24 insertions, 2 deletions
diff --git a/apps/gui/backdrop.c b/apps/gui/backdrop.c index c220d06493..7e56dcb7db 100644 --- a/apps/gui/backdrop.c +++ b/apps/gui/backdrop.c @@ -124,6 +124,12 @@ void backdrop_show(enum backdrop_type bdrop) show_skin_backdrop(); } +void backdrop_hide(void) +{ + lcd_set_backdrop(NULL); +} + + #if defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1 @@ -201,4 +207,11 @@ void remote_backdrop_unload(enum backdrop_type bdrop) } +void remote_backdrop_hide(void) +{ + lcd_remote_set_backdrop(NULL); +} + #endif + + diff --git a/apps/gui/backdrop.h b/apps/gui/backdrop.h index b37071b5d4..4083464cee 100644 --- a/apps/gui/backdrop.h +++ b/apps/gui/backdrop.h @@ -35,6 +35,7 @@ enum backdrop_type { bool backdrop_load(enum backdrop_type bdrop, const char*); void backdrop_unload(enum backdrop_type bdrop); void backdrop_show(enum backdrop_type bdrop); +void backdrop_hide(void); #else /* LCD_DEPTH <= 1 || __PCTOOL__ */ @@ -52,6 +53,7 @@ static inline void backdrop_show(enum backdrop_type bdrop) (void)bdrop; } +static inline void backdrop_hide(void) {} #endif #if defined(HAVE_REMOTE_LCD) @@ -60,6 +62,7 @@ static inline void backdrop_show(enum backdrop_type bdrop) bool remote_backdrop_load(enum backdrop_type bdrop,const char* filename); void remote_backdrop_unload(enum backdrop_type bdrop); void remote_backdrop_show(enum backdrop_type bdrop); +void remote_backdrop_hide(void); #else static inline bool remote_backdrop_load(enum backdrop_type bdrop,const char* filename) @@ -76,6 +79,7 @@ static inline void remote_backdrop_show(enum backdrop_type bdrop) { (void)bdrop; } +static inline void remote_backdrop_hide(void) {} #endif #endif diff --git a/apps/gui/viewport.c b/apps/gui/viewport.c index 22eccc161f..3c5249cff9 100644 --- a/apps/gui/viewport.c +++ b/apps/gui/viewport.c @@ -89,6 +89,8 @@ static void toggle_theme(enum screen_type screen, bool force) add_event(PLAYBACK_EVENT_NEXTTRACKID3_AVAILABLE, false, do_sbs_update_callback); + screens[screen].backdrop_show(BACKDROP_MAIN); + /* remove the left overs from the previous screen. * could cause a tiny flicker. Redo your screen code if that happens */ if (!was_enabled[screen] || force) @@ -142,7 +144,11 @@ static void toggle_theme(enum screen_type screen, bool force) else { FOR_NB_SCREENS(i) + { + screens[i].backdrop_hide(); screens[i].stop_scroll(); + } + #if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP) remove_event(LCD_EVENT_ACTIVATION, do_sbs_update_callback); #endif diff --git a/apps/gui/wps.c b/apps/gui/wps.c index 14fb848ebe..a5394981ae 100644 --- a/apps/gui/wps.c +++ b/apps/gui/wps.c @@ -611,6 +611,7 @@ static void gwps_enter_wps(void) vp->bg_pattern = display->get_background(); } #endif + display->backdrop_show(BACKDROP_SKIN_WPS); skin_update(gwps, WPS_REFRESH_ALL); } } @@ -1180,8 +1181,6 @@ long gui_wps_show(void) /* we remove the update delay since it's not very usable in the wps, * e.g. during volume changing or ffwd/rewind */ sb_skin_set_update_delay(0); - FOR_NB_SCREENS(i) - gui_wps[i].display->backdrop_show(BACKDROP_SKIN_WPS); wps_sync_data.do_full_update = update = false; gwps_enter_wps(); } |