[gthumb] use the gtk+ theme selection color to paint the histogram selection



commit 5ef925a36d44579473770d2d58ce5ee6228c7236
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Sun Feb 27 12:52:27 2011 +0100

    use the gtk+ theme selection color to paint the histogram selection

 gthumb/gth-histogram-view.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/gthumb/gth-histogram-view.c b/gthumb/gth-histogram-view.c
index 8088955..dbc0f1f 100644
--- a/gthumb/gth-histogram-view.c
+++ b/gthumb/gth-histogram-view.c
@@ -394,13 +394,16 @@ gth_histogram_paint_selection (GthHistogramView *self,
 			       cairo_t          *cr,
 			       GtkAllocation    *allocation)
 {
-	double step;
-
-	step = (double) allocation->width / 255.0;
+	GtkStyle *style;
+	double    step;
 
 	cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
 	cairo_set_line_width (cr, 0.5);
-	cairo_set_source_rgba (cr, 0.5, 0.5, 0.5, 0.5);
+
+	style = gtk_widget_get_style (GTK_WIDGET (self));
+	gdk_cairo_set_source_color (cr, &style->base[GTK_STATE_SELECTED]);
+
+	step = (double) allocation->width / 255.0;
 	cairo_rectangle (cr,
 			 self->priv->selection_start * step,
 			 0,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]