diff --git a/src/util/imgui_fullscreen.cpp b/src/util/imgui_fullscreen.cpp index 35fdf9715..beb29c704 100644 --- a/src/util/imgui_fullscreen.cpp +++ b/src/util/imgui_fullscreen.cpp @@ -863,8 +863,8 @@ void ImGuiFullscreen::BeginMenuButtons(u32 num_items, float y_align, float x_pad if (y_align != 0.0f) { - const float total_size = - static_cast(num_items) * LayoutScale(item_height + (y_padding * 2.0f)) + LayoutScale(y_padding * 2.0f); + const float real_item_height = LayoutScale(item_height) + (LayoutScale(y_padding) * 2.0f); + const float total_size = (static_cast(num_items) * real_item_height) + (LayoutScale(y_padding) * 2.0f); const float window_height = ImGui::GetWindowHeight(); if (window_height > total_size) ImGui::SetCursorPosY((window_height - total_size) * y_align);