summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimoc@gnome.org>2010-12-14 01:58:59 +0100
committerCosimo Cecchi <cosimoc@gnome.org>2010-12-14 01:58:59 +0100
commit5d811bb37ef4a05edd7fa4c5868a9b68f717e056 (patch)
tree43d69c862eaa8c1cb3af880bb4d7054e3d99f4b3
parent18e3369f02c4ff6a3eb01048e623fff8eb9aded4 (diff)
downloadnautilus-5d811bb37ef4a05edd7fa4c5868a9b68f717e056.tar.gz
icon-dnd: set the right style class, and use GdkRGBA
-rw-r--r--libnautilus-private/nautilus-icon-dnd.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/libnautilus-private/nautilus-icon-dnd.c b/libnautilus-private/nautilus-icon-dnd.c
index 3ae4f059f..c40721095 100644
--- a/libnautilus-private/nautilus-icon-dnd.c
+++ b/libnautilus-private/nautilus-icon-dnd.c
@@ -131,6 +131,7 @@ create_selection_shadow (NautilusIconContainer *container,
for (p = list; p != NULL; p = p->next) {
NautilusDragSelectionItem *item;
int x1, y1, x2, y2;
+ GdkRGBA black = { 0, 0, 0, 1 };
item = p->data;
@@ -151,7 +152,7 @@ create_selection_shadow (NautilusIconContainer *container,
"y1", (double) y1,
"x2", (double) x2,
"y2", (double) y2,
- "outline_color", "black",
+ "outline-color-rgba", &black,
"outline-stippling", TRUE,
"width_pixels", 1,
NULL);
@@ -1359,15 +1360,24 @@ drag_highlight_draw (GtkWidget *widget,
{
gint width, height;
GdkWindow *window;
+ GtkStyleContext *style;
window = gtk_widget_get_window (widget);
width = gdk_window_get_width (window);
height = gdk_window_get_height (window);
- gtk_render_frame (gtk_widget_get_style_context (widget),
- cr,
+ style = gtk_widget_get_style_context (widget);
+
+ gtk_style_context_save (style);
+ gtk_style_context_add_class (style, "dnd");
+ gtk_style_context_set_state (style, GTK_STATE_FLAG_FOCUSED);
+
+ gtk_render_frame (style,
+ cr,
0, 0, width, height);
+ gtk_style_context_restore (style);
+
cairo_set_line_width (cr, 1.0);
cairo_set_source_rgb (cr, 0, 0, 0);
cairo_rectangle (cr, 0.5, 0.5, width - 1, height - 1);