Ozone: Add horizontal padding factor option (#18022)
This commit is contained in:
parent
45c3f93e8b
commit
f86ae06c10
|
@ -662,6 +662,8 @@
|
|||
#ifdef HAVE_OZONE
|
||||
/* Ozone colour theme: 1 == Basic Black */
|
||||
#define DEFAULT_OZONE_COLOR_THEME 1
|
||||
#define DEFAULT_OZONE_PADDING_FACTOR 1.0f
|
||||
#define DEFAULT_OZONE_HEADER_SEPARATOR 1
|
||||
#define DEFAULT_OZONE_COLLAPSE_SIDEBAR false
|
||||
#define DEFAULT_OZONE_SCROLL_CONTENT_METADATA false
|
||||
#define DEFAULT_OZONE_THUMBNAIL_SCALE_FACTOR 1.0f
|
||||
|
|
|
@ -2301,6 +2301,7 @@ static struct config_float_setting *populate_settings_float(
|
|||
#endif
|
||||
#ifdef HAVE_OZONE
|
||||
SETTING_FLOAT("ozone_thumbnail_scale_factor", &settings->floats.ozone_thumbnail_scale_factor, true, DEFAULT_OZONE_THUMBNAIL_SCALE_FACTOR, false);
|
||||
SETTING_FLOAT("ozone_padding_factor", &settings->floats.ozone_padding_factor, true, DEFAULT_OZONE_PADDING_FACTOR, false);
|
||||
#endif
|
||||
#endif /* HAVE_MENU */
|
||||
|
||||
|
@ -2447,6 +2448,7 @@ static struct config_uint_setting *populate_settings_uint(
|
|||
#endif
|
||||
#ifdef HAVE_OZONE
|
||||
SETTING_UINT("ozone_menu_color_theme", &settings->uints.menu_ozone_color_theme, true, DEFAULT_OZONE_COLOR_THEME, false);
|
||||
SETTING_UINT("ozone_header_separator", &settings->uints.menu_ozone_header_separator, true, DEFAULT_OZONE_HEADER_SEPARATOR, false);
|
||||
#endif
|
||||
#endif /* HAVE_MENU */
|
||||
|
||||
|
|
|
@ -305,6 +305,7 @@ typedef struct settings
|
|||
unsigned menu_materialui_thumbnail_view_landscape;
|
||||
unsigned menu_materialui_landscape_layout_optimization;
|
||||
unsigned menu_ozone_color_theme;
|
||||
unsigned menu_ozone_header_separator;
|
||||
unsigned menu_font_color_red;
|
||||
unsigned menu_font_color_green;
|
||||
unsigned menu_font_color_blue;
|
||||
|
@ -417,6 +418,7 @@ typedef struct settings
|
|||
float menu_ticker_speed;
|
||||
float menu_rgui_particle_effect_speed;
|
||||
float menu_screensaver_animation_speed;
|
||||
float ozone_padding_factor;
|
||||
float ozone_thumbnail_scale_factor;
|
||||
|
||||
float cheevos_appearance_padding_h;
|
||||
|
|
|
@ -12378,6 +12378,34 @@ MSG_HASH(
|
|||
MENU_ENUM_SUBLABEL_OZONE_THUMBNAIL_SCALE_FACTOR,
|
||||
"Scale the size of the thumbnail bar."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_OZONE_PADDING_FACTOR,
|
||||
"Padding Factor"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_OZONE_PADDING_FACTOR,
|
||||
"Scale the horizontal padding size."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_OZONE_HEADER_SEPARATOR,
|
||||
"Header Separator"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_OZONE_HEADER_SEPARATOR,
|
||||
"Alternative width for header and footer separators."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_OZONE_HEADER_SEPARATOR_NONE,
|
||||
"None"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_OZONE_HEADER_SEPARATOR_NORMAL,
|
||||
"Normal"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_OZONE_HEADER_SEPARATOR_MAXIMUM,
|
||||
"Maximum"
|
||||
)
|
||||
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_OZONE_MENU_COLOR_THEME,
|
||||
|
|
|
@ -945,6 +945,8 @@ DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_thumbnails_rgui, MENU_
|
|||
#ifdef HAVE_OZONE
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_left_thumbnails_ozone, MENU_ENUM_SUBLABEL_LEFT_THUMBNAILS_OZONE)
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_ozone_menu_color_theme, MENU_ENUM_SUBLABEL_OZONE_MENU_COLOR_THEME)
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_ozone_padding_factor, MENU_ENUM_SUBLABEL_OZONE_PADDING_FACTOR)
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_ozone_header_separator, MENU_ENUM_SUBLABEL_OZONE_HEADER_SEPARATOR)
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_ozone_collapse_sidebar, MENU_ENUM_SUBLABEL_OZONE_COLLAPSE_SIDEBAR)
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_ozone_scroll_content_metadata, MENU_ENUM_SUBLABEL_OZONE_SCROLL_CONTENT_METADATA)
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_ozone_thumbnail_scale_factor, MENU_ENUM_SUBLABEL_OZONE_THUMBNAIL_SCALE_FACTOR)
|
||||
|
@ -3207,6 +3209,16 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
|
|||
case MENU_ENUM_LABEL_OZONE_MENU_COLOR_THEME:
|
||||
#ifdef HAVE_OZONE
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_ozone_menu_color_theme);
|
||||
#endif
|
||||
break;
|
||||
case MENU_ENUM_LABEL_OZONE_PADDING_FACTOR:
|
||||
#ifdef HAVE_OZONE
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_ozone_padding_factor);
|
||||
#endif
|
||||
break;
|
||||
case MENU_ENUM_LABEL_OZONE_HEADER_SEPARATOR:
|
||||
#ifdef HAVE_OZONE
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_ozone_header_separator);
|
||||
#endif
|
||||
break;
|
||||
case MENU_ENUM_LABEL_OZONE_COLLAPSE_SIDEBAR:
|
||||
|
|
|
@ -79,7 +79,7 @@
|
|||
#define FOOTER_HEIGHT 78
|
||||
|
||||
#define ENTRY_PADDING_HORIZONTAL_HALF 40
|
||||
#define ENTRY_PADDING_HORIZONTAL_FULL 140
|
||||
#define ENTRY_PADDING_HORIZONTAL_FULL 130
|
||||
#define ENTRY_PADDING_VERTICAL 20
|
||||
#define ENTRY_HEIGHT 50
|
||||
#define ENTRY_SPACING 8
|
||||
|
@ -572,6 +572,7 @@ struct ozone_handle
|
|||
float sidebar_offset;
|
||||
float last_scale_factor;
|
||||
float last_thumbnail_scale_factor;
|
||||
float last_padding_factor;
|
||||
float pure_white[16];
|
||||
|
||||
struct
|
||||
|
@ -3061,7 +3062,7 @@ static void ozone_draw_cursor_slice(
|
|||
*dispctx = p_disp->dispctx;
|
||||
static float last_alpha = 0.0f;
|
||||
float scale_factor = ozone->last_scale_factor;
|
||||
int slice_x = x_offset - 12 * scale_factor;
|
||||
int slice_x = x_offset - (12 + 1) * scale_factor;
|
||||
int slice_y = (int)y + 8 * scale_factor;
|
||||
unsigned slice_new_w = width + (24 + 1) * scale_factor;
|
||||
unsigned slice_new_h = height + 20 * scale_factor;
|
||||
|
@ -5512,7 +5513,7 @@ static int ozone_get_sublabel_max_width(ozone_handle_t *ozone,
|
|||
if (ozone->depth == 1)
|
||||
sublabel_max_width -= (int)ozone->dimensions_sidebar_width;
|
||||
if (ozone->show_thumbnail_bar)
|
||||
sublabel_max_width -= ozone->dimensions.thumbnail_bar_width - entry_padding * 2;
|
||||
sublabel_max_width -= ozone->dimensions.thumbnail_bar_width;
|
||||
|
||||
return sublabel_max_width;
|
||||
}
|
||||
|
@ -5673,7 +5674,6 @@ static void ozone_draw_entries(
|
|||
- ozone->sidebar_offset
|
||||
- entry_padding * 2
|
||||
- ozone->animations.thumbnail_bar_position;
|
||||
unsigned entry_width_max = entry_width + ozone->animations.thumbnail_bar_position;
|
||||
unsigned button_height = ozone->dimensions.entry_height; /* height of the button (entry minus sublabel) */
|
||||
float invert = (ozone->flags & OZONE_FLAG_FADE_DIRECTION) ? -1 : 1;
|
||||
float alpha_anim = old_list ? alpha : 1.0f - alpha;
|
||||
|
@ -5684,29 +5684,6 @@ static void ozone_draw_entries(
|
|||
- ozone->dimensions.header_height
|
||||
- ozone->dimensions.footer_height;
|
||||
|
||||
/* Increase entry width, or rather decrease padding between
|
||||
* entries and thumbnails when thumbnail bar is visible */
|
||||
if (ozone->show_thumbnail_bar && ozone->depth > 1)
|
||||
{
|
||||
unsigned entry_padding_old = entry_padding;
|
||||
|
||||
if ( (ozone->flags & OZONE_FLAG_IS_PLAYLIST)
|
||||
&& (!(ozone->flags2 & OZONE_FLAG2_IS_QUICK_MENU)))
|
||||
{
|
||||
entry_width += entry_padding / 1.25f;
|
||||
entry_padding /= 1.25f;
|
||||
}
|
||||
else
|
||||
entry_width += entry_padding / 1.5f;
|
||||
|
||||
/* Limit entry width to prevent animation bouncing */
|
||||
if (entry_width > entry_width_max)
|
||||
{
|
||||
entry_padding = entry_padding_old;
|
||||
entry_width = entry_width_max;
|
||||
}
|
||||
}
|
||||
|
||||
if (menu_show_sublabels)
|
||||
sublabel_max_width = ozone_get_sublabel_max_width(ozone, video_info_width, entry_padding);
|
||||
|
||||
|
@ -6260,8 +6237,7 @@ static void ozone_draw_thumbnail_bar(
|
|||
- ozone->dimensions.sidebar_gradient_height * 2
|
||||
- ozone->dimensions.footer_height;
|
||||
unsigned x_position = video_width
|
||||
- (unsigned)ozone->animations.thumbnail_bar_position
|
||||
- ozone->dimensions.sidebar_entry_icon_padding;
|
||||
- (unsigned)ozone->animations.thumbnail_bar_position;
|
||||
int thumbnail_x_position = x_position
|
||||
+ ozone->dimensions.sidebar_entry_icon_padding;
|
||||
unsigned thumbnail_height = (video_height
|
||||
|
@ -6282,7 +6258,7 @@ static void ozone_draw_thumbnail_bar(
|
|||
video_height,
|
||||
x_position,
|
||||
ozone->dimensions.header_height + ozone->dimensions.spacer_1px,
|
||||
(unsigned)ozone->animations.thumbnail_bar_position + ozone->dimensions.sidebar_entry_icon_padding,
|
||||
(unsigned)ozone->animations.thumbnail_bar_position,
|
||||
ozone->dimensions.sidebar_gradient_height,
|
||||
video_width,
|
||||
video_height,
|
||||
|
@ -6295,7 +6271,7 @@ static void ozone_draw_thumbnail_bar(
|
|||
video_height,
|
||||
x_position,
|
||||
ozone->dimensions.header_height + ozone->dimensions.spacer_1px + ozone->dimensions.sidebar_gradient_height,
|
||||
(unsigned)ozone->animations.thumbnail_bar_position + ozone->dimensions.sidebar_entry_icon_padding,
|
||||
(unsigned)ozone->animations.thumbnail_bar_position,
|
||||
sidebar_height,
|
||||
video_width,
|
||||
video_height,
|
||||
|
@ -6308,7 +6284,7 @@ static void ozone_draw_thumbnail_bar(
|
|||
video_height,
|
||||
x_position,
|
||||
video_height - ozone->dimensions.footer_height - ozone->dimensions.sidebar_gradient_height - ozone->dimensions.spacer_1px,
|
||||
(unsigned)ozone->animations.thumbnail_bar_position + ozone->dimensions.sidebar_entry_icon_padding,
|
||||
(unsigned)ozone->animations.thumbnail_bar_position,
|
||||
ozone->dimensions.sidebar_gradient_height + ozone->dimensions.spacer_1px,
|
||||
video_width,
|
||||
video_height,
|
||||
|
@ -9417,17 +9393,19 @@ static void ozone_set_layout(
|
|||
bool ozone_collapse_sidebar,
|
||||
bool is_threaded)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
char tmp_dir[DIR_MAX_LENGTH];
|
||||
char font_path[PATH_MAX_LENGTH];
|
||||
bool font_inited = false;
|
||||
float scale_factor = ozone->last_scale_factor;
|
||||
float padding_factor = settings->floats.ozone_padding_factor;
|
||||
|
||||
/* Calculate dimensions */
|
||||
ozone->dimensions.header_height = HEADER_HEIGHT * scale_factor;
|
||||
ozone->dimensions.footer_height = FOOTER_HEIGHT * scale_factor;
|
||||
|
||||
ozone->dimensions.entry_padding_horizontal_half = ENTRY_PADDING_HORIZONTAL_HALF * scale_factor;
|
||||
ozone->dimensions.entry_padding_horizontal_full = ENTRY_PADDING_HORIZONTAL_FULL * scale_factor;
|
||||
ozone->dimensions.entry_padding_horizontal_half = ENTRY_PADDING_HORIZONTAL_HALF * scale_factor * padding_factor;
|
||||
ozone->dimensions.entry_padding_horizontal_full = ENTRY_PADDING_HORIZONTAL_FULL * scale_factor * padding_factor;
|
||||
ozone->dimensions.entry_padding_vertical = ENTRY_PADDING_VERTICAL * scale_factor;
|
||||
ozone->dimensions.entry_height = ENTRY_HEIGHT * scale_factor;
|
||||
ozone->dimensions.entry_spacing = ENTRY_SPACING * scale_factor;
|
||||
|
@ -9435,7 +9413,7 @@ static void ozone_set_layout(
|
|||
ozone->dimensions.entry_icon_padding = ENTRY_ICON_PADDING * scale_factor;
|
||||
|
||||
ozone->dimensions.sidebar_entry_height = SIDEBAR_ENTRY_HEIGHT * scale_factor;
|
||||
ozone->dimensions.sidebar_padding_horizontal = SIDEBAR_X_PADDING * scale_factor;
|
||||
ozone->dimensions.sidebar_padding_horizontal = SIDEBAR_X_PADDING * scale_factor * padding_factor;
|
||||
ozone->dimensions.sidebar_padding_vertical = SIDEBAR_Y_PADDING * scale_factor;
|
||||
ozone->dimensions.sidebar_entry_padding_vertical = SIDEBAR_ENTRY_Y_PADDING * scale_factor;
|
||||
ozone->dimensions.sidebar_entry_icon_size = SIDEBAR_ENTRY_ICON_SIZE * scale_factor;
|
||||
|
@ -10113,6 +10091,7 @@ static void ozone_render(void *data,
|
|||
* (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=323#c87) */
|
||||
volatile float scale_factor;
|
||||
volatile float thumbnail_scale_factor;
|
||||
volatile float padding_factor;
|
||||
struct menu_state *menu_st = menu_state_get_ptr();
|
||||
menu_input_t *menu_input = &menu_st->input_state;
|
||||
menu_list_t *menu_list = menu_st->entries.list;
|
||||
|
@ -10133,14 +10112,17 @@ static void ozone_render(void *data,
|
|||
scale_factor = gfx_display_get_dpi_scale(p_disp, settings,
|
||||
width, height, false, false);
|
||||
thumbnail_scale_factor = settings->floats.ozone_thumbnail_scale_factor;
|
||||
padding_factor = settings->floats.ozone_padding_factor;
|
||||
|
||||
if ( (scale_factor != ozone->last_scale_factor)
|
||||
|| (thumbnail_scale_factor != ozone->last_thumbnail_scale_factor)
|
||||
|| (padding_factor != ozone->last_padding_factor)
|
||||
|| (width != ozone->last_width)
|
||||
|| (height != ozone->last_height))
|
||||
{
|
||||
ozone->last_scale_factor = scale_factor;
|
||||
ozone->last_thumbnail_scale_factor = thumbnail_scale_factor;
|
||||
ozone->last_padding_factor = padding_factor;
|
||||
ozone->last_width = width;
|
||||
ozone->last_height = height;
|
||||
|
||||
|
@ -10658,16 +10640,23 @@ static void ozone_draw_header(
|
|||
unsigned ticker_x_offset = 0;
|
||||
unsigned timedate_offset = 0;
|
||||
bool use_smooth_ticker = settings->bools.menu_ticker_smooth;
|
||||
float scale_factor = ozone->last_scale_factor;
|
||||
float *col = ozone->theme->entries_icon;
|
||||
float scale_factor = ozone->last_scale_factor;
|
||||
float header_margin = 40 * scale_factor;
|
||||
float header_margin_min = ozone->dimensions.sidebar_entry_icon_padding;
|
||||
unsigned logo_icon_size = 60 * scale_factor;
|
||||
unsigned status_icon_size = 92 * scale_factor;
|
||||
unsigned status_icon_size = 80 * scale_factor;
|
||||
unsigned status_row_size = 160 * scale_factor;
|
||||
unsigned separator_margin = 30 * scale_factor;
|
||||
unsigned separator = settings->uints.menu_ozone_header_separator;
|
||||
enum gfx_animation_ticker_type
|
||||
menu_ticker_type = (enum gfx_animation_ticker_type)settings->uints.menu_ticker_type;
|
||||
gfx_display_ctx_driver_t *dispctx = p_disp->dispctx;
|
||||
|
||||
header_margin *= ozone->last_padding_factor;
|
||||
if (header_margin < header_margin_min)
|
||||
header_margin = header_margin_min;
|
||||
|
||||
/* Initial ticker configuration */
|
||||
if (use_smooth_ticker)
|
||||
{
|
||||
|
@ -10686,19 +10675,20 @@ static void ozone_draw_header(
|
|||
}
|
||||
|
||||
/* Separator */
|
||||
gfx_display_draw_quad(
|
||||
p_disp,
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
separator_margin,
|
||||
ozone->dimensions.header_height,
|
||||
video_width - separator_margin * 2,
|
||||
ozone->dimensions.spacer_1px,
|
||||
video_width,
|
||||
video_height,
|
||||
ozone->theme->header_footer_separator,
|
||||
NULL);
|
||||
if (separator)
|
||||
gfx_display_draw_quad(
|
||||
p_disp,
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
((separator == OZONE_HEADER_SEPARATOR_NORMAL) ? separator_margin : 0),
|
||||
ozone->dimensions.header_height,
|
||||
video_width - ((separator == OZONE_HEADER_SEPARATOR_NORMAL) ? (separator_margin * 2) : 0),
|
||||
ozone->dimensions.spacer_1px,
|
||||
video_width,
|
||||
video_height,
|
||||
ozone->theme->header_footer_separator,
|
||||
NULL);
|
||||
|
||||
/* Icon */
|
||||
if (dispctx)
|
||||
|
@ -10715,7 +10705,7 @@ static void ozone_draw_header(
|
|||
logo_icon_size,
|
||||
logo_icon_size,
|
||||
ozone->textures[OZONE_TEXTURE_RETROARCH],
|
||||
47 * scale_factor,
|
||||
header_margin,
|
||||
(ozone->dimensions.header_height - logo_icon_size) / 2,
|
||||
video_width,
|
||||
video_height,
|
||||
|
@ -10739,13 +10729,15 @@ static void ozone_draw_header(
|
|||
|
||||
if (powerstate.battery_enabled)
|
||||
{
|
||||
timedate_offset = 90 * scale_factor;
|
||||
float icon_width = 35 * scale_factor;
|
||||
float text_offset = ozone->dimensions.entry_spacing * 2.5f;
|
||||
timedate_offset = header_margin + icon_width + text_offset + ozone->dimensions.entry_spacing * 3;
|
||||
status_row_size += timedate_offset;
|
||||
|
||||
gfx_display_draw_text(
|
||||
ozone->fonts.time.font,
|
||||
msg,
|
||||
video_width - 55 * scale_factor,
|
||||
video_width - (header_margin + icon_width - text_offset),
|
||||
ozone->dimensions.header_height / 2 + ozone->fonts.time.line_centre_offset,
|
||||
video_width,
|
||||
video_height,
|
||||
|
@ -10775,8 +10767,8 @@ static void ozone_draw_header(
|
|||
: (powerstate.percent > 40) ? OZONE_ENTRIES_ICONS_TEXTURE_BATTERY_60
|
||||
: (powerstate.percent > 20) ? OZONE_ENTRIES_ICONS_TEXTURE_BATTERY_40
|
||||
: OZONE_ENTRIES_ICONS_TEXTURE_BATTERY_20],
|
||||
video_width - (55 + 32) * scale_factor,
|
||||
0,
|
||||
video_width - (header_margin + status_icon_size - icon_width),
|
||||
(6 * scale_factor),
|
||||
video_width,
|
||||
video_height,
|
||||
0.0f,
|
||||
|
@ -10794,6 +10786,11 @@ static void ozone_draw_header(
|
|||
{
|
||||
gfx_display_ctx_datetime_t datetime;
|
||||
char timedate[256];
|
||||
float icon_width = 35 * scale_factor;
|
||||
float text_offset = ozone->dimensions.entry_spacing * 3.0f;
|
||||
|
||||
if (!timedate_offset)
|
||||
timedate_offset = header_margin;
|
||||
|
||||
datetime.time_mode = settings->uints.menu_timedate_style;
|
||||
datetime.date_separator = settings->uints.menu_timedate_date_separator;
|
||||
|
@ -10803,7 +10800,7 @@ static void ozone_draw_header(
|
|||
gfx_display_draw_text(
|
||||
ozone->fonts.time.font,
|
||||
timedate,
|
||||
video_width - (64 * scale_factor) - timedate_offset,
|
||||
video_width - (timedate_offset + status_icon_size - icon_width - text_offset),
|
||||
ozone->dimensions.header_height / 2 + ozone->fonts.time.line_centre_offset,
|
||||
video_width,
|
||||
video_height,
|
||||
|
@ -10827,8 +10824,8 @@ static void ozone_draw_header(
|
|||
status_icon_size,
|
||||
status_icon_size,
|
||||
ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_CLOCK],
|
||||
video_width - (64 + 28) * scale_factor - timedate_offset,
|
||||
0,
|
||||
video_width - (timedate_offset + status_icon_size - icon_width),
|
||||
(6 * scale_factor),
|
||||
video_width,
|
||||
video_height,
|
||||
0.0f,
|
||||
|
@ -10871,7 +10868,7 @@ static void ozone_draw_header(
|
|||
gfx_display_draw_text(
|
||||
ozone->fonts.title.font,
|
||||
title,
|
||||
ticker_x_offset + 128 * scale_factor,
|
||||
ticker_x_offset + header_margin + logo_icon_size + ozone->dimensions.entry_icon_padding,
|
||||
ozone->dimensions.header_height / 2 + ozone->fonts.title.line_centre_offset,
|
||||
video_width,
|
||||
video_height,
|
||||
|
@ -10900,18 +10897,24 @@ static void ozone_draw_footer(
|
|||
size_t selection = ozone->selection;
|
||||
float *col = ozone->theme_dynamic.entries_icon;
|
||||
float scale_factor = ozone->last_scale_factor;
|
||||
float footer_margin = 42 * scale_factor;
|
||||
float footer_margin = 40 * scale_factor;
|
||||
float footer_margin_min = ozone->dimensions.sidebar_entry_icon_padding;
|
||||
float footer_text_y = (float)video_height
|
||||
- (ozone->dimensions.footer_height / 2.0f)
|
||||
+ ozone->fonts.footer.line_centre_offset;
|
||||
float icon_size = 35 * scale_factor;
|
||||
float icon_padding = 10 * scale_factor;
|
||||
float icon_padding = 8 * scale_factor;
|
||||
float icon_padding_small = icon_padding / 5;
|
||||
float icon_spacer = icon_size + (2.0f * icon_padding);
|
||||
float icon_y = (float)video_height
|
||||
- (ozone->dimensions.footer_height / 2.0f)
|
||||
- (icon_size / 2.0f);
|
||||
unsigned separator_margin = 30 * scale_factor;
|
||||
unsigned separator = settings->uints.menu_ozone_header_separator;
|
||||
|
||||
footer_margin *= ozone->last_padding_factor;
|
||||
if (footer_margin < footer_margin_min)
|
||||
footer_margin = footer_margin_min;
|
||||
|
||||
/* Button enable states
|
||||
* > Note: Only show 'metadata_override' if
|
||||
|
@ -10988,7 +10991,7 @@ static void ozone_draw_footer(
|
|||
* - (Select) help (non-playlist only)*/
|
||||
|
||||
ozone->footer_labels.resume.x = (ozone->footer_labels.resume.show)
|
||||
? (float)video_width - footer_margin - ozone->footer_labels.resume.width - icon_size - icon_padding
|
||||
? (float)video_width - footer_margin - ozone->footer_labels.resume.width - icon_size
|
||||
: (float)video_width - footer_margin;
|
||||
|
||||
if (input_menu_swap_ok_cancel_buttons)
|
||||
|
@ -11054,19 +11057,20 @@ static void ozone_draw_footer(
|
|||
- ozone->footer_labels.metadata_override.width - icon_spacer;
|
||||
|
||||
/* Separator */
|
||||
gfx_display_draw_quad(
|
||||
p_disp,
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
separator_margin,
|
||||
video_height - ozone->dimensions.footer_height,
|
||||
video_width - separator_margin * 2,
|
||||
ozone->dimensions.spacer_1px,
|
||||
video_width,
|
||||
video_height,
|
||||
ozone->theme->header_footer_separator,
|
||||
NULL);
|
||||
if (separator)
|
||||
gfx_display_draw_quad(
|
||||
p_disp,
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
((separator == OZONE_HEADER_SEPARATOR_NORMAL) ? separator_margin : 0),
|
||||
video_height - ozone->dimensions.footer_height,
|
||||
video_width - ((separator == OZONE_HEADER_SEPARATOR_NORMAL) ? (separator_margin * 2) : 0),
|
||||
ozone->dimensions.spacer_1px,
|
||||
video_width,
|
||||
video_height,
|
||||
ozone->theme->header_footer_separator,
|
||||
NULL);
|
||||
|
||||
/* Buttons */
|
||||
|
||||
|
|
|
@ -439,6 +439,14 @@ enum ozone_color_theme
|
|||
OZONE_COLOR_THEME_LAST
|
||||
};
|
||||
|
||||
enum ozone_header_separator
|
||||
{
|
||||
OZONE_HEADER_SEPARATOR_NONE = 0,
|
||||
OZONE_HEADER_SEPARATOR_NORMAL,
|
||||
OZONE_HEADER_SEPARATOR_MAXIMUM,
|
||||
OZONE_HEADER_SEPARATOR_LAST
|
||||
};
|
||||
|
||||
enum menu_action
|
||||
{
|
||||
MENU_ACTION_NOOP = 0,
|
||||
|
|
|
@ -11735,6 +11735,7 @@ unsigned menu_displaylist_build_list(
|
|||
|
||||
menu_displaylist_build_info_selective_t build_list[] = {
|
||||
{MENU_ENUM_LABEL_MENU_SCALE_FACTOR, PARSE_ONLY_FLOAT, true},
|
||||
{MENU_ENUM_LABEL_OZONE_PADDING_FACTOR, PARSE_ONLY_FLOAT, true},
|
||||
{MENU_ENUM_LABEL_MENU_FRAMEBUFFER_OPACITY, PARSE_ONLY_FLOAT, true},
|
||||
{MENU_ENUM_LABEL_XMB_RIBBON_ENABLE, PARSE_ONLY_UINT, true},
|
||||
{MENU_ENUM_LABEL_XMB_THEME, PARSE_ONLY_UINT, true},
|
||||
|
@ -11769,6 +11770,7 @@ unsigned menu_displaylist_build_list(
|
|||
{MENU_ENUM_LABEL_XMB_SWITCH_ICONS, PARSE_ONLY_BOOL, true},
|
||||
{MENU_ENUM_LABEL_MENU_RGUI_SWITCH_ICONS, PARSE_ONLY_BOOL, true},
|
||||
{MENU_ENUM_LABEL_MATERIALUI_SWITCH_ICONS, PARSE_ONLY_BOOL, true},
|
||||
{MENU_ENUM_LABEL_OZONE_HEADER_SEPARATOR, PARSE_ONLY_UINT, true},
|
||||
{MENU_ENUM_LABEL_OZONE_COLLAPSE_SIDEBAR, PARSE_ONLY_BOOL, true},
|
||||
{MENU_ENUM_LABEL_MATERIALUI_LANDSCAPE_LAYOUT_OPTIMIZATION, PARSE_ONLY_UINT, true},
|
||||
{MENU_ENUM_LABEL_MATERIALUI_SHOW_NAV_BAR, PARSE_ONLY_BOOL, true},
|
||||
|
|
|
@ -4689,6 +4689,30 @@ static size_t setting_get_string_representation_uint_ozone_menu_color_theme(
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
static size_t setting_get_string_representation_uint_ozone_header_separator(
|
||||
rarch_setting_t *setting, char *s, size_t len)
|
||||
{
|
||||
if (setting)
|
||||
{
|
||||
switch (*setting->value.target.unsigned_integer)
|
||||
{
|
||||
case 0:
|
||||
return strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_OZONE_HEADER_SEPARATOR_NONE), len);
|
||||
case 2:
|
||||
return strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_OZONE_HEADER_SEPARATOR_MAXIMUM), len);
|
||||
case 1:
|
||||
default:
|
||||
return strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_OZONE_HEADER_SEPARATOR_NORMAL), len);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
|
@ -19723,6 +19747,37 @@ static bool setting_append_list(
|
|||
general_read_handler);
|
||||
(*list)[list_info->index - 1].action_ok = &setting_action_ok_uint;
|
||||
menu_settings_list_current_add_range(list, list_info, 1.0, 2.0, 0.05, true, true);
|
||||
|
||||
CONFIG_FLOAT(
|
||||
list, list_info,
|
||||
&settings->floats.ozone_padding_factor,
|
||||
MENU_ENUM_LABEL_OZONE_PADDING_FACTOR,
|
||||
MENU_ENUM_LABEL_VALUE_OZONE_PADDING_FACTOR,
|
||||
DEFAULT_OZONE_PADDING_FACTOR,
|
||||
"%.2fx",
|
||||
&group_info,
|
||||
&subgroup_info,
|
||||
parent_group,
|
||||
general_write_handler,
|
||||
general_read_handler);
|
||||
(*list)[list_info->index - 1].action_ok = &setting_action_ok_uint;
|
||||
menu_settings_list_current_add_range(list, list_info, 0.0, 2.0, 0.01, true, true);
|
||||
|
||||
CONFIG_UINT(
|
||||
list, list_info,
|
||||
&settings->uints.menu_ozone_header_separator,
|
||||
MENU_ENUM_LABEL_OZONE_HEADER_SEPARATOR,
|
||||
MENU_ENUM_LABEL_VALUE_OZONE_HEADER_SEPARATOR,
|
||||
DEFAULT_OZONE_HEADER_SEPARATOR,
|
||||
&group_info,
|
||||
&subgroup_info,
|
||||
parent_group,
|
||||
general_write_handler,
|
||||
general_read_handler);
|
||||
(*list)[list_info->index - 1].action_ok = &setting_action_ok_uint;
|
||||
(*list)[list_info->index - 1].get_string_representation =
|
||||
&setting_get_string_representation_uint_ozone_header_separator;
|
||||
menu_settings_list_current_add_range(list, list_info, 0, 2, 1, true, true);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -737,6 +737,10 @@ enum msg_hash_enums
|
|||
MENU_ENUM_LABEL_VALUE_OZONE_COLOR_THEME_PURPLE_RAIN,
|
||||
MENU_ENUM_LABEL_VALUE_OZONE_COLOR_THEME_SELENIUM,
|
||||
|
||||
MENU_ENUM_LABEL_VALUE_OZONE_HEADER_SEPARATOR_NONE,
|
||||
MENU_ENUM_LABEL_VALUE_OZONE_HEADER_SEPARATOR_NORMAL,
|
||||
MENU_ENUM_LABEL_VALUE_OZONE_HEADER_SEPARATOR_MAXIMUM,
|
||||
|
||||
MENU_ENUM_LABEL_VALUE_XMB_ICON_THEME_MONOCHROME,
|
||||
MENU_ENUM_LABEL_VALUE_XMB_ICON_THEME_MONOCHROME_INVERTED,
|
||||
MENU_ENUM_LABEL_VALUE_XMB_ICON_THEME_FLATUI,
|
||||
|
@ -1635,6 +1639,8 @@ enum msg_hash_enums
|
|||
MENU_LABEL(RGUI_MENU_THEME_PRESET),
|
||||
MENU_LABEL(XMB_MENU_COLOR_THEME),
|
||||
MENU_LABEL(OZONE_MENU_COLOR_THEME),
|
||||
MENU_LABEL(OZONE_PADDING_FACTOR),
|
||||
MENU_LABEL(OZONE_HEADER_SEPARATOR),
|
||||
MENU_LABEL(OZONE_COLLAPSE_SIDEBAR),
|
||||
MENU_LABEL(OZONE_TRUNCATE_PLAYLIST_NAME),
|
||||
MENU_LABEL(OZONE_SORT_AFTER_TRUNCATE_PLAYLIST_NAME),
|
||||
|
|
Loading…
Reference in New Issue