Fix FS#12337 properly. Also fixes FS#12345 which the previous commit introduced.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30827 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
e299eb3ea3
commit
155a9f8abd
1 changed files with 6 additions and 5 deletions
|
@ -84,14 +84,18 @@ static int line_height_from_lcd_dpi(const struct viewport *vp)
|
|||
/* the 4/12 factor is designed for reasonable item size on a 160dpi screen */
|
||||
return MAX(lcd_get_dpi()*4/12, (int)font_get(vp->font)->height);
|
||||
}
|
||||
#endif
|
||||
|
||||
static int list_line_height(const struct viewport *vp)
|
||||
{
|
||||
#ifdef HAVE_TOUCHSCREEN
|
||||
if (global_settings.list_line_padding == -1)
|
||||
return line_height_from_lcd_dpi(vp);
|
||||
return font_get(vp->font)->height + global_settings.list_line_padding;
|
||||
}
|
||||
#else
|
||||
return font_get(vp->font)->height;
|
||||
#endif
|
||||
}
|
||||
|
||||
static void list_init_viewports(struct gui_synclist *list)
|
||||
{
|
||||
|
@ -133,7 +137,6 @@ bool list_display_title(struct gui_synclist *list, enum screen_type screen)
|
|||
static int list_get_nb_lines(struct gui_synclist *list, enum screen_type screen)
|
||||
{
|
||||
struct viewport *vp = list->parent[screen];
|
||||
vp->line_height = font_get(vp->font)->height;
|
||||
int lines = skinlist_get_line_count(screen, list);
|
||||
if (lines < 0)
|
||||
{
|
||||
|
@ -498,10 +501,8 @@ void gui_synclist_set_voice_callback(struct gui_synclist * lists,
|
|||
void gui_synclist_set_viewport_defaults(struct viewport *vp,
|
||||
enum screen_type screen)
|
||||
{
|
||||
viewport_set_defaults(vp, screen);
|
||||
#ifdef HAVE_TOUCHSCREEN
|
||||
viewport_set_defaults(vp, screen);
|
||||
vp->line_height = list_line_height(vp);
|
||||
#endif
|
||||
#ifdef HAVE_BUTTONBAR
|
||||
if (screens[screen].has_buttonbar)
|
||||
vp->height -= BUTTONBAR_HEIGHT;
|
||||
|
|
Loading…
Reference in a new issue