mirror of
https://git.mirrors.martin98.com/https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-04 04:40:35 +08:00
MSW specific: Fixed a typo caused extension of PresetComboBox's height on SettingsTabs,
added comment for workaround
This commit is contained in:
parent
c25ca3015a
commit
e6eae62584
@ -492,18 +492,16 @@ void Tab::OnActivate()
|
|||||||
activate_selected_page([](){});
|
activate_selected_page([](){});
|
||||||
m_hsizer->Layout();
|
m_hsizer->Layout();
|
||||||
|
|
||||||
// Workaroud for Menu instead of NoteBook
|
|
||||||
#ifdef _MSW_DARK_MODE
|
#ifdef _MSW_DARK_MODE
|
||||||
// if (wxGetApp().tabs_as_menu())
|
// 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
|
||||||
wxSize sz = m_presets_choice->GetSize();
|
// So we have to set correct size explicitely
|
||||||
wxSize ok_sz = wxSize(35 * m_em_unit, m_presets_choice->GetBestSize().y+1);
|
if (wxSize ok_sz = wxSize(35 * m_em_unit, m_presets_choice->GetBestSize().y);
|
||||||
if (sz != ok_sz) {
|
ok_sz != m_presets_choice->GetSize()) {
|
||||||
m_presets_choice->SetMinSize(ok_sz);
|
m_presets_choice->SetMinSize(ok_sz);
|
||||||
m_presets_choice->SetSize(ok_sz);
|
m_presets_choice->SetSize(ok_sz);
|
||||||
GetSizer()->GetItem(size_t(0))->GetSizer()->Layout();
|
GetSizer()->GetItem(size_t(0))->GetSizer()->Layout();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
#endif // _MSW_DARK_MODE
|
#endif // _MSW_DARK_MODE
|
||||||
Refresh();
|
Refresh();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user