From 485bbbdb309f0c343b5d37eb99a453de8116281a Mon Sep 17 00:00:00 2001 From: Nicolas Pennequin Date: Thu, 6 Dec 2007 17:09:24 +0000 Subject: Make the "current line" value in the gradient style code zero-based, and an attempt at more understandable names and better comments. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15886 a1c6a512-1295-4272-9138-f99709370657 --- apps/gui/list.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'apps/gui') diff --git a/apps/gui/list.c b/apps/gui/list.c index 467bebddd5..86ef97cf4d 100644 --- a/apps/gui/list.c +++ b/apps/gui/list.c @@ -310,7 +310,7 @@ static void gui_list_draw_smart(struct gui_list *gui_list) } #ifdef HAVE_LCD_COLOR - unsigned char cur_line = 1; + unsigned char cur_line = 0; #endif for (i = start; i < end; i++) { @@ -379,9 +379,9 @@ static void gui_list_draw_smart(struct gui_list *gui_list) /* Make the lcd driver know how many lines the gradient should cover and current line number */ - /* max line number*/ - style |= MAXLN_PACK(gui_list->selected_size); - /* current line number */ + /* number of selected lines */ + style |= NUMLN_PACK(gui_list->selected_size); + /* current line number, zero based */ style |= CURLN_PACK(cur_line); cur_line++; } -- cgit v1.2.3