summaryrefslogtreecommitdiffstats
path: root/apps/gui/bitmap
diff options
context:
space:
mode:
authorWilliam Wilgus <me.theuser@yahoo.com>2019-11-02 06:15:01 -0500
committerWilliam Wilgus <me.theuser@yahoo.com>2020-11-14 00:01:39 +0000
commit43f90746d5610a36eaf7dc98b9fa3ca17ee6010e (patch)
treece47b270bfbfe184bf1f94b7097ac30a7478563e /apps/gui/bitmap
parent610ad6f6e34282333114cc83d4c65300da71a40c (diff)
downloadrockbox-43f90746d5610a36eaf7dc98b9fa3ca17ee6010e.tar.gz
rockbox-43f90746d5610a36eaf7dc98b9fa3ca17ee6010e.zip
synclist add method for setting selection color
Change-Id: I8c8761d92f4fc99f65d45098ee6e97800d3fe002
Diffstat (limited to 'apps/gui/bitmap')
-rw-r--r--apps/gui/bitmap/list.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/apps/gui/bitmap/list.c b/apps/gui/bitmap/list.c
index 27121eac56..1d2df73e09 100644
--- a/apps/gui/bitmap/list.c
+++ b/apps/gui/bitmap/list.c
@@ -228,8 +228,6 @@ void list_draw(struct screen *display, struct gui_synclist *list)
int line_indent = 0;
int style = STYLE_DEFAULT;
bool is_selected = false;
- icon = list->callback_get_item_icon ?
- list->callback_get_item_icon(i, list->data) : Icon_NOICON;
s = list->callback_get_item_name(i, list->data, entry_buffer,
sizeof(entry_buffer));
entry_name = P2STR(s);
@@ -265,6 +263,17 @@ void list_draw(struct screen *display, struct gui_synclist *list)
&& i < list->selected_item + list->selected_size
&& list->show_selection_marker)
{/* The selected item must be displayed scrolling */
+#ifdef HAVE_LCD_COLOR
+ if (list->selection_color)
+ {
+ /* Display gradient line selector */
+ style = STYLE_GRADIENT;
+ linedes.text_color = list->selection_color->text_color;
+ linedes.line_color = list->selection_color->line_color;
+ linedes.line_end_color = list->selection_color->line_end_color;
+ }
+ else
+#endif
if (global_settings.cursor_style == 1
#ifdef HAVE_REMOTE_LCD
/* the global_settings.cursor_style check is here to make
@@ -313,7 +322,8 @@ void list_draw(struct screen *display, struct gui_synclist *list)
linedes.style = style;
linedes.scroll = is_selected ? true : list->scroll_all;
linedes.line = i % list->selected_size;
-
+ icon = list->callback_get_item_icon ?
+ list->callback_get_item_icon(i, list->data) : Icon_NOICON;
/* the list can have both, one of or neither of cursor and item icons,
* if both don't apply icon padding twice between the icons */
if (show_cursor && have_icons)