From d7b63a01e9bf64f1d9ff3f39d01bb7800032c44b Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Thu, 22 Jan 2009 15:05:32 +0000 Subject: [PATCH] Trying again to improve border type guessing git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58304 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/win_gtk.cpp | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/gtk/win_gtk.cpp b/src/gtk/win_gtk.cpp index b9c061edf3..acace1f565 100644 --- a/src/gtk/win_gtk.cpp +++ b/src/gtk/win_gtk.cpp @@ -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) { -- 2.47.2