Skip to content

Commit

Permalink
icon view: don't highlight selected icons
Browse files Browse the repository at this point in the history
This is a cosmetic change.

We already highlight the file name.
List view does not highlight icons, only rows/names.

Highlighted icons don't look good. They get colorized with FG color.
  • Loading branch information
clefebvre committed Oct 7, 2022
1 parent 2f68abd commit fdd47db
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions libnemo-private/nemo-icon-canvas-item.c
Original file line number Diff line number Diff line change
Expand Up @@ -1287,8 +1287,6 @@ real_map_surface (NemoIconCanvasItem *icon_item)
{
EelCanvas *canvas;
GdkPixbuf *temp_pixbuf, *old_pixbuf;
GtkStyleContext *style;
GdkRGBA color;
cairo_surface_t *surface;

temp_pixbuf = icon_item->details->pixbuf;
Expand All @@ -1304,22 +1302,6 @@ real_map_surface (NemoIconCanvasItem *icon_item)
g_object_unref (old_pixbuf);
}

if (icon_item->details->is_highlighted_for_selection
|| icon_item->details->is_highlighted_for_drop) {
style = gtk_widget_get_style_context (GTK_WIDGET (canvas));

if (gtk_widget_has_focus (GTK_WIDGET (canvas))) {
gtk_style_context_get_background_color (style, GTK_STATE_FLAG_SELECTED, &color);
} else {
gtk_style_context_get_background_color (style, GTK_STATE_FLAG_ACTIVE, &color);
}

old_pixbuf = temp_pixbuf;
temp_pixbuf = eel_create_colorized_pixbuf (temp_pixbuf, &color);

g_object_unref (old_pixbuf);
}

surface = gdk_cairo_surface_create_from_pixbuf (temp_pixbuf,
gtk_widget_get_scale_factor (GTK_WIDGET (canvas)),
gtk_widget_get_window (GTK_WIDGET (canvas)));
Expand Down

0 comments on commit fdd47db

Please sign in to comment.