Improved wxDataViewSpinCtrlRenderer under OS X
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51200 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1172,8 +1172,21 @@ wxDataViewSpinRenderer::wxDataViewSpinRenderer( int min, int max, wxDataViewCell
|
||||
wxControl* wxDataViewSpinRenderer::CreateEditorCtrl( wxWindow *parent, wxRect labelRect, const wxVariant &value )
|
||||
{
|
||||
long l = value;
|
||||
return new wxSpinCtrl( parent, wxID_ANY, wxEmptyString,
|
||||
labelRect.GetTopLeft(), labelRect.GetSize(), wxSP_ARROW_KEYS, m_min, m_max, l );
|
||||
wxSize size = labelRect.GetSize();
|
||||
#ifdef __WXMAC__
|
||||
size = wxSize( wxMax(70,labelRect.width ), -1 );
|
||||
#endif
|
||||
wxString str;
|
||||
str.Printf( wxT("%d\n"), (int) l );
|
||||
wxSpinCtrl *sc = new wxSpinCtrl( parent, wxID_ANY, str,
|
||||
labelRect.GetTopLeft(), size, wxSP_ARROW_KEYS, m_min, m_max, l );
|
||||
#ifdef __WXMAC__
|
||||
size = sc->GetSize();
|
||||
wxPoint pt = sc->GetPosition();
|
||||
sc->SetSize( pt.x - 4, pt.y - 4, size.x, size.y );
|
||||
#endif
|
||||
|
||||
return sc;
|
||||
}
|
||||
|
||||
bool wxDataViewSpinRenderer::GetValueFromEditorCtrl( wxControl* editor, wxVariant &value )
|
||||
|
||||
Reference in New Issue
Block a user