From 06a42745469e334fe99c417e2e550f36bf1bc86d Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Thu, 22 Jan 2009 13:33:42 +0000 Subject: [PATCH] Try to be smarter about querying the border witdh git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58293 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/win_gtk.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/gtk/win_gtk.cpp b/src/gtk/win_gtk.cpp index 7243df8692..b9c061edf3 100644 --- a/src/gtk/win_gtk.cpp +++ b/src/gtk/win_gtk.cpp @@ -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 -- 2.47.2