gnome-control-center r8931 - trunk/capplets/display
- From: jensg svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-control-center r8931 - trunk/capplets/display
- Date: Sat, 6 Sep 2008 09:19:42 +0000 (UTC)
Author: jensg
Date: Sat Sep 6 09:19:42 2008
New Revision: 8931
URL: http://svn.gnome.org/viewvc/gnome-control-center?rev=8931&view=rev
Log:
2008-09-06 Jens Granseuer <jensgr gmx net>
Patch by: Bruce Cowan <bugs bcowan fastmail co uk>
* xrandr-capplet.c: (paint_background): use theme colours for the
background (bug #545117)
Modified:
trunk/capplets/display/ChangeLog
trunk/capplets/display/xrandr-capplet.c
Modified: trunk/capplets/display/xrandr-capplet.c
==============================================================================
--- trunk/capplets/display/xrandr-capplet.c (original)
+++ trunk/capplets/display/xrandr-capplet.c Sat Sep 6 09:19:42 2008
@@ -1324,18 +1324,21 @@
GTK_WIDGET (app->area), text);
}
-#define BACKGROUND_FILL_RGBA 0.72, 0.78, 0.87, 1.0
-#define BACKGROUND_STROKE_RGBA 0.44, 0.59, 0.76, 1.0
-
static void
paint_background (FooScrollArea *area,
cairo_t *cr)
{
GdkRectangle viewport;
+ GtkWidget *widget;
+
+ widget = GTK_WIDGET (area);
foo_scroll_area_get_viewport (area, &viewport);
- cairo_set_source_rgba (cr, BACKGROUND_FILL_RGBA);
+ cairo_set_source_rgb (cr,
+ widget->style->base[GTK_STATE_SELECTED].red / 65535.0,
+ widget->style->base[GTK_STATE_SELECTED].green / 65535.0,
+ widget->style->base[GTK_STATE_SELECTED].blue / 65535.0);
cairo_rectangle (cr,
viewport.x, viewport.y,
@@ -1347,7 +1350,10 @@
foo_scroll_area_add_input_from_fill (area, cr, on_canvas_event, NULL);
#endif
- cairo_set_source_rgba (cr, BACKGROUND_STROKE_RGBA);
+ cairo_set_source_rgb (cr,
+ widget->style->dark[GTK_STATE_SELECTED].red / 65535.0,
+ widget->style->dark[GTK_STATE_SELECTED].green / 65535.0,
+ widget->style->dark[GTK_STATE_SELECTED].blue / 65535.0);
cairo_stroke (cr);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]