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.tar.gz
rockbox-f3b015f73b29f2d3514c32a9b8b8f0338b52e358.zip
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 a8bbce8cda..6a7d21cc4b 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)
141 int selected_line=gui_list->selected_item-gui_list->start_item+SHOW_LIST_TITLE; 141 int selected_line=gui_list->selected_item-gui_list->start_item+SHOW_LIST_TITLE;
142#ifdef HAVE_LCD_BITMAP 142#ifdef HAVE_LCD_BITMAP
143 int line_ypos=display->getymargin()+display->char_height*selected_line; 143 int line_ypos=display->getymargin()+display->char_height*selected_line;
144 if (global_settings.invert_cursor) 144 if (global_settings.cursor_style)
145 { 145 {
146 int line_xpos=display->getxmargin(); 146 int line_xpos=display->getxmargin();
147 display->set_drawmode(DRMODE_COMPLEMENT); 147 display->set_drawmode(DRMODE_COMPLEMENT);
@@ -313,7 +313,7 @@ static void gui_list_draw_smart(struct gui_list *gui_list)
313 draw_scrollbar = (global_settings.scrollbar && 313 draw_scrollbar = (global_settings.scrollbar &&
314 lines < gui_list->nb_items); 314 lines < gui_list->nb_items);
315 315
316 draw_cursor = !global_settings.invert_cursor && 316 draw_cursor = !global_settings.cursor_style &&
317 gui_list->show_selection_marker; 317 gui_list->show_selection_marker;
318 text_pos = 0; /* here it's in pixels */ 318 text_pos = 0; /* here it's in pixels */
319 if(draw_scrollbar || SHOW_LIST_TITLE) /* indent if there's 319 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)
390 current_item < gui_list->selected_item + gui_list->selected_size) 390 current_item < gui_list->selected_item + gui_list->selected_size)
391 {/* The selected item must be displayed scrolling */ 391 {/* The selected item must be displayed scrolling */
392#ifdef HAVE_LCD_BITMAP 392#ifdef HAVE_LCD_BITMAP
393 if (global_settings.invert_cursor)/* Display inverted-line-style*/ 393 if (global_settings.cursor_style == 1
394#ifdef HAVE_REMOTE_LCD
395 || display->screen_type == SCREEN_REMOTE
396#endif
397 )
394 { 398 {
399 /* Display inverted-line-style */
395 style |= STYLE_INVERT; 400 style |= STYLE_INVERT;
396 } 401 }
397 else /* if (!global_settings.invert_cursor) */ 402#ifdef HAVE_LCD_COLOR
403 else if (global_settings.cursor_style == 2)
404 {
405 /* Display colour line selector */
406 style |= STYLE_COLORBAR;
407 }
408 else if (global_settings.cursor_style == 3)
409 {
410 /* Display gradient line selector */
411 style |= STYLE_GRADIENT;
412 }
413#endif
414 else /* if (!global_settings.cursor_style) */
398 { 415 {
399 if (current_item % gui_list->selected_size != 0) 416 if (current_item % gui_list->selected_size != 0)
400 draw_cursor = false; 417 draw_cursor = false;