Skip to content

Commit

Permalink
Fix border segments stitch
Browse files Browse the repository at this point in the history
Signed-off-by: Dave Davenport <[email protected]>
  • Loading branch information
nick87720z authored and DaveDavenport committed Jul 24, 2023
1 parent a383eb8 commit 45688b0
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions source/widgets/widget.c
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,10 @@ void widget_draw(widget *widget, cairo_t *d) {
cairo_restore(d);

if (left != 0 || top != 0 || right != 0 || bottom != 0) {
cairo_save(d);
// NOTE: Cairo group push/pop has same effect as cairo_save/cairo_restore,
// thus no need for these.
cairo_push_group(d);
cairo_set_operator(d, CAIRO_OPERATOR_ADD);
cairo_translate(d, widget->x, widget->y);
cairo_new_path(d);
rofi_theme_get_color(widget, "border-color", d);
Expand Down Expand Up @@ -417,8 +420,8 @@ void widget_draw(widget *widget, cairo_t *d) {

cairo_fill(d);
}

cairo_restore(d);
cairo_pop_group_to_source(d);
cairo_paint(d);
}
}
}
Expand Down

0 comments on commit 45688b0

Please sign in to comment.