aboutsummaryrefslogtreecommitdiff
path: root/shared
diff options
context:
space:
mode:
authorBobby <[email protected]>2026-07-28 10:00:02 +0530
committerBobby <[email protected]>2026-07-28 10:00:02 +0530
commit1af083728a0a62986101aa5a77a4cb570f318c6c (patch)
tree553c545614d2f65e15685717cf1ca299d79085f1 /shared
parent240cf3c6c6c8c8f5425730a612a71b82fc368f7f (diff)
downloadakiba-main.tar.xz
akiba-main.zip
Anchor bracket corners so both arms share the corner block, closing the diagonal gap in the bottom-right frameHEADmain
Diffstat (limited to 'shared')
-rw-r--r--shared/splash/panel/panel.zig15
1 files changed, 9 insertions, 6 deletions
diff --git a/shared/splash/panel/panel.zig b/shared/splash/panel/panel.zig
index ff1e8ac..89ba480 100644
--- a/shared/splash/panel/panel.zig
+++ b/shared/splash/panel/panel.zig
@@ -80,11 +80,14 @@ pub fn drawBrackets(canvas: *Canvas) void {
}
fn drawCorner(canvas: *Canvas, x: i32, y: i32, horizontal: i32, vertical: i32, thickness: i32) void {
- const left = if (horizontal < 0) x + horizontal else x;
- const top = if (vertical < 0) y + vertical else y;
- const span_x = if (horizontal < 0) -horizontal else horizontal;
- const span_y = if (vertical < 0) -vertical else vertical;
+ const reach_x = if (horizontal < 0) -horizontal else horizontal;
+ const reach_y = if (vertical < 0) -vertical else vertical;
- draw.fillRect(&canvas.Surface, left, y, span_x, thickness, palette.FRAME_BRACKET);
- draw.fillRect(&canvas.Surface, x, top, thickness, span_y, palette.FRAME_BRACKET);
+ const arm_left = if (horizontal < 0) x + horizontal + 1 else x;
+ const arm_top = if (vertical < 0) y + vertical + 1 else y;
+ const stroke_left = if (horizontal < 0) x - thickness + 1 else x;
+ const stroke_top = if (vertical < 0) y - thickness + 1 else y;
+
+ draw.fillRect(&canvas.Surface, arm_left, stroke_top, reach_x, thickness, palette.FRAME_BRACKET);
+ draw.fillRect(&canvas.Surface, stroke_left, arm_top, thickness, reach_y, palette.FRAME_BRACKET);
}