Make wxDataViewCtrl::GetBestSize() return a height of 80 on OSX as per the other platforms

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59402 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2009-03-07 13:33:27 +00:00
parent f5d5909691
commit 636c8dabc6
2 changed files with 11 additions and 1 deletions

View File

@@ -508,6 +508,8 @@ public:
// implementation // implementation
// //
virtual wxSize DoGetBestSize() const;
// adds all children of the passed parent to the control; if 'parentItem' is invalid the root(s) is/are added: // adds all children of the passed parent to the control; if 'parentItem' is invalid the root(s) is/are added:
void AddChildrenLevel(wxDataViewItem const& parentItem); void AddChildrenLevel(wxDataViewItem const& parentItem);

View File

@@ -1027,6 +1027,14 @@ bool wxDataViewCtrl::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos,
return true; return true;
} }
wxSize wxDataViewCtrl::DoGetBestSize() const
{
wxSize best = wxControl::DoGetBestSize();
best.y = 80;
return best;
}
/*static*/ /*static*/
wxVisualAttributes wxDataViewCtrl::GetClassDefaultAttributes(wxWindowVariant variant) wxVisualAttributes wxDataViewCtrl::GetClassDefaultAttributes(wxWindowVariant variant)
{ {
@@ -1034,7 +1042,7 @@ wxVisualAttributes wxDataViewCtrl::GetClassDefaultAttributes(wxWindowVariant var
attr.colFg = wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOWTEXT ); attr.colFg = wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOWTEXT );
attr.colBg = wxSystemSettings::GetColour( wxSYS_COLOUR_LISTBOX ); attr.colBg = wxSystemSettings::GetColour( wxSYS_COLOUR_LISTBOX );
attr.font.MacCreateFromThemeFont(kThemeViewsFont); //attr.font.MacCreateFromThemeFont(kThemeViewsFont);
return attr; return attr;
} }