]> git.saurik.com Git - wxWidgets.git/commitdiff
correct radio button best size calculation under CE (was too small by 1 pixel vertica...
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 25 Feb 2008 02:21:18 +0000 (02:21 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 25 Feb 2008 02:21:18 +0000 (02:21 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52075 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/radiobut.cpp

index dddab3e26a2d23f1a86d2e19068d3cf498e4d940..134a81dfe2d3e201c6e58a2b2b0921c30c172299 100644 (file)
@@ -290,6 +290,13 @@ wxSize wxRadioButton::DoGetBestSize() const
         dc.SetFont(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT));
 
         s_radioSize = dc.GetCharHeight();
+
+        // radio button bitmap size under CE is bigger than the font height,
+        // adding just one pixel seems to work fine for the default font but it
+        // would be nice to find some better way to find the correct height
+#ifdef __WXWINCE__
+        s_radioSize++;
+#endif // __WXWINCE__
     }
 
     wxString str = GetLabel();