1
0
mirror of synced 2025-01-31 12:03:46 +01:00

fix: Prevent horizontal scroll on welcome screen

This commit is contained in:
WerWolv 2023-05-22 10:37:30 +02:00
parent 2191eb14ae
commit 6b28828174

View File

@ -384,10 +384,12 @@ namespace hex::plugin::builtin {
static void drawWelcomeScreen() {
if (ImGui::Begin("ImHexDockSpace")) {
if (!ImHexApi::Provider::isValid()) {
static char title[256];
ImFormatString(title, IM_ARRAYSIZE(title), "%s/DockSpace_%08X", ImGui::GetCurrentWindow()->Name, ImGui::GetID("ImHexMainDock"));
if (ImGui::Begin(title)) {
static std::array<char, 256> title;
ImFormatString(title.data(), title.size(), "%s/DockSpace_%08X", ImGui::GetCurrentWindow()->Name, ImGui::GetID("ImHexMainDock"));
if (ImGui::Begin(title.data())) {
ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(10_scaled, 10_scaled));
ImGui::SetNextWindowScroll(ImVec2(0.0F, -1.0F));
if (ImGui::BeginChild("Welcome Screen", ImVec2(0, 0), false, ImGuiWindowFlags_AlwaysUseWindowPadding)) {
drawWelcomeScreenContent();
}