From 636c8dabc6699d2b0e51dc92b824c7889e2f2230 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Sat, 7 Mar 2009 13:33:27 +0000 Subject: [PATCH] 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 --- include/wx/osx/carbon/dataview.h | 2 ++ src/osx/carbon/dataview.cpp | 10 +++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/include/wx/osx/carbon/dataview.h b/include/wx/osx/carbon/dataview.h index 2cdaf00c34..46d065c37e 100644 --- a/include/wx/osx/carbon/dataview.h +++ b/include/wx/osx/carbon/dataview.h @@ -508,6 +508,8 @@ public: // 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: void AddChildrenLevel(wxDataViewItem const& parentItem); diff --git a/src/osx/carbon/dataview.cpp b/src/osx/carbon/dataview.cpp index 8eeeac29a9..8a35b22c56 100644 --- a/src/osx/carbon/dataview.cpp +++ b/src/osx/carbon/dataview.cpp @@ -1027,6 +1027,14 @@ bool wxDataViewCtrl::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, return true; } +wxSize wxDataViewCtrl::DoGetBestSize() const +{ + wxSize best = wxControl::DoGetBestSize(); + best.y = 80; + + return best; +} + /*static*/ wxVisualAttributes wxDataViewCtrl::GetClassDefaultAttributes(wxWindowVariant variant) { @@ -1034,7 +1042,7 @@ wxVisualAttributes wxDataViewCtrl::GetClassDefaultAttributes(wxWindowVariant var attr.colFg = wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOWTEXT ); attr.colBg = wxSystemSettings::GetColour( wxSYS_COLOUR_LISTBOX ); - attr.font.MacCreateFromThemeFont(kThemeViewsFont); + //attr.font.MacCreateFromThemeFont(kThemeViewsFont); return attr; } -- 2.45.2