fix top border size and placement (#356)
This commit is contained in:
parent
91e6591fd6
commit
5ee4d73771
1 changed files with 4 additions and 2 deletions
|
@ -1161,9 +1161,11 @@ static void render_top_border(struct fx_render_context *ctx, struct sway_contain
|
||||||
// Child border - top edge
|
// Child border - top edge
|
||||||
memcpy(&color, colors->child_border, sizeof(float) * 4);
|
memcpy(&color, colors->child_border, sizeof(float) * 4);
|
||||||
premultiply_alpha(color, con->alpha);
|
premultiply_alpha(color, con->alpha);
|
||||||
box.x = floor(state->x) + corner_radius;
|
box.x = floor(state->x) +
|
||||||
|
(corner_radius != 0) * (corner_radius + state->border_thickness);
|
||||||
box.y = floor(state->y);
|
box.y = floor(state->y);
|
||||||
box.width = state->width - (2 * corner_radius);
|
box.width = state->width -
|
||||||
|
((corner_radius != 0) * 2 * (corner_radius + state->border_thickness));
|
||||||
box.height = state->border_thickness;
|
box.height = state->border_thickness;
|
||||||
scale_box(&box, output_scale);
|
scale_box(&box, output_scale);
|
||||||
render_rect(ctx, &box, color);
|
render_rect(ctx, &box, color);
|
||||||
|
|
Loading…
Add table
Reference in a new issue