mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 13:12:37 -05:00
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
This commit is contained in:
parent
859cd4b627
commit
3b12634e6b
12 changed files with 154 additions and 42 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue