From a19d4096a996ddc55859d49f25af5da9a76c6e9f Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 30 Jun 2012 16:33:07 +0000 Subject: [PATCH] Don't hard code horizontal border for wxStaticBox in wxGTK. 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 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/gtk/statbox.cpp b/src/gtk/statbox.cpp index ec1ee9d101..14e274453d 100644 --- a/src/gtk/statbox.cpp +++ b/src/gtk/statbox.cpp @@ -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 -- 2.45.2