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.
This commit is contained in:
@@ -3444,7 +3444,7 @@ wxPanel* SettingsDialog::CreateGeneralSettingsPage(wxWindow* parent)
|
|||||||
|
|
||||||
#if wxUSE_SPINCTRL
|
#if wxUSE_SPINCTRL
|
||||||
wxSpinCtrl* spinCtrl12 = new wxSpinCtrl(panel, ID_AUTO_SAVE_MINS, wxEmptyString,
|
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));
|
spinCtrl12->SetValidator(wxGenericValidator(&m_settingsData.m_autoSaveInterval));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -3515,8 +3515,7 @@ wxPanel* SettingsDialog::CreateAestheticSettingsPage(wxWindow* parent)
|
|||||||
wxStaticBox* staticBox1 = new wxStaticBox(panel, wxID_ANY, "Tile font size:");
|
wxStaticBox* staticBox1 = new wxStaticBox(panel, wxID_ANY, "Tile font size:");
|
||||||
wxBoxSizer* itemSizer5 = new wxStaticBoxSizer( staticBox1, wxHORIZONTAL );
|
wxBoxSizer* itemSizer5 = new wxStaticBoxSizer( staticBox1, wxHORIZONTAL );
|
||||||
|
|
||||||
wxSpinCtrl* spinCtrl = new wxSpinCtrl(panel, ID_FONT_SIZE, wxEmptyString, wxDefaultPosition,
|
wxSpinCtrl* spinCtrl = new wxSpinCtrl(panel, ID_FONT_SIZE, wxEmptyString);
|
||||||
wxSize(80, wxDefaultCoord));
|
|
||||||
spinCtrl->SetValidator(wxGenericValidator(&m_settingsData.m_titleFontSize));
|
spinCtrl->SetValidator(wxGenericValidator(&m_settingsData.m_titleFontSize));
|
||||||
itemSizer5->Add(spinCtrl, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
|
itemSizer5->Add(spinCtrl, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user