summaryrefslogtreecommitdiff
path: root/gtk/gtkiconview.c
diff options
context:
space:
mode:
authorJasper St. Pierre <jstpierre@mecheye.net>2013-08-07 04:56:45 -0400
committerJasper St. Pierre <jstpierre@mecheye.net>2013-08-07 11:53:04 -0400
commitd72252c7d6344e452d9a715ddbbf761defabdddd (patch)
treeb145e018bea778c5870ae3b4b1578a1cb7e398b9 /gtk/gtkiconview.c
parentb9d85b9412e0d764cbbda06e286533b06ceaf3a2 (diff)
downloadgtk+-d72252c7d6344e452d9a715ddbbf761defabdddd.tar.gz
gtkiconview: Remove the border and background from drag icons
This doesn't look good when combined with rounded corners on selected items. https://bugzilla.gnome.org/show_bug.cgi?id=705605
Diffstat (limited to 'gtk/gtkiconview.c')
-rw-r--r--gtk/gtkiconview.c32
1 files changed, 8 insertions, 24 deletions
diff --git a/gtk/gtkiconview.c b/gtk/gtkiconview.c
index f7e9ad80fc..88f72bb009 100644
--- a/gtk/gtkiconview.c
+++ b/gtk/gtkiconview.c
@@ -6486,8 +6486,8 @@ gtk_icon_view_drag_begin (GtkWidget *widget,
g_return_if_fail (item != NULL);
- x = icon_view->priv->press_start_x - item->cell_area.x + 1;
- y = icon_view->priv->press_start_y - item->cell_area.y + 1;
+ x = icon_view->priv->press_start_x - item->cell_area.x;
+ y = icon_view->priv->press_start_y - item->cell_area.y;
path = gtk_tree_path_new_from_indices (item->index, -1);
icon = gtk_icon_view_create_drag_icon (icon_view, path);
@@ -7088,7 +7088,6 @@ gtk_icon_view_create_drag_icon (GtkIconView *icon_view,
GtkTreePath *path)
{
GtkWidget *widget;
- GtkStyleContext *context;
cairo_t *cr;
cairo_surface_t *surface;
GList *l;
@@ -7098,7 +7097,6 @@ gtk_icon_view_create_drag_icon (GtkIconView *icon_view,
g_return_val_if_fail (path != NULL, NULL);
widget = GTK_WIDGET (icon_view);
- context = gtk_widget_get_style_context (widget);
if (!gtk_widget_get_realized (widget))
return NULL;
@@ -7119,30 +7117,16 @@ gtk_icon_view_create_drag_icon (GtkIconView *icon_view,
};
surface = gdk_window_create_similar_surface (icon_view->priv->bin_window,
- CAIRO_CONTENT_COLOR,
- rect.width + 2,
- rect.height + 2);
+ CAIRO_CONTENT_COLOR_ALPHA,
+ rect.width,
+ rect.height);
cr = cairo_create (surface);
- cairo_set_line_width (cr, 1.);
-
- gtk_render_background (context, cr, 0, 0,
- rect.width + 2, rect.height + 2);
-
- cairo_save (cr);
-
- cairo_rectangle (cr, 1, 1, rect.width, rect.height);
- cairo_clip (cr);
gtk_icon_view_paint_item (icon_view, cr, item,
- icon_view->priv->item_padding + 1,
- icon_view->priv->item_padding + 1, FALSE);
-
- cairo_restore (cr);
-
- cairo_set_source_rgb (cr, 0.0, 0.0, 0.0); /* black */
- cairo_rectangle (cr, 0.5, 0.5, rect.width + 1, rect.height + 1);
- cairo_stroke (cr);
+ icon_view->priv->item_padding,
+ icon_view->priv->item_padding,
+ FALSE);
cairo_destroy (cr);