Ozone+XMB: Fix content icons when playlist tabs hidden (#17888)
This commit is contained in:
parent
874cc00c2e
commit
5e03ef57ec
|
@ -640,6 +640,7 @@ struct ozone_handle
|
|||
char thumbnails_right_status_prev;
|
||||
|
||||
bool show_thumbnail_bar;
|
||||
bool show_playlist_tabs;
|
||||
bool sidebar_collapsed;
|
||||
|
||||
struct
|
||||
|
@ -2906,11 +2907,14 @@ static void ozone_sidebar_collapse_end(void *userdata)
|
|||
|
||||
static unsigned ozone_get_sidebar_height(ozone_handle_t *ozone)
|
||||
{
|
||||
int entries = (int)(ozone->system_tab_end + 1 + (ozone->horizontal_list.size));
|
||||
unsigned horizontal_list_size = (ozone->show_playlist_tabs)
|
||||
? (unsigned)ozone->horizontal_list.size
|
||||
: 0;
|
||||
int entries = (int)(ozone->system_tab_end + 1 + horizontal_list_size);
|
||||
return entries * ozone->dimensions.sidebar_entry_height
|
||||
+ (entries - 1) * ozone->dimensions.sidebar_entry_padding_vertical
|
||||
+ ozone->dimensions.sidebar_padding_vertical
|
||||
+ (ozone->horizontal_list.size > 0
|
||||
+ (horizontal_list_size > 0
|
||||
? ozone->dimensions.sidebar_entry_padding_vertical + ozone->dimensions.spacer_1px
|
||||
: 0);
|
||||
}
|
||||
|
@ -3358,7 +3362,9 @@ static void ozone_draw_sidebar(
|
|||
ticker.spacer = ticker_spacer;
|
||||
}
|
||||
|
||||
horizontal_list_size = (unsigned)ozone->horizontal_list.size;
|
||||
horizontal_list_size = (ozone->show_playlist_tabs)
|
||||
? (unsigned)ozone->horizontal_list.size
|
||||
: 0;
|
||||
|
||||
if (p_disp->dispctx && p_disp->dispctx->scissor_begin)
|
||||
gfx_display_scissor_begin(
|
||||
|
@ -4844,7 +4850,6 @@ static void ozone_init_horizontal_list(ozone_handle_t *ozone, settings_t *settin
|
|||
size_t i, list_size;
|
||||
menu_displaylist_info_t info;
|
||||
const char *dir_playlist = settings->paths.directory_playlist;
|
||||
bool menu_content_show_playlists = settings->bools.menu_content_show_playlist_tabs;
|
||||
bool ozone_truncate_playlist_name = settings->bools.ozone_truncate_playlist_name;
|
||||
bool ozone_sort_after_truncate = settings->bools.ozone_sort_after_truncate_playlist_name;
|
||||
|
||||
|
@ -4857,7 +4862,7 @@ static void ozone_init_horizontal_list(ozone_handle_t *ozone, settings_t *settin
|
|||
info.type_default = FILE_TYPE_PLAIN;
|
||||
info.enum_idx = MENU_ENUM_LABEL_PLAYLISTS_TAB;
|
||||
|
||||
if (menu_content_show_playlists && !string_is_empty(info.path))
|
||||
if (!string_is_empty(info.path))
|
||||
{
|
||||
if (menu_displaylist_ctl(DISPLAYLIST_DATABASE_PLAYLISTS_HORIZONTAL, &info, settings))
|
||||
menu_displaylist_process(&info);
|
||||
|
@ -8086,7 +8091,9 @@ static enum menu_action ozone_parse_menu_entry_action(
|
|||
gfx_thumbnail_set_stream_delay(ozone->thumbnails.stream_delay);
|
||||
}
|
||||
|
||||
horizontal_list_size = (unsigned)ozone->horizontal_list.size;
|
||||
horizontal_list_size = (ozone->show_playlist_tabs)
|
||||
? (unsigned)ozone->horizontal_list.size
|
||||
: 0;
|
||||
|
||||
if (menu_input_dialog_get_display_kb())
|
||||
ozone->flags |= OZONE_FLAG_MSGBOX_STATE;
|
||||
|
@ -10141,7 +10148,9 @@ static void ozone_render(void *data,
|
|||
bool first_entry_found = false;
|
||||
bool last_entry_found = false;
|
||||
|
||||
unsigned horizontal_list_size = (unsigned)ozone->horizontal_list.size;
|
||||
unsigned horizontal_list_size = (ozone->show_playlist_tabs)
|
||||
? (unsigned)ozone->horizontal_list.size
|
||||
: 0;
|
||||
float category_height = ozone->dimensions.sidebar_entry_height
|
||||
+ ozone->dimensions.sidebar_entry_padding_vertical;
|
||||
bool first_category_found = false;
|
||||
|
@ -12175,6 +12184,7 @@ static void ozone_populate_entries(
|
|||
const char *label,
|
||||
unsigned k)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
int new_depth = 0;
|
||||
bool was_db_manager_list = false;
|
||||
bool want_thumbnail_bar = false;
|
||||
|
@ -12182,12 +12192,14 @@ static void ozone_populate_entries(
|
|||
bool animate = false;
|
||||
struct menu_state *menu_st = menu_state_get_ptr();
|
||||
menu_list_t *menu_list = menu_st->entries.list;
|
||||
bool ozone_collapse_sidebar = config_get_ptr()->bools.ozone_collapse_sidebar;
|
||||
bool ozone_collapse_sidebar = settings->bools.ozone_collapse_sidebar;
|
||||
ozone_handle_t *ozone = (ozone_handle_t*) data;
|
||||
|
||||
if (!ozone)
|
||||
return;
|
||||
|
||||
ozone->show_playlist_tabs = settings->bools.menu_content_show_playlist_tabs;
|
||||
|
||||
if ((menu_st->flags & MENU_ST_FLAG_PREVENT_POPULATE) > 0)
|
||||
{
|
||||
menu_st->flags &= ~MENU_ST_FLAG_PREVENT_POPULATE;
|
||||
|
|
|
@ -451,6 +451,7 @@ typedef struct xmb_handle
|
|||
bool show_thumbnails;
|
||||
bool show_mouse;
|
||||
bool show_screensaver;
|
||||
bool show_playlist_tabs;
|
||||
bool use_ps3_layout;
|
||||
bool last_use_ps3_layout;
|
||||
bool assets_missing;
|
||||
|
@ -2634,7 +2635,6 @@ static void xmb_init_horizontal_list(xmb_handle_t *xmb)
|
|||
menu_displaylist_info_t info;
|
||||
settings_t *settings = config_get_ptr();
|
||||
const char *dir_playlist = settings->paths.directory_playlist;
|
||||
bool menu_content_show_playlists = settings->bools.menu_content_show_playlist_tabs;
|
||||
bool truncate_playlist_name = settings->bools.ozone_truncate_playlist_name;
|
||||
bool sort_after_truncate = settings->bools.ozone_sort_after_truncate_playlist_name;
|
||||
|
||||
|
@ -2647,7 +2647,7 @@ static void xmb_init_horizontal_list(xmb_handle_t *xmb)
|
|||
info.type_default = FILE_TYPE_PLAIN;
|
||||
info.enum_idx = MENU_ENUM_LABEL_PLAYLISTS_TAB;
|
||||
|
||||
if (menu_content_show_playlists && !string_is_empty(info.path))
|
||||
if (!string_is_empty(info.path))
|
||||
{
|
||||
size_t i;
|
||||
|
||||
|
@ -3008,6 +3008,8 @@ static void xmb_populate_entries(void *data,
|
|||
if (!xmb)
|
||||
return;
|
||||
|
||||
xmb->show_playlist_tabs = settings->bools.menu_content_show_playlist_tabs;
|
||||
|
||||
xmb->skip_thumbnail_reset = false;
|
||||
if (xmb->is_quick_menu && depth < xmb->old_depth)
|
||||
xmb->skip_thumbnail_reset = true;
|
||||
|
@ -7779,7 +7781,11 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
|
|||
/* Horizontal tab icons */
|
||||
if (!xmb->assets_missing)
|
||||
{
|
||||
for (i = 0; i <= xmb_list_get_size(xmb, MENU_LIST_HORIZONTAL) + xmb->system_tab_end; i++)
|
||||
unsigned horizontal_list_size = (xmb->show_playlist_tabs)
|
||||
? (unsigned)xmb_list_get_size(xmb, MENU_LIST_HORIZONTAL)
|
||||
: 0;
|
||||
|
||||
for (i = 0; i <= xmb->system_tab_end + horizontal_list_size; i++)
|
||||
{
|
||||
xmb_node_t *node = xmb_get_node(xmb, i);
|
||||
|
||||
|
@ -8965,6 +8971,9 @@ static void xmb_list_cache(void *data, enum menu_list_type type,
|
|||
file_list_t *menu_stack = MENU_LIST_GET(menu_list, 0);
|
||||
file_list_t *selection_buf = MENU_LIST_GET_SELECTION(menu_list, 0);
|
||||
size_t selection = menu_st->selection_ptr;
|
||||
unsigned horizontal_list_size = (xmb->show_playlist_tabs)
|
||||
? (unsigned)xmb_list_get_size(xmb, MENU_LIST_HORIZONTAL)
|
||||
: 0;
|
||||
|
||||
if (!xmb)
|
||||
return;
|
||||
|
@ -8996,7 +9005,7 @@ static void xmb_list_cache(void *data, enum menu_list_type type,
|
|||
else
|
||||
xmb->selection_ptr_old = selection;
|
||||
|
||||
list_size = xmb_list_get_size(xmb, MENU_LIST_HORIZONTAL) + xmb->system_tab_end;
|
||||
list_size = xmb->system_tab_end + horizontal_list_size;
|
||||
|
||||
switch (type)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue