From 6632902d5c7354ab5d84620e4291fb02c90df907 Mon Sep 17 00:00:00 2001 From: Brucio Date: Sat, 4 Apr 2026 04:00:14 -0400 Subject: [PATCH 1/2] fix: prevent overflow for home page quick links --- src/Menu/HomePageRenderer.cpp | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/Menu/HomePageRenderer.cpp b/src/Menu/HomePageRenderer.cpp index 156de58c25..65160deb7d 100644 --- a/src/Menu/HomePageRenderer.cpp +++ b/src/Menu/HomePageRenderer.cpp @@ -155,30 +155,29 @@ void HomePageRenderer::RenderQuickLinksSection() ImGui::SetCursorPosX((windowSize.x - titleSize.x) * 0.5f); ImGui::Text("Quick Links"); - // Center the button layout - float buttonWidth = QUICK_LINKS_BUTTON_WIDTH * Util::GetUIScale(); - float totalWidth = buttonWidth * 3 + ImGui::GetStyle().ItemSpacing.x * 2; // 3 buttons with spacing - ImGui::SetCursorPosX((windowSize.x - totalWidth) * 0.5f); + ImGui::Columns(4, nullptr, false); // External links in a row - if (ImGui::Button("Nexus Mods", ImVec2(buttonWidth, 0))) { + if (ImGui::Button("Nexus Mods", ImVec2(-1, 0))) { ShellExecuteA(NULL, "open", "https://www.nexusmods.com/skyrimspecialedition/mods/86492", NULL, NULL, SW_SHOWNORMAL); } - ImGui::SameLine(); - if (ImGui::Button("GitHub", ImVec2(buttonWidth, 0))) { + ImGui::NextColumn(); + if (ImGui::Button("GitHub", ImVec2(-1, 0))) { ShellExecuteA(NULL, "open", "https://github.com/doodlum/skyrim-community-shaders", NULL, NULL, SW_SHOWNORMAL); } - ImGui::SameLine(); - if (ImGui::Button("Wiki", ImVec2(buttonWidth, 0))) { + ImGui::NextColumn(); + if (ImGui::Button("Wiki", ImVec2(-1, 0))) { ShellExecuteA(NULL, "open", "https://modding.wiki/en/skyrim/developers/community-shaders", NULL, NULL, SW_SHOWNORMAL); } - ImGui::SameLine(); - if (ImGui::Button("Developer Wiki", ImVec2(buttonWidth, 0))) { + ImGui::NextColumn(); + if (ImGui::Button("Developer Wiki", ImVec2(-1, 0))) { ShellExecuteA(NULL, "open", "https://github.com/doodlum/skyrim-community-shaders/wiki", NULL, NULL, SW_SHOWNORMAL); } + + ImGui::Columns(1); } void HomePageRenderer::RenderFAQSection() From 862ab49f76dd4456c56746383a7c9e993a8f68e6 Mon Sep 17 00:00:00 2001 From: Brucio Date: Sat, 4 Apr 2026 04:14:06 -0400 Subject: [PATCH 2/2] refactor: remove quick link width const --- src/Menu/HomePageRenderer.cpp | 2 +- src/Menu/HomePageRenderer.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Menu/HomePageRenderer.cpp b/src/Menu/HomePageRenderer.cpp index 65160deb7d..ea8ecfdd9f 100644 --- a/src/Menu/HomePageRenderer.cpp +++ b/src/Menu/HomePageRenderer.cpp @@ -134,7 +134,7 @@ void HomePageRenderer::RenderWelcomeSection() } } else { // Fallback button when Discord icon is not available - float buttonWidth = QUICK_LINKS_BUTTON_WIDTH * scale; + float buttonWidth = DISCORD_BANNER_MIN_WIDTH * scale; ImGui::SetCursorPosX((windowSize.x - buttonWidth) * 0.5f); if (ImGui::Button("Join Discord Server", ImVec2(buttonWidth, 0))) { ShellExecuteA(NULL, "open", DISCORD_URL, NULL, NULL, SW_SHOWNORMAL); diff --git a/src/Menu/HomePageRenderer.h b/src/Menu/HomePageRenderer.h index 7f06b46baa..cc36dd1fd7 100644 --- a/src/Menu/HomePageRenderer.h +++ b/src/Menu/HomePageRenderer.h @@ -13,7 +13,6 @@ class HomePageRenderer static constexpr float HOTKEY_TEXT_SCALE_CAPTURING = 2.0f; static constexpr float HOTKEY_HOVER_DIM_FACTOR = 0.7f; static constexpr float HELP_TEXT_SCALE = 1.35f; - static constexpr float QUICK_LINKS_BUTTON_WIDTH = 180.0f; static constexpr float LOGO_WATERMARK_HEIGHT = 156.0f; static constexpr uint8_t MODAL_OVERLAY_ALPHA = 160;