[gtk+] Set a style class for drag icons
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Set a style class for drag icons
- Date: Mon, 11 Dec 2017 02:18:13 +0000 (UTC)
commit c2bdae23a130120eeed7c0a6d29f49af0762ac1b
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Dec 10 21:16:31 2017 -0500
Set a style class for drag icons
This lets us use the new icon-size machinery to
ensure we don't have tiny drag icons when using
named icons.
gtk/gtkdnd.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkdnd.c b/gtk/gtkdnd.c
index bec5f3b..50ba608 100644
--- a/gtk/gtkdnd.c
+++ b/gtk/gtkdnd.c
@@ -1362,10 +1362,8 @@ set_icon_helper (GdkDragContext *context,
GtkWidget *widget;
widget = gtk_image_new ();
- gtk_widget_show (widget);
-
+ gtk_style_context_add_class (gtk_widget_get_style_context (widget), "drag-icon");
gtk_image_set_from_definition (GTK_IMAGE (widget), def);
-
gtk_drag_set_icon_widget_internal (context, widget, hot_x, hot_y, TRUE);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]