]> git.saurik.com Git - wxWidgets.git/commitdiff
woraround latest sizer changes
authorStefan Csomor <csomor@advancedconcepts.ch>
Sat, 15 May 2004 06:49:23 +0000 (06:49 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Sat, 15 May 2004 06:49:23 +0000 (06:49 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27288 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/combobox.cpp

index 6b5d168080f322fc34e54bd844f39e3d1f463980..643732eb239ee95cfec6460c339198acca5dcc96 100644 (file)
@@ -40,7 +40,11 @@ MenuHandle NewUniqueMenu()
 
 // the margin between the text control and the choice
 static const wxCoord MARGIN = 2;
+#if TARGET_API_MAC_OSX
+static const int    POPUPWIDTH = 24;
+#else
 static const int    POPUPWIDTH = 18;
+#endif
 static const int    POPUPHEIGHT = 23;
 
 
@@ -149,6 +153,12 @@ protected:
         event2.SetString(m_cb->GetStringSelection());
         m_cb->ProcessCommand(event2);
     }
+    virtual wxSize DoGetBestSize() const
+    {
+        wxSize sz = wxChoice::DoGetBestSize() ;
+        sz.x = POPUPWIDTH ;
+        return sz ;
+    }  
 
 private:
     wxComboBox *m_cb;
@@ -290,7 +300,7 @@ 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 )
     {