mirror of
https://github.com/fairyglade/ly.git
synced 2026-03-24 17:26:04 +00:00
Fix center offset error
Signed-off-by: AnErrupTion <anerruption@disroot.org>
This commit is contained in:
@@ -73,7 +73,7 @@ fn drawItem(label: *EnvironmentLabel, env: Env, x: usize, y: usize, width: usize
|
||||
const length = @min(env.environment.name.len, width - 3);
|
||||
if (length == 0) return;
|
||||
|
||||
const x_offset = if (label.text_in_center) (width - length) / 2 else 0;
|
||||
const x_offset = if (label.text_in_center) (width - length - 1) / 2 else 0;
|
||||
|
||||
label.item_width = length + x_offset;
|
||||
label.buffer.drawLabel(env.environment.name, x + x_offset, y);
|
||||
|
||||
Reference in New Issue
Block a user