Fix separator not working with frame_width=0
Bug was introduced with 16e38a9a84c46b0cd4fd7b0f2f88e9d8054ccc0b.
This commit is contained in:
parent
d885e93b73
commit
7735c9a4f6
40
src/draw.c
40
src/draw.c
@ -510,30 +510,28 @@ static cairo_surface_t *render_background(cairo_surface_t *srf,
|
|||||||
else
|
else
|
||||||
height += settings.separator_height;
|
height += settings.separator_height;
|
||||||
|
|
||||||
if (settings.frame_width > 0) {
|
draw_rounded_rect(c, x, y, width, height, corner_radius, first, last);
|
||||||
draw_rounded_rect(c, x, y, width, height, corner_radius, first, last);
|
|
||||||
|
|
||||||
/* adding frame */
|
/* adding frame */
|
||||||
x += settings.frame_width;
|
x += settings.frame_width;
|
||||||
if (first) {
|
if (first) {
|
||||||
y += settings.frame_width;
|
y += settings.frame_width;
|
||||||
height -= settings.frame_width;
|
height -= settings.frame_width;
|
||||||
}
|
|
||||||
|
|
||||||
width -= 2 * settings.frame_width;
|
|
||||||
|
|
||||||
if (last)
|
|
||||||
height -= settings.frame_width;
|
|
||||||
else
|
|
||||||
height -= settings.separator_height;
|
|
||||||
|
|
||||||
radius_int = frame_internal_radius (corner_radius, settings.frame_width, height);
|
|
||||||
|
|
||||||
draw_rounded_rect(c, x, y, width, height, radius_int, first, last);
|
|
||||||
cairo_set_source_rgba(c, cl->frame.r, cl->frame.g, cl->frame.b, cl->frame.a);
|
|
||||||
cairo_fill(c);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
width -= 2 * settings.frame_width;
|
||||||
|
|
||||||
|
if (last)
|
||||||
|
height -= settings.frame_width;
|
||||||
|
else
|
||||||
|
height -= settings.separator_height;
|
||||||
|
|
||||||
|
radius_int = frame_internal_radius (corner_radius, settings.frame_width, height);
|
||||||
|
|
||||||
|
draw_rounded_rect(c, x, y, width, height, radius_int, first, last);
|
||||||
|
cairo_set_source_rgba(c, cl->frame.r, cl->frame.g, cl->frame.b, cl->frame.a);
|
||||||
|
cairo_fill(c);
|
||||||
|
|
||||||
draw_rounded_rect(c, x, y, width, height, radius_int, first, last);
|
draw_rounded_rect(c, x, y, width, height, radius_int, first, last);
|
||||||
cairo_set_source_rgba(c, cl->bg.r, cl->bg.g, cl->bg.b, cl->bg.a);
|
cairo_set_source_rgba(c, cl->bg.r, cl->bg.g, cl->bg.b, cl->bg.a);
|
||||||
cairo_fill(c);
|
cairo_fill(c);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user