From 844287b722d9696453c56c447fbfc57d5608e670 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Sat, 11 Jan 2025 20:24:53 +1000 Subject: [PATCH] FullscreenUI: Fix scrollbar on choice dialog at some screen sizes e.g. game list right click --- src/util/imgui_fullscreen.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/util/imgui_fullscreen.cpp b/src/util/imgui_fullscreen.cpp index 6d48e4ffd..3dd133d8e 100644 --- a/src/util/imgui_fullscreen.cpp +++ b/src/util/imgui_fullscreen.cpp @@ -2412,10 +2412,10 @@ void ImGuiFullscreen::DrawChoiceDialog() const float width = LayoutScale(600.0f); const float title_height = UIStyle.LargeFont->FontSize + ImGui::GetStyle().FramePadding.y * 2.0f + ImGui::GetStyle().WindowPadding.y * 2.0f; + const float item_height = + (LayoutScale(LAYOUT_MENU_BUTTON_HEIGHT_NO_SUMMARY) + LayoutScale(LAYOUT_MENU_BUTTON_Y_PADDING) * 2.0f); const float height = - std::min(LayoutScale(480.0f), title_height + (LayoutScale(LAYOUT_MENU_BUTTON_HEIGHT_NO_SUMMARY) + - LayoutScale(LAYOUT_MENU_BUTTON_Y_PADDING) * 2.0f) * - static_cast(s_state.choice_dialog_options.size())); + title_height + (item_height * static_cast(std::min(9, s_state.choice_dialog_options.size()))); ImGui::SetNextWindowSize(ImVec2(width, height)); ImGui::SetNextWindowPos((ImGui::GetIO().DisplaySize - LayoutScale(0.0f, LAYOUT_FOOTER_HEIGHT)) * 0.5f, ImGuiCond_Always, ImVec2(0.5f, 0.5f));