X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/001e76a930e2bab71bcd4b1d40c4de4825cf6f47..2296fe5018d42d4e0bf9df07c37d31f60d972b32:/src/generic/numdlgg.cpp diff --git a/src/generic/numdlgg.cpp b/src/generic/numdlgg.cpp index 3fc475e4c5..e148a5d121 100644 --- a/src/generic/numdlgg.cpp +++ b/src/generic/numdlgg.cpp @@ -18,7 +18,7 @@ // ---------------------------------------------------------------------------- #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) - #pragma implementation "numdlgg.cpp" + #pragma implementation "numdlgg.h" #endif // For compilers that support precompilation, includes "wx.h". @@ -108,13 +108,16 @@ wxNumberEntryDialog::wxNumberEntryDialog(wxWindow *parent, #if wxUSE_STATTEXT // 1) text message topsizer->Add( CreateTextSizer( message ), 0, wxALL, 10 ); +#endif // 2) prompt and text ctrl wxBoxSizer *inputsizer = new wxBoxSizer( wxHORIZONTAL ); + +#if wxUSE_STATTEXT // prompt if any if (!prompt.IsEmpty()) inputsizer->Add( new wxStaticText( this, wxID_ANY, prompt ), 0, wxCENTER | wxLEFT, 10 ); -#endif +#endif // spin ctrl wxString valStr; @@ -123,11 +126,9 @@ wxNumberEntryDialog::wxNumberEntryDialog(wxWindow *parent, #if wxUSE_SPINCTRL m_spinctrl->SetRange((int)m_min, (int)m_max); #endif -#if wxUSE_STATTEXT inputsizer->Add( m_spinctrl, 1, wxCENTER | wxLEFT | wxRIGHT, 10 ); // add both topsizer->Add( inputsizer, 1, wxEXPAND | wxLEFT|wxRIGHT, 5 ); -#endif // smart phones does not support or do not waste space for wxButtons #ifdef __SMARTPHONE__ @@ -149,10 +150,12 @@ wxNumberEntryDialog::wxNumberEntryDialog(wxWindow *parent, SetSizer( topsizer ); SetAutoLayout( true ); +#if !defined(__SMARTPHONE__) && !defined(__POCKETPC__) topsizer->SetSizeHints( this ); topsizer->Fit( this ); Centre( wxBOTH ); +#endif m_spinctrl->SetSelection(-1, -1); m_spinctrl->SetFocus();