summaryrefslogtreecommitdiffstats
path: root/apps/gui/bitmap
diff options
context:
space:
mode:
authorMaurus Cuelenaere <mcuelenaere@gmail.com>2010-06-24 14:32:25 +0000
committerMaurus Cuelenaere <mcuelenaere@gmail.com>2010-06-24 14:32:25 +0000
commit5da84ec4da4a1e61343854aa6ee92fccbbaf3db5 (patch)
treeaf77bca5070a87f7b989bc5bfdaafa4f6b451ecd /apps/gui/bitmap
parent3f4838585f38d44dd1e8296c9bdbce57e4b05f94 (diff)
downloadrockbox-5da84ec4da4a1e61343854aa6ee92fccbbaf3db5.tar.gz
rockbox-5da84ec4da4a1e61343854aa6ee92fccbbaf3db5.zip
I somehow messed up the previous commit, undo the unrelated changes.
Also, r26922 wasn't the culprit but r27004. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27108 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/bitmap')
-rw-r--r--apps/gui/bitmap/list.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/apps/gui/bitmap/list.c b/apps/gui/bitmap/list.c
index 09c89618f6..87d7107950 100644
--- a/apps/gui/bitmap/list.c
+++ b/apps/gui/bitmap/list.c
@@ -347,19 +347,26 @@ 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;
+
+ if (global_settings.scrollbar == SCROLLBAR_RIGHT)
+ list_width += SCROLLBAR_WIDTH;
if (button == BUTTON_NONE)
return ACTION_NONE;
- if (global_settings.scrollbar == SCROLLBAR_RIGHT &&
- x > list_text_vp->x + list_text_vp->width + SCROLLBAR_WIDTH)
- /* wider than the list's viewport, ignore it */
+ if (x > list_text_vp->x + list_width)
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 (x < list_text_vp->x)
{
/* Top left corner is GO_TO_ROOT */
@@ -463,9 +470,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;
}