X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a6fc611aa1fe1b5880e9e5489c5b5b3a25d61be9..5c250a10332dc17263c66deb629b5fa8c4320f8a:/src/mac/radiobox.cpp diff --git a/src/mac/radiobox.cpp b/src/mac/radiobox.cpp index fb47af661a..103d68ca44 100644 --- a/src/mac/radiobox.cpp +++ b/src/mac/radiobox.cpp @@ -19,6 +19,7 @@ //------------------------------------------------------------------------------------- #include "wx/defs.h" +#include "wx/arrstr.h" #include "wx/radiobox.h" #include "wx/radiobut.h" @@ -93,6 +94,18 @@ wxRadioBox::~wxRadioBox() //------------------------------------------------------------------------------------- // Create the radiobox for two-step construction +bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& label, + const wxPoint& pos, const wxSize& size, + const wxArrayString& choices, + int majorDim, long style, + const wxValidator& val, const wxString& name) +{ + wxCArrayString chs(choices); + + return Create(parent, id, label, pos, size, chs.GetCount(), + chs.GetStrings(), majorDim, style, val, name); +} + bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& label, const wxPoint& pos, const wxSize& size, int n, const wxString choices[], @@ -452,6 +465,11 @@ void wxRadioBox::DoSetSize(int x, int y, int width, int height, int sizeFlags) x_start = charWidth; y_start = 15 ; + if ( UMAGetSystemVersion() >= 0x1030 ) + { + //need to add a few more pixels for the top border on panther + y_start = y_start + 5; //how many exactly should this be to meet the HIG? + } x_offset = x_start; y_offset = y_start; @@ -509,6 +527,11 @@ wxSize wxRadioBox::DoGetBestSize() const totHeight = GetRowCount() * (maxHeight + charHeight/2) + charHeight ; totWidth = GetColumnCount() * (maxWidth + charWidth) + charWidth; + if ( UMAGetSystemVersion() >= 0x1030 ) + { + //need to add a few more pixels for the static boxborder on panther + totHeight = totHeight + 10; //how many exactly should this be to meet the HIG? + } // handle radio box title as well GetTextExtent(GetTitle(), &eachWidth, NULL); eachWidth = (int)(eachWidth + RADIO_SIZE) + 3 * charWidth ;