From: Stefan Csomor Date: Sun, 25 Jan 2004 15:13:45 +0000 (+0000) Subject: panther adjustements in size X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/5d8fbe213ca853dba80fb5412fa13bda16f283b5 panther adjustements in size git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25372 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/mac/carbon/radiobox.cpp b/src/mac/carbon/radiobox.cpp index fb47af661a..9ef60f5594 100644 --- a/src/mac/carbon/radiobox.cpp +++ b/src/mac/carbon/radiobox.cpp @@ -452,6 +452,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 +514,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 ; diff --git a/src/mac/radiobox.cpp b/src/mac/radiobox.cpp index fb47af661a..9ef60f5594 100644 --- a/src/mac/radiobox.cpp +++ b/src/mac/radiobox.cpp @@ -452,6 +452,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 +514,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 ;