Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuSanka <yusanka@gmail.com>2021-09-01 17:08:03 +0300
committerYuSanka <yusanka@gmail.com>2021-09-01 17:08:18 +0300
commite6eae6258487ad15d05b621557968d8c49239f86 (patch)
tree8cacbab180d92416183e175b1821d7de69462b58
parentc25ca3015ab3701574c39ddb94e82fa6eaba64d6 (diff)
MSW specific: Fixed a typo caused extension of PresetComboBox's height on SettingsTabs,version_2.4.0-alpha1
added comment for workaround
-rw-r--r--src/slic3r/GUI/Tab.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp
index 86089f729..5effa3599 100644
--- a/src/slic3r/GUI/Tab.cpp
+++ b/src/slic3r/GUI/Tab.cpp
@@ -492,17 +492,15 @@ void Tab::OnActivate()
activate_selected_page([](){});
m_hsizer->Layout();
- // Workaroud for Menu instead of NoteBook
#ifdef _MSW_DARK_MODE
-// if (wxGetApp().tabs_as_menu())
- {
- wxSize sz = m_presets_choice->GetSize();
- wxSize ok_sz = wxSize(35 * m_em_unit, m_presets_choice->GetBestSize().y+1);
- if (sz != ok_sz) {
- m_presets_choice->SetMinSize(ok_sz);
- m_presets_choice->SetSize(ok_sz);
- GetSizer()->GetItem(size_t(0))->GetSizer()->Layout();
- }
+ // Because of DarkMode we use our own Notebook (inherited from wxSiplebook) instead of wxNotebook
+ // And it looks like first Layout of the page doesn't update a size of the m_presets_choice
+ // So we have to set correct size explicitely
+ if (wxSize ok_sz = wxSize(35 * m_em_unit, m_presets_choice->GetBestSize().y);
+ ok_sz != m_presets_choice->GetSize()) {
+ m_presets_choice->SetMinSize(ok_sz);
+ m_presets_choice->SetSize(ok_sz);
+ GetSizer()->GetItem(size_t(0))->GetSizer()->Layout();
}
#endif // _MSW_DARK_MODE
Refresh();