summaryrefslogtreecommitdiff
path: root/src/themes/coco/coco-theme.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/themes/coco/coco-theme.c')
-rw-r--r--src/themes/coco/coco-theme.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/themes/coco/coco-theme.c b/src/themes/coco/coco-theme.c
index b96c52f..f18e9a5 100644
--- a/src/themes/coco/coco-theme.c
+++ b/src/themes/coco/coco-theme.c
@@ -172,7 +172,17 @@ draw_pie(GtkWidget *pie, WindowData *windata, cairo_t *cr)
return;
gdouble arc_angle = 1.0 - (gdouble)windata->remaining / (gdouble)windata->timeout;
- cairo_set_source_rgba (cr, 1.0, 0.4, 0.0, 0.3);
+
+ // .notification-box .countdown:active { color:#aabbcc; }
+ GdkRGBA colorFront, colorBack;
+ GtkStyleContext *context = gtk_widget_get_style_context (pie);
+ gtk_style_context_get_color (context, GTK_STATE_FLAG_ACTIVE, &colorFront);
+ gtk_style_context_get_color (context, GTK_STATE_FLAG_NORMAL, &colorBack);
+ if (gdk_rgba_equal (&colorFront, &colorBack))
+ cairo_set_source_rgba (cr, 1.0, 0.4, 0.0, 0.3);
+ else
+ cairo_set_source_rgba (cr, colorFront.red, colorFront.green, colorFront.blue, colorFront.alpha);
+
cairo_move_to(cr, PIE_RADIUS, PIE_RADIUS);
cairo_arc_negative(cr, PIE_RADIUS, PIE_RADIUS, PIE_RADIUS,
-G_PI/2, (-0.25 + arc_angle)*2*G_PI);