diff options
author | Aidan MacDonald <amachronic@protonmail.com> | 2022-09-19 11:10:54 +0100 |
---|---|---|
committer | Aidan MacDonald <amachronic@protonmail.com> | 2022-10-02 09:21:25 -0400 |
commit | 9ce5b2a2eda5c7101898476adaa3533e0ba5db82 (patch) | |
tree | facbfe9721d907b1a92f2b113b262374c6e2917e /apps/gui/bitmap/list.c | |
parent | c1d75a6bcb30260eba288f643261c4a57959f45f (diff) | |
download | rockbox-9ce5b2a2eda5c7101898476adaa3533e0ba5db82.tar.gz rockbox-9ce5b2a2eda5c7101898476adaa3533e0ba5db82.zip |
gui: Remove show/hide selection option in lists
The implementation of the "show_selection_marker" option in
lists isn't great. It's a cosmetic option used to hide the
selection, but it causes the list to do funny things to the
selected_item and doesn't play nice with voiced menus, since
these rely on the selection to determine what item is spoken.
There are only two user-facing lists that use the option, the
"Rockbox Info" screen and a menu in the superdom plugin. The
rest are debug screens, and cosmetics don't matter much there.
Given how little used the option is, and its issues, removing
it seems reasonable.
Change-Id: I2c70b3e4c74ff3cc6dbac46366a371d271dd2d58
Diffstat (limited to 'apps/gui/bitmap/list.c')
-rw-r--r-- | apps/gui/bitmap/list.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/apps/gui/bitmap/list.c b/apps/gui/bitmap/list.c index b2987e9853..ca58d713d0 100644 --- a/apps/gui/bitmap/list.c +++ b/apps/gui/bitmap/list.c | |||
@@ -196,10 +196,7 @@ void list_draw(struct screen *display, struct gui_synclist *list) | |||
196 | const int list_start_item = list->start_item[screen]; | 196 | const int list_start_item = list->start_item[screen]; |
197 | const bool scrollbar_in_left = (list->scrollbar == SCROLLBAR_LEFT); | 197 | const bool scrollbar_in_left = (list->scrollbar == SCROLLBAR_LEFT); |
198 | const bool scrollbar_in_right = (list->scrollbar == SCROLLBAR_RIGHT); | 198 | const bool scrollbar_in_right = (list->scrollbar == SCROLLBAR_RIGHT); |
199 | 199 | const bool show_cursor = (list->cursor_style == SYNCLIST_CURSOR_NOSTYLE); | |
200 | const bool show_cursor = list->show_selection_marker && | ||
201 | (list->cursor_style == SYNCLIST_CURSOR_NOSTYLE); | ||
202 | |||
203 | const bool have_icons = list->callback_get_item_icon && list->show_icons; | 200 | const bool have_icons = list->callback_get_item_icon && list->show_icons; |
204 | 201 | ||
205 | struct viewport *parent = (list->parent[screen]); | 202 | struct viewport *parent = (list->parent[screen]); |
@@ -365,8 +362,7 @@ void list_draw(struct screen *display, struct gui_synclist *list) | |||
365 | !hide_selection && | 362 | !hide_selection && |
366 | #endif | 363 | #endif |
367 | i >= list->selected_item | 364 | i >= list->selected_item |
368 | && i < list->selected_item + list->selected_size | 365 | && i < list->selected_item + list->selected_size) |
369 | && list->show_selection_marker) | ||
370 | {/* The selected item must be displayed scrolling */ | 366 | {/* The selected item must be displayed scrolling */ |
371 | #ifdef HAVE_LCD_COLOR | 367 | #ifdef HAVE_LCD_COLOR |
372 | if (list->selection_color) | 368 | if (list->selection_color) |