summaryrefslogtreecommitdiff
path: root/apps/gui/list.c
diff options
context:
space:
mode:
authorNicolas Pennequin <nicolas.pennequin@free.fr>2007-09-27 15:42:55 +0000
committerNicolas Pennequin <nicolas.pennequin@free.fr>2007-09-27 15:42:55 +0000
commitf3b015f73b29f2d3514c32a9b8b8f0338b52e358 (patch)
tree65e1694745947a9a7d673811d12155f3b2a03019 /apps/gui/list.c
parent5353473b723749a7cd92d72e94423b74058287dc (diff)
downloadrockbox-f3b015f73b29f2d3514c32a9b8b8f0338b52e358.zip
rockbox-f3b015f73b29f2d3514c32a9b8b8f0338b52e358.tar.gz
rockbox-f3b015f73b29f2d3514c32a9b8b8f0338b52e358.tar.bz2
rockbox-f3b015f73b29f2d3514c32a9b8b8f0338b52e358.tar.xz
FS#7808 by Tom Ross, Ken Fazzone and me, with help from Antoine Cellerier.
Add two new line selector types: solid colour and gradient. Solid colour only uses the primary colour setting. The secondary colour setting is used for the gradient. Text colour for the selected item is also changeable. These new settings are a bit controversial so they may be removed later. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14868 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/list.c')
-rw-r--r--apps/gui/list.c25
1 files changed, 21 insertions, 4 deletions
diff --git a/apps/gui/list.c b/apps/gui/list.c
index a8bbce8..6a7d21c 100644
--- a/apps/gui/list.c
+++ b/apps/gui/list.c
@@ -141,7 +141,7 @@ static void gui_list_flash(struct gui_list * gui_list)
int selected_line=gui_list->selected_item-gui_list->start_item+SHOW_LIST_TITLE;
#ifdef HAVE_LCD_BITMAP
int line_ypos=display->getymargin()+display->char_height*selected_line;
- if (global_settings.invert_cursor)
+ if (global_settings.cursor_style)
{
int line_xpos=display->getxmargin();
display->set_drawmode(DRMODE_COMPLEMENT);
@@ -313,7 +313,7 @@ static void gui_list_draw_smart(struct gui_list *gui_list)
draw_scrollbar = (global_settings.scrollbar &&
lines < gui_list->nb_items);
- draw_cursor = !global_settings.invert_cursor &&
+ draw_cursor = !global_settings.cursor_style &&
gui_list->show_selection_marker;
text_pos = 0; /* here it's in pixels */
if(draw_scrollbar || SHOW_LIST_TITLE) /* indent if there's
@@ -390,11 +390,28 @@ static void gui_list_draw_smart(struct gui_list *gui_list)
current_item < gui_list->selected_item + gui_list->selected_size)
{/* The selected item must be displayed scrolling */
#ifdef HAVE_LCD_BITMAP
- if (global_settings.invert_cursor)/* Display inverted-line-style*/
+ if (global_settings.cursor_style == 1
+#ifdef HAVE_REMOTE_LCD
+ || display->screen_type == SCREEN_REMOTE
+#endif
+ )
{
+ /* Display inverted-line-style */
style |= STYLE_INVERT;
}
- else /* if (!global_settings.invert_cursor) */
+#ifdef HAVE_LCD_COLOR
+ else if (global_settings.cursor_style == 2)
+ {
+ /* Display colour line selector */
+ style |= STYLE_COLORBAR;
+ }
+ else if (global_settings.cursor_style == 3)
+ {
+ /* Display gradient line selector */
+ style |= STYLE_GRADIENT;
+ }
+#endif
+ else /* if (!global_settings.cursor_style) */
{
if (current_item % gui_list->selected_size != 0)
draw_cursor = false;