From 018936bc56bb96a9768971fa473540d8f0324ac7 Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Thu, 31 Oct 2024 22:17:21 +0100 Subject: [PATCH] refactor: tweak layout of modstate widget --- src/tui/status/modstate.zig | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/tui/status/modstate.zig b/src/tui/status/modstate.zig index d3c63e0..7883361 100644 --- a/src/tui/status/modstate.zig +++ b/src/tui/status/modstate.zig @@ -21,7 +21,7 @@ hover: bool = false, const Self = @This(); -pub const width = 5; +pub const width = 8; pub fn create(allocator: Allocator, parent: Plane, _: ?EventHandler) @import("widget.zig").CreateError!Widget { const self: *Self = try allocator.create(Self); @@ -53,10 +53,10 @@ pub fn render(self: *Self, theme: *const Widget.Theme) bool { self.plane.erase(); self.plane.home(); - _ = self.plane.print("\u{2003}{s}{s}{s}\u{2003}", .{ - mode(self.ctrl, "Ⓒ", "🅒"), - mode(self.shift, "Ⓢ", "🅢"), - mode(self.alt, "Ⓐ", "🅐"), + _ = self.plane.print(" {s}{s}{s} ", .{ + mode(self.ctrl, "Ⓒ ", "🅒 "), + mode(self.shift, "Ⓢ ", "🅢 "), + mode(self.alt, "Ⓐ ", "🅐 "), }) catch {}; return false; }