mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-11 12:59:02 +08:00
Fix for #11566 - Preferences missing a scrollbar
This commit is contained in:
parent
577ba762e3
commit
38b75d1ad2
@ -74,15 +74,19 @@ PreferencesDialog::PreferencesDialog(wxWindow* parent) :
|
|||||||
build();
|
build();
|
||||||
|
|
||||||
wxSize sz = GetSize();
|
wxSize sz = GetSize();
|
||||||
sz.x += em_unit();
|
bool is_scrollbar_shown = false;
|
||||||
|
|
||||||
const size_t pages_cnt = tabs->GetPageCount();
|
const size_t pages_cnt = tabs->GetPageCount();
|
||||||
for (size_t tab_id = 0; tab_id < pages_cnt; tab_id++) {
|
for (size_t tab_id = 0; tab_id < pages_cnt; tab_id++) {
|
||||||
wxSizer* tab_sizer = tabs->GetPage(tab_id)->GetSizer();
|
wxSizer* tab_sizer = tabs->GetPage(tab_id)->GetSizer();
|
||||||
wxScrolledWindow* scrolled = static_cast<wxScrolledWindow*>(tab_sizer->GetItem(size_t(0))->GetWindow());
|
wxScrolledWindow* scrolled = static_cast<wxScrolledWindow*>(tab_sizer->GetItem(size_t(0))->GetWindow());
|
||||||
scrolled->SetScrollRate(0, 5);
|
scrolled->SetScrollRate(0, 5);
|
||||||
|
|
||||||
|
is_scrollbar_shown |= scrolled->GetScrollLines(wxVERTICAL) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (is_scrollbar_shown)
|
||||||
|
sz.x += 2*em_unit();
|
||||||
SetSize(sz);
|
SetSize(sz);
|
||||||
|
|
||||||
m_highlighter.set_timer_owner(this, 0);
|
m_highlighter.set_timer_owner(this, 0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user