summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Jon McCann <jmccann@redhat.com>2009-09-23 03:16:21 -0400
committerWilliam Jon McCann <jmccann@redhat.com>2009-09-23 03:16:21 -0400
commit9aea7141c243a2859818953ee675c362e6c4767a (patch)
treed75e607314c8d997cdf1791ec3b7d6ed8b193442
parentad7e037cd17e887537662a516d71bbb8e641c3e0 (diff)
Fix drawing pie
-rw-r--r--src/theme.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/theme.c b/src/theme.c
index bc438dc..eaa2840 100644
--- a/src/theme.c
+++ b/src/theme.c
@@ -860,6 +860,8 @@ countdown_expose_cb (GtkWidget *pie,
cairo_t *context;
cairo_surface_t *surface;
cairo_t *cr;
+ GdkColor color;
+ double r, g, b;
style = gtk_widget_get_style (windata->win);
context = gdk_cairo_create (GDK_DRAWABLE (windata->pie_countdown->window));
@@ -870,12 +872,18 @@ countdown_expose_cb (GtkWidget *pie,
pie->allocation.height);
cr = cairo_create (surface);
- fill_background (pie, windata, cr);
+ cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
+ color = windata->win->style->light [GTK_STATE_NORMAL];
+ r = (float)color.red / 65535.0;
+ g = (float)color.green / 65535.0;
+ b = (float)color.blue / 65535.0;
+ cairo_set_source_rgba (cr, r, g, b, BACKGROUND_ALPHA);
+ cairo_paint (cr);
if (windata->timeout > 0) {
gdouble pct = (gdouble) windata->remaining / (gdouble) windata->timeout;
- gdk_cairo_set_source_color (cr, &style->bg[GTK_STATE_ACTIVE]);
+ gdk_cairo_set_source_color (cr, &style->fg[GTK_STATE_NORMAL]);
cairo_move_to (cr, PIE_RADIUS, PIE_RADIUS);
cairo_arc_negative (cr, PIE_RADIUS, PIE_RADIUS, PIE_RADIUS,
@@ -932,6 +940,11 @@ add_notification_action (GtkWindow *nw,
FALSE, TRUE, 0);
windata->pie_countdown = gtk_drawing_area_new ();
+ g_signal_connect (G_OBJECT (windata->pie_countdown),
+ "style-set",
+ G_CALLBACK (style_set_cb),
+ windata);
+
gtk_widget_show (windata->pie_countdown);
gtk_container_add (GTK_CONTAINER (alignment), windata->pie_countdown);
gtk_widget_set_size_request (windata->pie_countdown,