From 1cfc49711752c96a6bf5df51ad0ff8905b50bf81 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Sat, 20 Oct 2007 10:20:29 +0000 Subject: [PATCH] Support hover over effect for DrawHeaderButton for GTK+ git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49255 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/renderer.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/gtk/renderer.cpp b/src/gtk/renderer.cpp index 5be8e51806..9ce5074138 100644 --- a/src/gtk/renderer.cpp +++ b/src/gtk/renderer.cpp @@ -235,11 +235,20 @@ wxRendererGTK::DrawHeaderButton(wxWindow *win, if (win->GetLayoutDirection() == wxLayout_RightToLeft) x_diff = rect.width; + GtkStateType state = GTK_STATE_NORMAL; + if (flags & wxCONTROL_DISABLED) + state = GTK_STATE_INSENSITIVE; + else + { + if (flags & wxCONTROL_CURRENT) + state = GTK_STATE_PRELIGHT; + } + gtk_paint_box ( button->style, gdk_window, - flags & wxCONTROL_DISABLED ? GTK_STATE_INSENSITIVE : GTK_STATE_NORMAL, + state, GTK_SHADOW_OUT, NULL, button, -- 2.45.2