fix top border size and placement (#356)
This commit is contained in:
parent
74f251134a
commit
08ace74498
|
@ -1271,9 +1271,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;
|
||||||
adjust_box_to_workspace_offset(&box, on_focused_workspace, ctx->output);
|
adjust_box_to_workspace_offset(&box, on_focused_workspace, ctx->output);
|
||||||
scale_box(&box, output_scale);
|
scale_box(&box, output_scale);
|
||||||
|
|
Loading…
Reference in a new issue