From bac71d9c8de38f4b60c347fc2b5b0684d6ebbef8 Mon Sep 17 00:00:00 2001 From: loserMcloser Date: Mon, 31 May 2021 15:01:59 -0600 Subject: [PATCH] Draw ring and inner fill separately --- render.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/render.c b/render.c index 7d27833..d3cad8a 100644 --- a/render.c +++ b/render.c @@ -134,12 +134,18 @@ void render_frame(struct swaylock_surface *surface) { if (state->args.show_indicator && (state->auth_state != AUTH_STATE_IDLE || state->args.indicator_idle_visible)) { - // Draw circle + // Fill inner circle + cairo_set_line_width(cairo, 0); + cairo_arc(cairo, buffer_width / 2, buffer_diameter / 2, + arc_radius - arc_thickness / 2, 0, 2 * M_PI); + set_color_for_state(cairo, state, &state->args.colors.inside); + cairo_fill_preserve(cairo); + cairo_stroke(cairo); + + // Draw ring cairo_set_line_width(cairo, arc_thickness); cairo_arc(cairo, buffer_width / 2, buffer_diameter / 2, arc_radius, 0, 2 * M_PI); - set_color_for_state(cairo, state, &state->args.colors.inside); - cairo_fill_preserve(cairo); set_color_for_state(cairo, state, &state->args.colors.ring); cairo_stroke(cairo);