From d42e3823dc3a114a66c291bd95617edf0df34599 Mon Sep 17 00:00:00 2001 From: YuSanka Date: Thu, 21 Sep 2023 14:51:35 +0200 Subject: [PATCH] Preferences: Linux specific: Fixed layouts. (CallAfter() is used to correct set of controlls sizes) --- src/slic3r/GUI/Preferences.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/slic3r/GUI/Preferences.cpp b/src/slic3r/GUI/Preferences.cpp index a41f67c21b..2c566a62af 100644 --- a/src/slic3r/GUI/Preferences.cpp +++ b/src/slic3r/GUI/Preferences.cpp @@ -227,7 +227,12 @@ void PreferencesDialog::build() tabs = new Notebook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxNB_TOP | wxTAB_TRAVERSAL | wxNB_NOPAGETHEME | wxNB_DEFAULT); #else tabs = new wxNotebook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxNB_TOP | wxTAB_TRAVERSAL |wxNB_NOPAGETHEME | wxNB_DEFAULT ); -// tabs->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW)); +#ifdef __linux__ + tabs->Bind(wxEVT_NOTEBOOK_PAGE_CHANGED, [this](wxBookCtrlEvent& e) { + e.Skip(); + CallAfter([this]() { tabs->GetCurrentPage()->Layout(); }); + }); +#endif #endif // Add "General" tab @@ -1094,7 +1099,11 @@ void PreferencesDialog::create_settings_font_widget() font_example->SetFont(font); m_values[opt_key] = format("%1%", val); stb_sizer->Layout(); +#ifdef __linux__ + CallAfter([this]() { refresh_og(m_optgroup_other); }); +#else refresh_og(m_optgroup_other); +#endif }; auto change_value = [size_sc, apply_font](wxCommandEvent& evt) {