summaryrefslogtreecommitdiffstats
path: root/apps/menus/display_menu.c
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2011-10-17 17:38:10 +0000
committerThomas Martitz <kugel@rockbox.org>2011-10-17 17:38:10 +0000
commit3b12634e6bc966cb2b2e7f21e9a435cdd20f0bc4 (patch)
tree2f103d5b58b4a22f65e9fd02de4a720022034121 /apps/menus/display_menu.c
parent859cd4b627a48cab8273d8f4d04e2afeb0ee7c87 (diff)
downloadrockbox-3b12634e6bc966cb2b2e7f21e9a435cdd20f0bc4.tar.gz
rockbox-3b12634e6bc966cb2b2e7f21e9a435cdd20f0bc4.tar.bz2
rockbox-3b12634e6bc966cb2b2e7f21e9a435cdd20f0bc4.zip
Commit FS#12321 - Touchscreen: List line padding, to more easily select lines
This adds line padding to lists on touchscreens, in order to make lists reasonably useful without huge fonts. It's configurable: * Automatic (default, line height calculated using a lcd dpi aware function) * Off (status quo, line height = font height) * X pixels (from 2 to 50 in even steps) The automatic setting should/aims to Just Work Out Of The Box on all targets git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30773 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/menus/display_menu.c')
-rw-r--r--apps/menus/display_menu.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/apps/menus/display_menu.c b/apps/menus/display_menu.c
index 7e7b5a6903..957307d8a8 100644
--- a/apps/menus/display_menu.c
+++ b/apps/menus/display_menu.c
@@ -500,14 +500,25 @@ static int touch_mode_callback(int action,const struct menu_item_ex *this_item)
}
return action;
}
+
+static int line_padding_callback(int action,const struct menu_item_ex *this_item)
+{
+ (void)this_item;
+
+ if (action == ACTION_EXIT_MENUITEM)
+ viewportmanager_theme_changed(THEME_LISTS);
+ return action;
+}
+
MENUITEM_SETTING(touch_mode, &global_settings.touch_mode, touch_mode_callback);
MENUITEM_FUNCTION(touchscreen_menu_calibrate, 0, ID2P(LANG_TOUCHSCREEN_CALIBRATE), calibrate,
NULL, NULL, Icon_NOICON);
MENUITEM_FUNCTION(touchscreen_menu_reset_calibration, 0, ID2P(LANG_TOUCHSCREEN_RESET_CALIBRATION), reset_mapping,
NULL, NULL, Icon_NOICON);
+MENUITEM_SETTING(list_line_padding, &global_settings.list_line_padding, line_padding_callback);
-MAKE_MENU(touchscreen_menu, ID2P(LANG_TOUCHSCREEN_SETTINGS), NULL, Icon_NOICON, &touch_mode,
+MAKE_MENU(touchscreen_menu, ID2P(LANG_TOUCHSCREEN_SETTINGS), NULL, Icon_NOICON, &list_line_padding, &touch_mode,
&touchscreen_menu_calibrate, &touchscreen_menu_reset_calibration);
#endif