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
This commit is contained in:
Vadim Zeitlin 2012-06-30 16:33:07 +00:00
parent 10da53a250
commit a19d4096a9

View File

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