]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/renderer.cpp
reverted unrelated changes accidentally committed as part of r49411
[wxWidgets.git] / src / gtk / renderer.cpp
index 0e945d4d1e50399919757c1fbfe4e49ea4f955cb..d4c273d979ad21da67d5b0e4c6394a2351c40253 100644 (file)
@@ -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,
@@ -369,21 +378,17 @@ wxRendererGTK::DrawSplitterSash(wxWindow *win,
 
     if ( isVert )
     {
-        int h = win->GetClientSize().GetHeight();
-
         rect.x = position;
         rect.y = 0;
         rect.width = full_size;
-        rect.height = h;
+        rect.height = size.y;
     }
     else // horz
     {
-        int w = win->GetClientSize().GetWidth();
-
         rect.x = 0;
         rect.y = position;
         rect.height = full_size;
-        rect.width = w;
+        rect.width = size.x;
     }
 
     int x_diff = 0;
@@ -619,7 +624,7 @@ wxRendererGTK::DrawItemSelectionRect(wxWindow *win,
         state = GTK_STATE_NORMAL;
     }
 
-    if (flags & wxCONTROL_CURRENT)
+    if ((flags & wxCONTROL_CURRENT) && (flags & wxCONTROL_FOCUSED))
     {
         gtk_paint_focus( win->m_widget->style,
                          gdk_window,