diff options
Diffstat (limited to 'apps/gui/bitmap')
-rw-r--r-- | apps/gui/bitmap/list.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/apps/gui/bitmap/list.c b/apps/gui/bitmap/list.c index 0c38132ece..3a45a8124c 100644 --- a/apps/gui/bitmap/list.c +++ b/apps/gui/bitmap/list.c | |||
@@ -49,7 +49,7 @@ static struct viewport list_text[NB_SCREENS], title_text[NB_SCREENS]; | |||
49 | 49 | ||
50 | #ifdef HAVE_TOUCHSCREEN | 50 | #ifdef HAVE_TOUCHSCREEN |
51 | static int y_offset; | 51 | static int y_offset; |
52 | static bool hide_selection = true; | 52 | static bool hide_selection; |
53 | #endif | 53 | #endif |
54 | 54 | ||
55 | int gui_list_get_item_offset(struct gui_synclist * gui_list, int item_width, | 55 | int gui_list_get_item_offset(struct gui_synclist * gui_list, int item_width, |
@@ -719,7 +719,7 @@ unsigned gui_synclist_do_touchscreen(struct gui_synclist * list) | |||
719 | 719 | ||
720 | /* some defaults before running the state machine */ | 720 | /* some defaults before running the state machine */ |
721 | recurse = false; | 721 | recurse = false; |
722 | hide_selection = true; | 722 | hide_selection = false; |
723 | 723 | ||
724 | switch (scroll_mode) | 724 | switch (scroll_mode) |
725 | { | 725 | { |
@@ -753,9 +753,6 @@ unsigned gui_synclist_do_touchscreen(struct gui_synclist * list) | |||
753 | scroll_mode = SCROLL_SWIPE; | 753 | scroll_mode = SCROLL_SWIPE; |
754 | else if (click_loc & SCROLLBAR) | 754 | else if (click_loc & SCROLLBAR) |
755 | scroll_mode = SCROLL_BAR; | 755 | scroll_mode = SCROLL_BAR; |
756 | |||
757 | /* only show selection bar if clicking the list */ | ||
758 | hide_selection = click_loc & (SCROLLBAR|TITLE); | ||
759 | } | 756 | } |
760 | else if (action == BUTTON_REPEAT) | 757 | else if (action == BUTTON_REPEAT) |
761 | { | 758 | { |
@@ -794,6 +791,7 @@ unsigned gui_synclist_do_touchscreen(struct gui_synclist * list) | |||
794 | /* when swipe scrolling, we accept outside presses as well and | 791 | /* when swipe scrolling, we accept outside presses as well and |
795 | * grab the entire screen (i.e. click_loc does not matter) */ | 792 | * grab the entire screen (i.e. click_loc does not matter) */ |
796 | int diff = adj_y - last_y; | 793 | int diff = adj_y - last_y; |
794 | hide_selection = true; | ||
797 | kinetic_stats_collect(diff); | 795 | kinetic_stats_collect(diff); |
798 | if (swipe_scroll(list, diff)) | 796 | if (swipe_scroll(list, diff)) |
799 | { | 797 | { |
@@ -801,7 +799,10 @@ unsigned gui_synclist_do_touchscreen(struct gui_synclist * list) | |||
801 | if ((action & BUTTON_REL)) | 799 | if ((action & BUTTON_REL)) |
802 | { | 800 | { |
803 | if (kinetic_setup_scroll(list)) | 801 | if (kinetic_setup_scroll(list)) |
802 | { | ||
803 | hide_selection = true; | ||
804 | scroll_mode = SCROLL_KINETIC; | 804 | scroll_mode = SCROLL_KINETIC; |
805 | } | ||
805 | else | 806 | else |
806 | scroll_mode = SCROLL_NONE; | 807 | scroll_mode = SCROLL_NONE; |
807 | } | 808 | } |
@@ -837,6 +838,7 @@ unsigned gui_synclist_do_touchscreen(struct gui_synclist * list) | |||
837 | } | 838 | } |
838 | case SCROLL_BAR: | 839 | case SCROLL_BAR: |
839 | { | 840 | { |
841 | hide_selection = true; | ||
840 | /* similarly to swipe scroll, using the scrollbar grabs | 842 | /* similarly to swipe scroll, using the scrollbar grabs |
841 | * focus so the click location is irrelevant */ | 843 | * focus so the click location is irrelevant */ |
842 | scrollbar_scroll(list, adj_y); | 844 | scrollbar_scroll(list, adj_y); |