From: Stefan Csomor Date: Thu, 6 Mar 2003 21:38:12 +0000 (+0000) Subject: change to a tiny minimal value for DoGetBestSize in case of existing entries X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/637988a4f6c4f178fec11b22ba809107ad809b5d?ds=inline change to a tiny minimal value for DoGetBestSize in case of existing entries git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19521 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/mac/carbon/choice.cpp b/src/mac/carbon/choice.cpp index a53b5715ce..863b944cb4 100644 --- a/src/mac/carbon/choice.cpp +++ b/src/mac/carbon/choice.cpp @@ -211,7 +211,7 @@ void wxChoice::MacHandleControlClick( WXWidget control , wxInt16 controlpart ) wxSize wxChoice::DoGetBestSize() const { - int lbWidth = 100; // some defaults + int lbWidth = GetCount() > 0 ? 20 : 100; // some defaults int lbHeight = 20; int wLine; #if TARGET_CARBON diff --git a/src/mac/choice.cpp b/src/mac/choice.cpp index a53b5715ce..863b944cb4 100644 --- a/src/mac/choice.cpp +++ b/src/mac/choice.cpp @@ -211,7 +211,7 @@ void wxChoice::MacHandleControlClick( WXWidget control , wxInt16 controlpart ) wxSize wxChoice::DoGetBestSize() const { - int lbWidth = 100; // some defaults + int lbWidth = GetCount() > 0 ? 20 : 100; // some defaults int lbHeight = 20; int wLine; #if TARGET_CARBON