From 8a7662083e0a29bff76b0d71a19d619fc2153a67 Mon Sep 17 00:00:00 2001 From: noisyfox Date: Sat, 25 Jul 2026 23:30:49 +0800 Subject: [PATCH] For dialog without explicitly `SetMinSize`, we should use `SetSizerAndFit` instead, otherwise the dialog will not show correctly on GTK3. (OrcaSlicer/OrcaSlicer#14561) - and if `SetSizer` is called before the full layout has been built, then an extra `SetSizeHints` should be called before layout/fit so the min size can be properly set automatically based on children's min sizes accordingly. --- src/slic3r/GUI/NetworkPluginDialog.cpp | 1 + src/slic3r/GUI/Plater.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/slic3r/GUI/NetworkPluginDialog.cpp b/src/slic3r/GUI/NetworkPluginDialog.cpp index d018af47ba..bc898d0d24 100644 --- a/src/slic3r/GUI/NetworkPluginDialog.cpp +++ b/src/slic3r/GUI/NetworkPluginDialog.cpp @@ -47,6 +47,7 @@ NetworkPluginDownloadDialog::NetworkPluginDownloadDialog(wxWindow* parent, Mode } else { create_missing_plugin_ui(); } + main_sizer->SetSizeHints(this); Layout(); Fit(); CentreOnParent(); diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index feecdfa163..c9812bad05 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -15094,7 +15094,7 @@ ProjectDropDialog::ProjectDropDialog(const std::string &filename) m_sizer_main->Add(dlg_btns, 0, wxEXPAND); - SetSizer(m_sizer_main); + SetSizerAndFit(m_sizer_main); Layout(); Fit(); Centre(wxBOTH);