From 4c4285df9ac5d93ccc296ce53bcc6be4e519ac81 Mon Sep 17 00:00:00 2001 From: Maurus Cuelenaere Date: Fri, 18 Jun 2010 14:41:49 +0000 Subject: Simplify check in gui_synclist_do_touchscreen(), no functional changes. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26922 a1c6a512-1295-4272-9138-f99709370657 --- apps/gui/bitmap/list.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/apps/gui/bitmap/list.c b/apps/gui/bitmap/list.c index 0da67c7c1e..2c396c7f00 100644 --- a/apps/gui/bitmap/list.c +++ b/apps/gui/bitmap/list.c @@ -351,19 +351,17 @@ unsigned gui_synclist_do_touchscreen(struct gui_synclist * gui_list) const int screen = display->screen_type; const int list_start_item = gui_list->start_item[screen]; const struct viewport *list_text_vp = &list_text[screen]; + const 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 (x > list_text_vp->x + list_text_vp->width) - { - 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 */ - return ACTION_NONE; - } - } + if (x > list_text_vp->x + list_width) + /* wider than the list's viewport, ignore it */ + return ACTION_NONE; if (x < list_text_vp->x) { -- cgit v1.2.3