mirror of
https://git.mirrors.martin98.com/https://github.com/bambulab/BambuStudio.git
synced 2025-09-21 02:43:17 +08:00
FIX:Preference page scrolling issue
Change-Id: Ia885b083a7467f3558a940b808f071d9ca80e531
This commit is contained in:
parent
33a8545e2b
commit
47db82ee1e
@ -29,6 +29,18 @@ WX_DEFINE_LIST(RadioSelectorList);
|
|||||||
wxDEFINE_EVENT(EVT_PREFERENCES_SELECT_TAB, wxCommandEvent);
|
wxDEFINE_EVENT(EVT_PREFERENCES_SELECT_TAB, wxCommandEvent);
|
||||||
|
|
||||||
|
|
||||||
|
class MyscrolledWindow : public wxScrolledWindow {
|
||||||
|
public:
|
||||||
|
MyscrolledWindow(wxWindow* parent,
|
||||||
|
wxWindowID id = wxID_ANY,
|
||||||
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
|
const wxSize& size = wxDefaultSize,
|
||||||
|
long style = wxVSCROLL) : wxScrolledWindow(parent, id, pos, size, style) {}
|
||||||
|
|
||||||
|
bool ShouldScrollToChildOnFocus(wxWindow* child) override { return false; }
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
wxBoxSizer *PreferencesDialog::create_item_title(wxString title, wxWindow *parent, wxString tooltip)
|
wxBoxSizer *PreferencesDialog::create_item_title(wxString title, wxWindow *parent, wxString tooltip)
|
||||||
{
|
{
|
||||||
wxBoxSizer *m_sizer_title = new wxBoxSizer(wxHORIZONTAL);
|
wxBoxSizer *m_sizer_title = new wxBoxSizer(wxHORIZONTAL);
|
||||||
@ -836,7 +848,7 @@ void PreferencesDialog::create()
|
|||||||
|
|
||||||
auto main_sizer = new wxBoxSizer(wxVERTICAL);
|
auto main_sizer = new wxBoxSizer(wxVERTICAL);
|
||||||
|
|
||||||
m_scrolledWindow = new wxScrolledWindow(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxVSCROLL);
|
m_scrolledWindow = new MyscrolledWindow(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxVSCROLL);
|
||||||
m_scrolledWindow->SetScrollRate(5, 5);
|
m_scrolledWindow->SetScrollRate(5, 5);
|
||||||
|
|
||||||
m_sizer_body = new wxBoxSizer(wxVERTICAL);
|
m_sizer_body = new wxBoxSizer(wxVERTICAL);
|
||||||
|
@ -41,6 +41,7 @@ public:
|
|||||||
RadioBox *m_radiobox;
|
RadioBox *m_radiobox;
|
||||||
bool m_selected = false;
|
bool m_selected = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
WX_DECLARE_LIST(RadioSelector, RadioSelectorList);
|
WX_DECLARE_LIST(RadioSelector, RadioSelectorList);
|
||||||
class CheckBox;
|
class CheckBox;
|
||||||
class TextInput;
|
class TextInput;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user