mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 05:05:20 -05:00
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
This commit is contained in:
parent
2813d50acf
commit
4c4285df9a
1 changed files with 7 additions and 9 deletions
|
|
@ -351,19 +351,17 @@ unsigned gui_synclist_do_touchscreen(struct gui_synclist * gui_list)
|
||||||
const int screen = display->screen_type;
|
const int screen = display->screen_type;
|
||||||
const int list_start_item = gui_list->start_item[screen];
|
const int list_start_item = gui_list->start_item[screen];
|
||||||
const struct viewport *list_text_vp = &list_text[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)
|
if (button == BUTTON_NONE)
|
||||||
return ACTION_NONE;
|
return ACTION_NONE;
|
||||||
|
|
||||||
if (x > list_text_vp->x + list_text_vp->width)
|
if (x > list_text_vp->x + list_width)
|
||||||
{
|
/* wider than the list's viewport, ignore it */
|
||||||
if (global_settings.scrollbar == SCROLLBAR_RIGHT &&
|
return ACTION_NONE;
|
||||||
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)
|
if (x < list_text_vp->x)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue