]> git.saurik.com Git - wxWidgets.git/commitdiff
I've now seen 2 or 3 themes that need this extra space in a label-less
authorRobin Dunn <robin@alldunn.com>
Tue, 23 May 2006 02:04:01 +0000 (02:04 +0000)
committerRobin Dunn <robin@alldunn.com>
Tue, 23 May 2006 02:04:01 +0000 (02:04 +0000)
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

include/wx/gtk/statbox.h
src/gtk/statbox.cpp

index 90c5abc8c3f7909e169779ac21921bff4b12d529..437e1836f21d32eb907b7a58d70262c9eb5b845b 100644 (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);
index 4d3feeb72b0fa7675a13af950b2bfe45c6140b27..bb499a7cda03c64148d1ee434652708c98650df5 100644 (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