Set a style class for drag icons
authorMatthias Clasen <mclasen@redhat.com>
Mon, 11 Dec 2017 02:16:31 +0000 (21:16 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 11 Dec 2017 02:16:31 +0000 (21:16 -0500)
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

index bec5f3bbed5b5cba59adbc2be9830b5db0e109f7..50ba608d13c6c3a6cdd6ffdf732214c6d078defc 100644 (file)
@@ -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);
 }