From 4ce82b9dd1c2d29d0a6123ab16be60662a9e76c8 Mon Sep 17 00:00:00 2001 From: Maurus Cuelenaere Date: Sat, 22 Aug 2009 22:48:03 +0000 Subject: Touchscreen list handling: ignore presses close to the scrollbar when it's on the right, this is similar as how it's handled when the scrollbar is on the left (icons) and improves user experience due to touchscreen dead zones. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22467 a1c6a512-1295-4272-9138-f99709370657 --- apps/gui/bitmap/list.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'apps/gui') diff --git a/apps/gui/bitmap/list.c b/apps/gui/bitmap/list.c index 743ab813af..2a3a31a548 100644 --- a/apps/gui/bitmap/list.c +++ b/apps/gui/bitmap/list.c @@ -393,6 +393,16 @@ unsigned gui_synclist_do_touchscreen(struct gui_synclist * gui_list) return ACTION_REDRAW; } + /* This has the same effect as the icons do when the scrollbar + is on the left (ie eliminate the chances an user enters/starts + an item when he wanted to use the scrollbar, due to touchscreen + dead zones) + */ + if(global_settings.scrollbar == SCROLLBAR_RIGHT && + x > list_text[screen].x + list_text[screen].width - + global_settings.scrollbar_width) + return ACTION_NONE; + if (button == (BUTTON_REPEAT|BUTTON_REL)) { if(!scrolling) -- cgit v1.2.3