From fbf83dc4ce939c06808c874d6ac1cc3926fedd50 Mon Sep 17 00:00:00 2001 From: Christian Soffke Date: Thu, 21 Oct 2021 23:11:32 +0200 Subject: Add setting for disabling wrap-around lists Allows user to decide whether scrolling lists will wrap around to the opposite end after the first or last item has been reached. Change-Id: I22156812cf4c857ddc4b6c48c1cef013b1985260 --- apps/gui/list.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'apps/gui/list.c') diff --git a/apps/gui/list.c b/apps/gui/list.c index 640a57fbd3..8ff075da7e 100644 --- a/apps/gui/list.c +++ b/apps/gui/list.c @@ -686,7 +686,7 @@ bool gui_synclist_do_button(struct gui_synclist * lists, switch (wrap) { case LIST_WRAP_ON: - gui_synclist_limit_scroll(lists, false); + gui_synclist_limit_scroll(lists, !global_settings.list_wraparound); break; case LIST_WRAP_OFF: gui_synclist_limit_scroll(lists, true); @@ -697,7 +697,7 @@ bool gui_synclist_do_button(struct gui_synclist * lists, action == ACTION_LISTTREE_PGUP || action == ACTION_LISTTREE_PGDOWN) gui_synclist_limit_scroll(lists, true); - else gui_synclist_limit_scroll(lists, false); + else gui_synclist_limit_scroll(lists, !global_settings.list_wraparound); break; }; @@ -911,7 +911,7 @@ bool simplelist_show_list(struct simplelist_info *info) struct gui_synclist lists; int action, old_line_count = simplelist_line_count; list_get_name *getname; - int wrap = LIST_WRAP_UNLESS_HELD; + int wrap = global_settings.list_wraparound ? LIST_WRAP_UNLESS_HELD : LIST_WRAP_OFF; if (info->get_name) getname = info->get_name; else -- cgit v1.2.3