From 7efdcfd888327286803a2157c1b9c95363125b47 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Sun, 5 Nov 2023 21:17:37 +0100 Subject: [PATCH] fix: Properly align welcome screen again --- plugins/builtin/source/content/welcome_screen.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/builtin/source/content/welcome_screen.cpp b/plugins/builtin/source/content/welcome_screen.cpp index 403103ddd..9e5ab8358 100644 --- a/plugins/builtin/source/content/welcome_screen.cpp +++ b/plugins/builtin/source/content/welcome_screen.cpp @@ -321,11 +321,11 @@ namespace hex::plugin::builtin { ImFormatString(title.data(), title.size(), "%s/DockSpace_%08X", ImGui::GetCurrentWindow()->Name, ImGui::GetID("ImHexMainDock")); if (ImGui::Begin(title.data(), nullptr, ImGuiWindowFlags_NoNav | ImGuiWindowFlags_NoBringToFrontOnFocus)) { ImGui::Dummy({}); - ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(10_scaled, 10_scaled)); + ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, scaled({ 10, 10 })); - ImGui::SetNextWindowScroll(ImVec2(0.0F, -1.0F)); + ImGui::SetNextWindowScroll({ 0.0F, -1.0F }); ImGui::SetNextWindowSize(ImGui::GetContentRegionAvail() + scaled({ 0, 10 })); - ImGui::SetNextWindowPos(ImGui::GetCursorScreenPos() - scaled({ 0, ImGui::GetStyle().FramePadding.y })); + ImGui::SetNextWindowPos(ImGui::GetCursorScreenPos() - ImVec2(0, ImGui::GetStyle().FramePadding.y + 2_scaled)); if (ImGui::Begin("Welcome Screen", nullptr, ImGuiWindowFlags_AlwaysUseWindowPadding | ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoDocking | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove)) { drawWelcomeScreenContent(); }