From 4f26eeada0c6f8ebe3addc38c561442cb9ee7581 Mon Sep 17 00:00:00 2001 From: AnErrupTion Date: Tue, 17 Mar 2026 20:10:47 +0100 Subject: [PATCH] Fix double spacing issue in labels Signed-off-by: AnErrupTion --- src/main.zig | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/src/main.zig b/src/main.zig index 0f3f0ab..5523231 100644 --- a/src/main.zig +++ b/src/main.zig @@ -1686,22 +1686,34 @@ fn positionWidgets(ptr: *anyopaque) !void { if (!state.config.hide_key_hints) { state.shutdown_label.positionX(state.edge_margin .add(TerminalBuffer.START_POSITION)); - state.restart_label.positionX(state.shutdown_label + var last_label = state.shutdown_label; + state.restart_label.positionX(last_label .childrenPosition() .addX(1)); - state.sleep_label.positionX(state.restart_label + last_label = state.restart_label; + state.sleep_label.positionX(last_label .childrenPosition() .addX(1)); - state.hibernate_label.positionX(state.sleep_label + if (state.config.sleep_cmd != null) { + last_label = state.sleep_label; + } + state.hibernate_label.positionX(last_label .childrenPosition() .addX(1)); - state.toggle_password_label.positionX(state.hibernate_label + if (state.config.hibernate_cmd != null) { + last_label = state.hibernate_label; + } + state.toggle_password_label.positionX(last_label .childrenPosition() .addX(1)); - state.brightness_down_label.positionX(state.toggle_password_label + last_label = state.toggle_password_label; + state.brightness_down_label.positionX(last_label .childrenPosition() .addX(1)); - state.brightness_up_label.positionXY(state.brightness_down_label + if (state.config.brightness_down_key != null) { + last_label = state.brightness_down_label; + } + state.brightness_up_label.positionXY(last_label .childrenPosition() .addX(1)); }