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)
downloadrockbox-2d4ee368e39d8b5fcba43f2b17e00793af0e5579.tar.gz
rockbox-2d4ee368e39d8b5fcba43f2b17e00793af0e5579.zip
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)
212 bool draw_cursor; 212 bool draw_cursor;
213 int i; 213 int i;
214 int lines; 214 int lines;
215 static int last_lines[NB_SCREENS] = {0};
215#ifdef HAVE_LCD_BITMAP 216#ifdef HAVE_LCD_BITMAP
216 int item_offset; 217 int item_offset;
217 int old_margin = display->getxmargin(); 218 int old_margin = display->getxmargin();
@@ -221,6 +222,7 @@ static void gui_list_draw_smart(struct gui_list *gui_list)
221 222
222#ifdef HAVE_LCD_BITMAP 223#ifdef HAVE_LCD_BITMAP
223 display->setfont(FONT_UI); 224 display->setfont(FONT_UI);
225 gui_textarea_update_nblines(display);
224#endif 226#endif
225 /* Speed up UI by drawing the changed contents only. */ 227 /* Speed up UI by drawing the changed contents only. */
226 if (gui_list == last_list_displayed[gui_list->display->screen_type] 228 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)
230 partial_draw = true; 232 partial_draw = true;
231 } 233 }
232 234
233 if (SHOW_LIST_TITLE) 235 lines = display->nb_lines - SHOW_LIST_TITLE;
234 lines = display->nb_lines - 1; 236 if (last_lines[display->screen_type] != lines)
235 else 237 {
236 lines = display->nb_lines; 238 gui_list_select_at_offset(gui_list, 0);
239 last_lines[display->screen_type] = lines;
240 }
237 241
238 if (partial_draw) 242 if (partial_draw)
239 { 243 {