summaryrefslogtreecommitdiff
path: root/libnautilus-private/nautilus-icon-canvas-item.c
diff options
context:
space:
mode:
Diffstat (limited to 'libnautilus-private/nautilus-icon-canvas-item.c')
-rw-r--r--libnautilus-private/nautilus-icon-canvas-item.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/libnautilus-private/nautilus-icon-canvas-item.c b/libnautilus-private/nautilus-icon-canvas-item.c
index 5731cb6f4..aa1b3569b 100644
--- a/libnautilus-private/nautilus-icon-canvas-item.c
+++ b/libnautilus-private/nautilus-icon-canvas-item.c
@@ -116,7 +116,8 @@ static guint signals[LAST_SIGNAL];
static GdkColor highlight_background_color;
static GdkColor highlight_text_color;
-
+static GdkColor highlight_text_info_color;
+
/* GtkObject */
static void nautilus_icon_canvas_item_initialize_class (NautilusIconCanvasItemClass *class);
static void nautilus_icon_canvas_item_initialize (NautilusIconCanvasItem *item);
@@ -235,6 +236,7 @@ nautilus_icon_canvas_item_initialize_class (NautilusIconCanvasItemClass *class)
/* set up the highlight colors - soon, get these from preferences */
gdk_color_parse ("rgb:00/00/00", &highlight_background_color);
gdk_color_parse ("rgb:FF/FF/FF", &highlight_text_color);
+ gdk_color_parse ("rgb:AA/AA/FF", &highlight_text_info_color);
}
/* Object initialization function for the icon item. */
@@ -668,6 +670,9 @@ draw_or_measure_label_text (NautilusIconCanvasItem *item,
gdk_colormap_alloc_color
(gtk_widget_get_colormap (GTK_WIDGET (canvas_item->canvas)),
&highlight_text_color, FALSE, TRUE);
+ gdk_colormap_alloc_color
+ (gtk_widget_get_colormap (GTK_WIDGET (canvas_item->canvas)),
+ &highlight_text_info_color, FALSE, TRUE);
gdk_gc_set_foreground (gc, &highlight_background_color);
@@ -681,7 +686,7 @@ draw_or_measure_label_text (NautilusIconCanvasItem *item,
}
if (!needs_highlight && drawable != NULL) {
- label_color = nautilus_icon_container_get_label_color (NAUTILUS_ICON_CONTAINER (canvas_item->canvas));
+ label_color = nautilus_icon_container_get_label_color (NAUTILUS_ICON_CONTAINER (canvas_item->canvas), TRUE);
gdk_rgb_gc_set_foreground (gc, label_color);
}
@@ -722,6 +727,17 @@ draw_or_measure_label_text (NautilusIconCanvasItem *item,
text_left + 1, icon_bottom + height_so_far);
}
}
+
+ if (drawable != NULL && i == 0) {
+ if (needs_highlight) {
+ gdk_gc_set_foreground (gc, &highlight_text_info_color);
+
+ } else {
+ label_color = nautilus_icon_container_get_label_color (NAUTILUS_ICON_CONTAINER (canvas_item->canvas), FALSE);
+ gdk_rgb_gc_set_foreground (gc, label_color);
+ }
+
+ }
width_so_far = MAX (width_so_far, icon_text_info->width);
height_so_far += icon_text_info->height;