X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ca65c0440a7163e4e37e48b1c4329709d722db47..c4fa282ce14a102c5e55aaaec74b7d3b0a605baf:/src/generic/spinctlg.cpp?ds=sidebyside diff --git a/src/generic/spinctlg.cpp b/src/generic/spinctlg.cpp index 148dd99b20..409b708a0e 100644 --- a/src/generic/spinctlg.cpp +++ b/src/generic/spinctlg.cpp @@ -17,10 +17,6 @@ // headers // ---------------------------------------------------------------------------- -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) - #pragma implementation "spinctlg.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -62,7 +58,7 @@ public: m_spin = spin; // remove the default minsize, the spinctrl will have one instead - SetSizeHints(wxDefaultSize.x,wxDefaultSize.y); + SetSizeHints(wxDefaultCoord,wxDefaultCoord); } protected: @@ -111,7 +107,7 @@ public: SetWindowStyle(style | wxSP_VERTICAL); // remove the default minsize, the spinctrl will have one instead - SetSizeHints(wxDefaultSize.x,wxDefaultSize.y); + SetSizeHints(wxDefaultCoord,wxDefaultCoord); } protected: @@ -157,7 +153,7 @@ void wxSpinCtrl::Init() bool wxSpinCtrl::Create(wxWindow *parent, wxWindowID id, const wxString& value, - const wxPoint& WXUNUSED(pos), + const wxPoint& pos, const wxSize& size, long style, int min, @@ -188,6 +184,7 @@ bool wxSpinCtrl::Create(wxWindow *parent, m_btn->SetRange(min, max); m_btn->SetValue(initial); SetBestSize(size); + Move(pos); // have to disable this window to avoid interfering it with message // processing to the text and the button... but pretend it is enabled to @@ -234,7 +231,7 @@ void wxSpinCtrl::DoMoveWindow(int x, int y, int width, int height) wxCoord wText = width - sizeBtn.x; m_text->SetSize(x, y, wText, height); - m_btn->SetSize(x + wText + MARGIN, y, wxDefaultSize.x, height); + m_btn->SetSize(x + wText + MARGIN, y, wxDefaultCoord, height); } // ----------------------------------------------------------------------------