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.
This commit is contained in:
noisyfox
2026-07-25 23:30:49 +08:00
parent d6cb667b89
commit 8a7662083e
2 changed files with 2 additions and 1 deletions

View File

@@ -47,6 +47,7 @@ NetworkPluginDownloadDialog::NetworkPluginDownloadDialog(wxWindow* parent, Mode
} else {
create_missing_plugin_ui();
}
main_sizer->SetSizeHints(this);
Layout();
Fit();
CentreOnParent();

View File

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