From 07cb2272c6ddbdcfbdfa99dc3a5a76a4fa5e3540 Mon Sep 17 00:00:00 2001 From: luigifab <31816829+luigifab@users.noreply.github.com> Date: Thu, 13 Mar 2025 21:09:31 +0100 Subject: Use transparent background for the coutdown --- src/themes/coco/coco-theme.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/themes/coco/coco-theme.c b/src/themes/coco/coco-theme.c index f18e9a5..82b74bd 100644 --- a/src/themes/coco/coco-theme.c +++ b/src/themes/coco/coco-theme.c @@ -292,16 +292,13 @@ configure_event_cb(GtkWidget *nw, } static gboolean -countdown_expose_cb(GtkWidget *pie, - cairo_t *cr, - WindowData *windata) +countdown_expose_cb(GtkWidget *pie, cairo_t *cr, WindowData *windata) { cairo_t *cr2; cairo_surface_t *surface; GtkAllocation alloc; - cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE); - + cairo_set_operator (cr, CAIRO_OPERATOR_OVER); gtk_widget_get_allocation (pie, &alloc); surface = cairo_surface_create_similar (cairo_get_target (cr), @@ -310,13 +307,10 @@ countdown_expose_cb(GtkWidget *pie, alloc.height); cr2 = cairo_create (surface); - - cairo_translate (cr2, -alloc.x, -alloc.y); - fill_background (pie, windata, cr2); - cairo_translate (cr2, alloc.x, alloc.y); - draw_pie (pie, windata, cr2); + cairo_set_source_rgba (cr2, 0.0, 0.0, 0.0, 0.0); // transparent background color + cairo_paint (cr2); + draw_pie (pie, windata, cr2); // countdown cairo_fill (cr2); - cairo_destroy (cr2); cairo_save (cr); -- cgit v1.2.1