From: Robin Dunn Date: Thu, 24 Jun 2004 21:58:11 +0000 (+0000) Subject: SetSizeHints hacks are not needed any longer since the minsize is not X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/88db1d64cb9e20de436a3503952dc9303060c33a SetSizeHints hacks are not needed any longer since the minsize is not set by default any longer git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28018 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/mac/carbon/combobox.cpp b/src/mac/carbon/combobox.cpp index b1b55589f0..27f2e33493 100644 --- a/src/mac/carbon/combobox.cpp +++ b/src/mac/carbon/combobox.cpp @@ -62,9 +62,6 @@ public: : wxTextCtrl( cb , 1 ) { m_cb = cb; - - // remove the default minsize, the combobox will have one instead - SetSizeHints(-1,-1); } protected: @@ -145,9 +142,6 @@ public: : wxChoice( cb , 1 ) { m_cb = cb; - - // remove the default minsize, the combobox will have one instead - SetSizeHints(-1,-1); } protected: @@ -205,7 +199,7 @@ wxComboBox::~wxComboBox() wxSize wxComboBox::DoGetBestSize() const { - if (!m_choice || !m_text) + if (!m_choice && !m_text) return GetSize(); wxSize size = m_choice->GetBestSize(); @@ -325,7 +319,6 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id, } m_choice = new wxComboBoxChoice(this, style ); - m_choice->SetSizeHints( wxSize( POPUPWIDTH , POPUPHEIGHT ) ) ; wxSize csize = size; if ( style & wxCB_READONLY ) { @@ -346,7 +339,7 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id, m_choice->DoAppend( choices[ i ] ); } - SetBestSize(csize); // Needed because it is a wxControlWithItems + SetBestSize(size); // Needed because it is a wxControlWithItems return TRUE; }