]> git.saurik.com Git - wxWidgets.git/commitdiff
Don't hard code horizontal border for wxStaticBox in wxGTK.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 30 Jun 2012 16:33:07 +0000 (16:33 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 30 Jun 2012 16:33:07 +0000 (16:33 +0000)
Compute the border width from the average character width instead of hard
coding it to 5 pixels. Probably doesn't make much difference in practice, but
seems to make more sense.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71885 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/statbox.cpp

index ec1ee9d101a6f702544f3e42fb5e7037333a01b0..14e274453d189e7c802ac4c05753caa2c7a8b002 100644 (file)
@@ -154,10 +154,8 @@ wxStaticBox::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
 
 void wxStaticBox::GetBordersForSizer(int *borderTop, int *borderOther) const
 {
-    const int BORDER = 5; // FIXME: hardcoded value
-
     *borderTop = GetCharHeight();
-    *borderOther = BORDER;
+    *borderOther = GetCharWidth()/2;
 }
 
 #endif // wxUSE_STATBOX