(GLUI) Navigation bar improvements (#9635)

This commit is contained in:
jdgleaver 2019-10-25 17:28:36 +01:00 committed by Twinaphex
parent b56551e978
commit 1194b29c12
10 changed files with 726 additions and 283 deletions

View File

@ -137,6 +137,10 @@
#define DEFAULT_MATERIALUI_OPTIMIZE_LANDSCAPE_LAYOUT true
#endif
/* Reposition navigation bar to make better use
* of screen space when using landscape layouts */
#define DEFAULT_MATERIALUI_AUTO_ROTATE_NAV_BAR true
#define DEFAULT_CRT_SWITCH_RESOLUTION CRT_SWITCH_NONE
#define DEFAULT_CRT_SWITCH_RESOLUTION_SUPER 2560

View File

@ -1557,6 +1557,7 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
#ifdef HAVE_MATERIALUI
SETTING_BOOL("materialui_icons_enable", &settings->bools.menu_materialui_icons_enable, true, DEFAULT_MATERIALUI_ICONS_ENABLE, false);
SETTING_BOOL("materialui_optimize_landscape_layout", &settings->bools.menu_materialui_optimize_landscape_layout, true, DEFAULT_MATERIALUI_OPTIMIZE_LANDSCAPE_LAYOUT, false);
SETTING_BOOL("materialui_auto_rotate_nav_bar", &settings->bools.menu_materialui_auto_rotate_nav_bar, true, DEFAULT_MATERIALUI_AUTO_ROTATE_NAV_BAR, false);
#endif
#ifdef HAVE_RGUI
SETTING_BOOL("rgui_background_filler_thickness_enable", &settings->bools.menu_rgui_background_filler_thickness_enable, true, true, false);

View File

@ -187,6 +187,7 @@ typedef struct settings
#endif
bool menu_materialui_icons_enable;
bool menu_materialui_optimize_landscape_layout;
bool menu_materialui_auto_rotate_nav_bar;
bool menu_rgui_background_filler_thickness_enable;
bool menu_rgui_border_filler_thickness_enable;
bool menu_rgui_border_filler_enable;

View File

@ -1667,6 +1667,8 @@ MSG_HASH(MENU_ENUM_LABEL_MATERIALUI_ICONS_ENABLE,
"materialui_icons_enable")
MSG_HASH(MENU_ENUM_LABEL_MATERIALUI_OPTIMIZE_LANDSCAPE_LAYOUT,
"materialui_optimize_landscape_layout")
MSG_HASH(MENU_ENUM_LABEL_MATERIALUI_AUTO_ROTATE_NAV_BAR,
"materialui_auto_rotate_nav_bar")
MSG_HASH(MENU_ENUM_LABEL_RENAME_ENTRY,
"rename_entry")
MSG_HASH(MENU_ENUM_LABEL_MENU_SHOW_LOAD_CORE,

View File

@ -6939,6 +6939,14 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_MATERIALUI_OPTIMIZE_LANDSCAPE_LAYOUT,
"Automatically adjust menu layout to better fit the screen when using landscape display orientations."
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_MATERIALUI_AUTO_ROTATE_NAV_BAR,
"Auto-Rotate Navigation Bar"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_MATERIALUI_AUTO_ROTATE_NAV_BAR,
"Automatically move the navigation bar to the right hand side of the screen when using landscape display orientations."
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_XMB_MAIN_MENU_ENABLE_SETTINGS,
"Settings Tab"

View File

@ -199,6 +199,7 @@ default_sublabel_macro(action_bind_sublabel_user_bind_settings, MENU_
default_sublabel_macro(action_bind_sublabel_input_hotkey_settings, MENU_ENUM_SUBLABEL_INPUT_HOTKEY_BINDS)
default_sublabel_macro(action_bind_sublabel_materialui_icons_enable, MENU_ENUM_SUBLABEL_MATERIALUI_ICONS_ENABLE)
default_sublabel_macro(action_bind_sublabel_materialui_optimize_landscape_layout, MENU_ENUM_SUBLABEL_MATERIALUI_OPTIMIZE_LANDSCAPE_LAYOUT)
default_sublabel_macro(action_bind_sublabel_materialui_auto_rotate_nav_bar, MENU_ENUM_SUBLABEL_MATERIALUI_AUTO_ROTATE_NAV_BAR)
default_sublabel_macro(action_bind_sublabel_add_content_list, MENU_ENUM_SUBLABEL_ADD_CONTENT_LIST)
default_sublabel_macro(action_bind_sublabel_video_frame_delay, MENU_ENUM_SUBLABEL_VIDEO_FRAME_DELAY)
default_sublabel_macro(action_bind_sublabel_video_shader_delay, MENU_ENUM_SUBLABEL_VIDEO_SHADER_DELAY)
@ -1254,6 +1255,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
case MENU_ENUM_LABEL_MATERIALUI_OPTIMIZE_LANDSCAPE_LAYOUT:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_materialui_optimize_landscape_layout);
break;
case MENU_ENUM_LABEL_MATERIALUI_AUTO_ROTATE_NAV_BAR:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_materialui_auto_rotate_nav_bar);
break;
case MENU_ENUM_LABEL_VIDEO_VIEWPORT_CUSTOM_HEIGHT:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_video_viewport_custom_height);
break;

File diff suppressed because it is too large Load Diff

View File

@ -5447,6 +5447,7 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
{MENU_ENUM_LABEL_OZONE_TRUNCATE_PLAYLIST_NAME, PARSE_ONLY_BOOL},
{MENU_ENUM_LABEL_MATERIALUI_ICONS_ENABLE, PARSE_ONLY_BOOL},
{MENU_ENUM_LABEL_MATERIALUI_OPTIMIZE_LANDSCAPE_LAYOUT, PARSE_ONLY_BOOL},
{MENU_ENUM_LABEL_MATERIALUI_AUTO_ROTATE_NAV_BAR, PARSE_ONLY_BOOL},
{MENU_ENUM_LABEL_MATERIALUI_MENU_COLOR_THEME, PARSE_ONLY_UINT},
{MENU_ENUM_LABEL_MATERIALUI_MENU_TRANSITION_ANIMATION, PARSE_ONLY_UINT},
{MENU_ENUM_LABEL_MATERIALUI_MENU_HEADER_OPACITY, PARSE_ONLY_FLOAT},

View File

@ -12957,6 +12957,21 @@ static bool setting_append_list(
general_read_handler,
SD_FLAG_NONE);
CONFIG_BOOL(
list, list_info,
&settings->bools.menu_materialui_auto_rotate_nav_bar,
MENU_ENUM_LABEL_MATERIALUI_AUTO_ROTATE_NAV_BAR,
MENU_ENUM_LABEL_VALUE_MATERIALUI_AUTO_ROTATE_NAV_BAR,
DEFAULT_MATERIALUI_AUTO_ROTATE_NAV_BAR,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE);
/* TODO: These should be removed entirely, but just
* comment out for now in case users complain...
CONFIG_FLOAT(

View File

@ -518,6 +518,7 @@ enum msg_hash_enums
MENU_LABEL(MATERIALUI_ICONS_ENABLE),
MENU_LABEL(MATERIALUI_OPTIMIZE_LANDSCAPE_LAYOUT),
MENU_LABEL(MATERIALUI_AUTO_ROTATE_NAV_BAR),
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CUSTOM,
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CLASSIC_RED,