]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/checkbox.cpp
Found bug that skrewed up display wrt horizontal
[wxWidgets.git] / src / msw / checkbox.cpp
index 97b471a1e3ec006f012fae9a056ebc75efb1e14b..a92fc1b2d6238baea46d66002a6cace8cc727731 100644 (file)
@@ -145,24 +145,26 @@ void wxCheckBox::SetLabel(const wxString& label)
   SetWindowText(GetHwnd(), label);
 }
 
+#define CHECK_SIZE 13
+
 wxSize wxCheckBox::DoGetBestSize() const
 {
     int wCheckbox, hCheckbox;
 
-    wxString str = wxGetWindowText(GetHWND());
+    wxString str = wxGetWindowText(GetHWND()) + " ";
 
     if ( !str.IsEmpty() )
     {
         GetTextExtent(str, &wCheckbox, &hCheckbox);
-        wCheckbox += RADIO_SIZE;
+        wCheckbox += CHECK_SIZE;
 
-        if ( hCheckbox < RADIO_SIZE )
-            hCheckbox = RADIO_SIZE;
+        if ( hCheckbox < CHECK_SIZE )
+            hCheckbox = CHECK_SIZE;
     }
     else
     {
-        wCheckbox = RADIO_SIZE;
-        hCheckbox = RADIO_SIZE;
+        wCheckbox = CHECK_SIZE;
+        hCheckbox = CHECK_SIZE;
     }
 
     return wxSize(wCheckbox, hCheckbox);