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:
@@ -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);
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user