1
0
mirror of synced 2024-11-25 00:00:27 +01:00

fix: Properly align welcome screen again

This commit is contained in:
WerWolv 2023-11-05 21:17:37 +01:00
parent 988a674617
commit 7efdcfd888

View File

@ -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();
}