]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/win_gtk.cpp
Try to be smarter about querying the border witdh
[wxWidgets.git] / src / gtk / win_gtk.cpp
index 7243df8692f4983997cf1522135155fa1c9142a2..b9c061edf37f155c08c98f462cce22626eede0dd 100644 (file)
@@ -379,11 +379,15 @@ void wxPizza::get_border_widths(int& x, int& y)
         x = y = 1;
     else if (m_border_style)
     {
-        GtkWidget *entry_widget = wxGTKPrivate::GetEntryWidget();
-        if (entry_widget->style)
+        GtkWidget *style_widget = wxGTKPrivate::GetEntryWidget();
+        
+        if (m_is_scrollable)
+            style_widget = wxGTKPrivate::GetTreeWidget();
+            
+        if (style_widget->style)
         {
-            x = entry_widget->style->xthickness;
-            y = entry_widget->style->ythickness;
+            x = style_widget->style->xthickness;
+            y = style_widget->style->ythickness;
         }
     }
 #endif