X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2daa0ce9a4abc1129b50d47a2a64665813372ad6..410207c3b3dc8cc19a5443f6ec54887265c7af0a:/src/gtk/window.cpp?ds=sidebyside diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index b84f556764..5e09f6f528 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -1658,7 +1658,7 @@ static gint gtk_scrollbar_button_release_callback( GtkRange *widget, if (win->m_isScrolling) { - wxEventType command = wxEVT_SCROLLWIN_THUMBRELEASE; + wxEventType command = wxEVT_SCROLL_THUMBRELEASE; int value = -1; int dir = -1; @@ -2147,7 +2147,10 @@ wxWindow::~wxWindow() if (m_widgetStyle) { - gtk_style_unref( m_widgetStyle ); + // don't delete if it's a pixmap theme style + if (!m_widgetStyle->engine_data) + gtk_style_unref( m_widgetStyle ); + m_widgetStyle = (GtkStyle*) NULL; } @@ -3040,6 +3043,18 @@ GtkStyle *wxWindow::GetWidgetStyle() void wxWindow::SetWidgetStyle() { + if (m_widget->style->engine_data) + { + static bool s_warningPrinted = FALSE; + if (!s_warningPrinted) + { + printf( "wxWindows warning: Widget styles disabled due to buggy GTK theme.\n" ); + s_warningPrinted = TRUE; + } + m_widgetStyle = m_widget->style; + return; + } + GtkStyle *style = GetWidgetStyle(); if (m_font != wxSystemSettings::GetSystemFont( wxSYS_DEFAULT_GUI_FONT ))