]> git.saurik.com Git - wxWidgets.git/commitdiff
Trying again to improve border type guessing
authorRobert Roebling <robert@roebling.de>
Thu, 22 Jan 2009 15:05:32 +0000 (15:05 +0000)
committerRobert Roebling <robert@roebling.de>
Thu, 22 Jan 2009 15:05:32 +0000 (15:05 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58304 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/win_gtk.cpp

index b9c061edf37f155c08c98f462cce22626eede0dd..acace1f565d6725678c26bd2d5ccca9b20a850dd 100644 (file)
@@ -374,15 +374,25 @@ void wxPizza::scroll(int dx, int dy)
 void wxPizza::get_border_widths(int& x, int& y)
 {
     x = y = 0;
+    if (m_border_style == 0)
+        return;
+        
 #ifndef __WXUNIVERSAL__
     if (m_border_style & wxBORDER_SIMPLE)
         x = y = 1;
-    else if (m_border_style)
+    else if (m_is_scrollable || (m_border_style & wxBORDER_THEME))
+    {
+        GtkWidget *style_widget = wxGTKPrivate::GetTreeWidget();
+            
+        if (style_widget->style)
+        {
+            x = style_widget->style->xthickness;
+            y = style_widget->style->ythickness;
+        }
+    }
+    else 
     {
         GtkWidget *style_widget = wxGTKPrivate::GetEntryWidget();
-        
-        if (m_is_scrollable)
-            style_widget = wxGTKPrivate::GetTreeWidget();
             
         if (style_widget->style)
         {