diff options
| author | Jonathan Gordon <rockbox@jdgordon.info> | 2010-06-21 14:57:44 +0000 |
|---|---|---|
| committer | Jonathan Gordon <rockbox@jdgordon.info> | 2010-06-21 14:57:44 +0000 |
| commit | 49dac9ae04df496e2c9b4aa387043aeb25ecbfde (patch) | |
| tree | 08a51e6bb5ba11a9669017b4646ebb52e29b79e4 /apps/gui/bitmap | |
| parent | ec7937b2f8ddd1219ee58a213a152bd59b01a265 (diff) | |
| download | rockbox-49dac9ae04df496e2c9b4aa387043aeb25ecbfde.zip rockbox-49dac9ae04df496e2c9b4aa387043aeb25ecbfde.tar.gz rockbox-49dac9ae04df496e2c9b4aa387043aeb25ecbfde.tar.bz2 rockbox-49dac9ae04df496e2c9b4aa387043aeb25ecbfde.tar.xz | |
Make the title area go up one level in the lists again. This Doesnt work if you have the title in a seperate viewport in the sbs, but that isnt really a problem because if you are doing that there is a good chance you will setup a region for that press anyway
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27015 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/bitmap')
| -rw-r--r-- | apps/gui/bitmap/list.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/apps/gui/bitmap/list.c b/apps/gui/bitmap/list.c index fa015bf..b5e253d 100644 --- a/apps/gui/bitmap/list.c +++ b/apps/gui/bitmap/list.c @@ -347,8 +347,7 @@ unsigned gui_synclist_do_touchscreen(struct gui_synclist * gui_list) short x, y; const int button = action_get_touchscreen_press(&x, &y); int line; - const struct screen *display = &screens[SCREEN_MAIN]; - const int screen = display->screen_type; + const int screen = SCREEN_MAIN; const int list_start_item = gui_list->start_item[screen]; const struct viewport *list_text_vp = &list_text[screen]; int list_width = list_text_vp->width; @@ -360,6 +359,11 @@ unsigned gui_synclist_do_touchscreen(struct gui_synclist * gui_list) return ACTION_NONE; /* make sure it is inside the UI viewport */ + if (list_display_title(gui_list, screen) && + viewport_point_within_vp(&title_text[screen], x, y) && + button == BUTTON_REL) + return ACTION_STD_CANCEL; + if (!viewport_point_within_vp(list_text_vp, x, y)) /* wider than the list's viewport, ignore it */ return ACTION_NONE; @@ -467,9 +471,6 @@ unsigned gui_synclist_do_touchscreen(struct gui_synclist * gui_list) else return ACTION_NONE; } - /* Everything above the items is cancel */ - else if (y < list_text_vp->y && button == BUTTON_REL) - return ACTION_STD_CANCEL; } return ACTION_NONE; } |