summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2007-06-21 13:21:33 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2007-06-21 13:21:33 +0000
commit2d4ee368e39d8b5fcba43f2b17e00793af0e5579 (patch)
tree154cb68dc60ef1aec17e483596312d5c04a6ac8d /apps
parent0baad43a935319d417f89f2c5c00e764e42a99ad (diff)
Fix problems with the list when you change font size
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13680 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/gui/list.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/apps/gui/list.c b/apps/gui/list.c
index adeff533b0..2fb531b6bd 100644
--- a/apps/gui/list.c
+++ b/apps/gui/list.c
@@ -212,6 +212,7 @@ static void gui_list_draw_smart(struct gui_list *gui_list)
bool draw_cursor;
int i;
int lines;
+ static int last_lines[NB_SCREENS] = {0};
#ifdef HAVE_LCD_BITMAP
int item_offset;
int old_margin = display->getxmargin();
@@ -221,6 +222,7 @@ static void gui_list_draw_smart(struct gui_list *gui_list)
#ifdef HAVE_LCD_BITMAP
display->setfont(FONT_UI);
+ gui_textarea_update_nblines(display);
#endif
/* Speed up UI by drawing the changed contents only. */
if (gui_list == last_list_displayed[gui_list->display->screen_type]
@@ -230,10 +232,12 @@ static void gui_list_draw_smart(struct gui_list *gui_list)
partial_draw = true;
}
- if (SHOW_LIST_TITLE)
- lines = display->nb_lines - 1;
- else
- lines = display->nb_lines;
+ lines = display->nb_lines - SHOW_LIST_TITLE;
+ if (last_lines[display->screen_type] != lines)
+ {
+ gui_list_select_at_offset(gui_list, 0);
+ last_lines[display->screen_type] = lines;
+ }
if (partial_draw)
{