diff --git a/include/wx/gtk/statbox.h b/include/wx/gtk/statbox.h index 90c5abc8c3..437e1836f2 100644 --- a/include/wx/gtk/statbox.h +++ b/include/wx/gtk/statbox.h @@ -42,6 +42,8 @@ public: virtual bool IsTransparentForMouse() const { return TRUE; } + virtual void GetBordersForSizer(int *borderTop, int *borderOther) const; + protected: virtual bool GTKWidgetNeedsMnemonic() const; virtual void GTKWidgetDoSetMnemonic(GtkWidget* w); diff --git a/src/gtk/statbox.cpp b/src/gtk/statbox.cpp index 4d3feeb72b..bb499a7cda 100644 --- a/src/gtk/statbox.cpp +++ b/src/gtk/statbox.cpp @@ -107,4 +107,13 @@ wxStaticBox::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant)) return GetDefaultAttributesFromGTKWidget(gtk_frame_new); } + +void wxStaticBox::GetBordersForSizer(int *borderTop, int *borderOther) const +{ + const int BORDER = 5; // FIXME: hardcoded value + + *borderTop = GetLabel().empty() ? 2*BORDER : GetCharHeight(); + *borderOther = BORDER; +} + #endif // wxUSE_STATBOX