summaryrefslogtreecommitdiffstats
path: root/apps/menus
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2011-10-22 10:09:23 +0000
committerThomas Martitz <kugel@rockbox.org>2011-10-22 10:09:23 +0000
commit5c509d17db86e889560e7d938b5a7acf083948e2 (patch)
treeaf7cfcd615d2b48cda55ffecf975a384ed3e5610 /apps/menus
parent09d0b6fec4988677b3bb4f73a13dd4fa961c3f5a (diff)
downloadrockbox-5c509d17db86e889560e7d938b5a7acf083948e2.tar.gz
rockbox-5c509d17db86e889560e7d938b5a7acf083948e2.tar.bz2
rockbox-5c509d17db86e889560e7d938b5a7acf083948e2.zip
Fix buttonbar and line padding in time&date screen.
The time&date screen uses a custom parent for do_menu(), and doesn't account for the buttonbar and list line height. Introduce gui_synclist_set_viewport_defaults() to set those for viewports that are going to be list parents and use that so that time&date screen doesn't need to know about buttonbar/line padding. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30824 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/menus')
-rw-r--r--apps/menus/time_menu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/menus/time_menu.c b/apps/menus/time_menu.c
index 7059c5d92c..c4fe49aa49 100644
--- a/apps/menus/time_menu.c
+++ b/apps/menus/time_menu.c
@@ -265,11 +265,11 @@ int time_screen(void* ignored)
#endif
nb_lines = viewport_get_nb_lines(&clock_vps[i]);
- menu[i] = clock_vps[i];
+ gui_synclist_set_viewport_defaults(&menu[i], i);
/* force time to be drawn centered */
clock_vps[i].flags |= VP_FLAG_ALIGN_CENTER;
- font_h = font_get(clock_vps[i].font)->height;
+ font_h = clock_vps[i].line_height;
nb_lines -= 2; /* at least 2 lines for menu */
if (nb_lines > 4)
nb_lines = 4;