From 2ee4e70b9a414ded4b9d4609e6b3cd16462f6939 Mon Sep 17 00:00:00 2001 From: Malkierian Date: Mon, 24 Nov 2025 07:00:37 -0700 Subject: [PATCH] Fix menu header width and scrollbar calculations. (#5975) --- soh/soh/SohGui/Menu.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/soh/soh/SohGui/Menu.cpp b/soh/soh/SohGui/Menu.cpp index 592c0c5e6..e3db0ae01 100644 --- a/soh/soh/SohGui/Menu.cpp +++ b/soh/soh/SohGui/Menu.cpp @@ -650,18 +650,15 @@ void Menu::DrawElement() { ImVec2 pos = window->DC.CursorPos; float centerX = pos.x + windowWidth / 2 - (style.ItemSpacing.x * (menuEntries.size() + 1)); std::vector headerSizes; - float headerWidth = style.ItemSpacing.x + 20; + float headerWidth = 0.0f; bool headerSearch = !CVarGetInteger(CVAR_SETTING("Menu.SidebarSearch"), 0); if (headerSearch) { - headerWidth += 200.0f + style.ItemSpacing.x + style.FramePadding.x; + headerWidth += 200.0f; } for (auto& label : menuOrder) { ImVec2 size = ImGui::CalcTextSize(label.c_str()); headerSizes.push_back(size); - headerWidth += size.x + style.FramePadding.x * 2; - if (label == headerIndex) { - headerWidth += style.ItemSpacing.x; - } + headerWidth += size.x + style.FramePadding.x * 2 + style.ItemSpacing.x; } // Full screen menu with widths below 1280, heights below 800.