I've now seen 2 or 3 themes that need this extra space in a label-less

static box, so I'm checking in my GetBordersForSizer change discussed
on wx-dev a few weeks ago.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39277 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2006-05-23 02:04:01 +00:00
parent 30fc5e8fee
commit c1f50b06ec
2 changed files with 11 additions and 0 deletions

View File

@@ -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);

View File

@@ -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