Trying again to improve border type guessing

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58304 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2009-01-22 15:05:32 +00:00
parent 6a2a30a8aa
commit d7b63a01e9

View File

@@ -374,15 +374,25 @@ void wxPizza::scroll(int dx, int dy)
void wxPizza::get_border_widths(int& x, int& y) void wxPizza::get_border_widths(int& x, int& y)
{ {
x = y = 0; x = y = 0;
if (m_border_style == 0)
return;
#ifndef __WXUNIVERSAL__ #ifndef __WXUNIVERSAL__
if (m_border_style & wxBORDER_SIMPLE) if (m_border_style & wxBORDER_SIMPLE)
x = y = 1; 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(); GtkWidget *style_widget = wxGTKPrivate::GetEntryWidget();
if (m_is_scrollable)
style_widget = wxGTKPrivate::GetTreeWidget();
if (style_widget->style) if (style_widget->style)
{ {