]> git.saurik.com Git - wxWidgets.git/commitdiff
Readd support for prelight tree control triangles (visual
authorRobert Roebling <robert@roebling.de>
Mon, 7 Mar 2005 17:20:41 +0000 (17:20 +0000)
committerRobert Roebling <robert@roebling.de>
Mon, 7 Mar 2005 17:20:41 +0000 (17:20 +0000)
   effect when mouse is over the triangle/button)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32631 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/renderer.cpp
src/gtk1/renderer.cpp

index 1094858d740a7d4ca58cf503d3f9e3d0405d31e6..e89a2beb747896ead12010d8f1e5ca4f006304c0 100644 (file)
@@ -186,13 +186,19 @@ wxRendererGTK::DrawTreeItemButton(wxWindow* win,
 {
     GtkWidget *tree = GetTreeWidget();
 
+    GtkStateType state;
+    if ( flags & wxCONTROL_CURRENT )
+        state = GTK_STATE_PRELIGHT;
+    else
+        state = GTK_STATE_NORMAL;
+        
     // VZ: I don't know how to get the size of the expander so as to centre it
     //     in the given rectangle, +2/3 below is just what looks good here...
     gtk_paint_expander
     (
         tree->style,
         GTK_PIZZA(win->m_wxwindow)->bin_window,
-        GTK_STATE_NORMAL,
+        state,
         NULL,
         tree,
         "treeview",
index 1094858d740a7d4ca58cf503d3f9e3d0405d31e6..e89a2beb747896ead12010d8f1e5ca4f006304c0 100644 (file)
@@ -186,13 +186,19 @@ wxRendererGTK::DrawTreeItemButton(wxWindow* win,
 {
     GtkWidget *tree = GetTreeWidget();
 
+    GtkStateType state;
+    if ( flags & wxCONTROL_CURRENT )
+        state = GTK_STATE_PRELIGHT;
+    else
+        state = GTK_STATE_NORMAL;
+        
     // VZ: I don't know how to get the size of the expander so as to centre it
     //     in the given rectangle, +2/3 below is just what looks good here...
     gtk_paint_expander
     (
         tree->style,
         GTK_PIZZA(win->m_wxwindow)->bin_window,
-        GTK_STATE_NORMAL,
+        state,
         NULL,
         tree,
         "treeview",