From 9926619adfd915006680f55183cb7be43bfe03ab Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 26 Mar 2019 13:57:21 +0100 Subject: [PATCH] Don't use hard-coded size for wxSpinCtrl in the dialogs sample This truncates the control with GTK+ 3 where 40 or 60 pixels is never enough for its width (even without speaking about high DPI displays) and results in tons of GTK+ warnings. --- samples/dialogs/dialogs.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/samples/dialogs/dialogs.cpp b/samples/dialogs/dialogs.cpp index 578bb940ce..0728f34dd3 100644 --- a/samples/dialogs/dialogs.cpp +++ b/samples/dialogs/dialogs.cpp @@ -3444,7 +3444,7 @@ wxPanel* SettingsDialog::CreateGeneralSettingsPage(wxWindow* parent) #if wxUSE_SPINCTRL wxSpinCtrl* spinCtrl12 = new wxSpinCtrl(panel, ID_AUTO_SAVE_MINS, wxEmptyString, - wxDefaultPosition, wxSize(40, wxDefaultCoord), wxSP_ARROW_KEYS, 1, 60, 1); + wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 1, 60, 1); spinCtrl12->SetValidator(wxGenericValidator(&m_settingsData.m_autoSaveInterval)); #endif @@ -3515,8 +3515,7 @@ wxPanel* SettingsDialog::CreateAestheticSettingsPage(wxWindow* parent) wxStaticBox* staticBox1 = new wxStaticBox(panel, wxID_ANY, "Tile font size:"); wxBoxSizer* itemSizer5 = new wxStaticBoxSizer( staticBox1, wxHORIZONTAL ); - wxSpinCtrl* spinCtrl = new wxSpinCtrl(panel, ID_FONT_SIZE, wxEmptyString, wxDefaultPosition, - wxSize(80, wxDefaultCoord)); + wxSpinCtrl* spinCtrl = new wxSpinCtrl(panel, ID_FONT_SIZE, wxEmptyString); spinCtrl->SetValidator(wxGenericValidator(&m_settingsData.m_titleFontSize)); itemSizer5->Add(spinCtrl, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);