[gtk/dnd-gestures-2: 131/150] iconview: Render drop highlight properly
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/dnd-gestures-2: 131/150] iconview: Render drop highlight properly
- Date: Tue, 7 Jan 2020 07:02:56 +0000 (UTC)
commit 7d34aa5c0080669d58f31f1244a6e8ec6df99cbd
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Jan 6 21:25:15 2020 -0500
iconview: Render drop highlight properly
Use :drop(active) and render a frame, not focus.
gtk/gtkiconview.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtkiconview.c b/gtk/gtkiconview.c
index 81572a2fa9..5a7c0f6dca 100644
--- a/gtk/gtkiconview.c
+++ b/gtk/gtkiconview.c
@@ -1757,9 +1757,15 @@ gtk_icon_view_snapshot (GtkWidget *widget,
break;
}
- gtk_snapshot_render_focus (snapshot, context,
+
+ gtk_style_context_save (context);
+ gtk_style_context_set_state (context, gtk_style_context_get_state (context) |
GTK_STATE_FLAG_DROP_ACTIVE);
+
+ gtk_snapshot_render_frame (snapshot, context,
rect.x, rect.y,
rect.width, rect.height);
+
+ gtk_style_context_restore (context);
}
if (icon_view->priv->doing_rubberband)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]