diff options
author | Maurus Cuelenaere <mcuelenaere@gmail.com> | 2010-06-18 14:41:49 +0000 |
---|---|---|
committer | Maurus Cuelenaere <mcuelenaere@gmail.com> | 2010-06-18 14:41:49 +0000 |
commit | 4c4285df9ac5d93ccc296ce53bcc6be4e519ac81 (patch) | |
tree | bc2d0380f025ce93991bfa36e813897d0a1e9056 /apps | |
parent | 2813d50acfe1980d625d4a0dcffa6275de5f87f8 (diff) | |
download | rockbox-4c4285df9ac5d93ccc296ce53bcc6be4e519ac81.tar.gz rockbox-4c4285df9ac5d93ccc296ce53bcc6be4e519ac81.zip |
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
Diffstat (limited to 'apps')
-rw-r--r-- | apps/gui/bitmap/list.c | 16 |
1 files 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) { |