Fix numlock & capslock positioning

Signed-off-by: AnErrupTion <anerruption@disroot.org>
This commit is contained in:
AnErrupTion
2026-02-09 11:20:27 +01:00
parent 852a602032
commit d1810d8c98
2 changed files with 8 additions and 8 deletions

View File

@@ -1603,10 +1603,10 @@ fn positionComponents(state: *UiState) void {
.addYFromIf(state.clock_label.childrenPosition(), state.config.clock != null)
.removeYFromIf(state.edge_margin, state.config.clock != null)
.invertX(state.buffer.width)
.removeXIf(TerminalBuffer.strWidth(state.numlock_label.text), state.buffer.width > TerminalBuffer.strWidth(state.numlock_label.text) + state.edge_margin.x));
.removeXIf(TerminalBuffer.strWidth(state.lang.numlock), state.buffer.width > TerminalBuffer.strWidth(state.lang.numlock) + state.edge_margin.x));
state.capslock_label.positionX(state.numlock_label
.childrenPosition()
.removeX(TerminalBuffer.strWidth(state.numlock_label.text) + TerminalBuffer.strWidth(state.capslock_label.text) + 1));
.removeX(TerminalBuffer.strWidth(state.lang.numlock) + TerminalBuffer.strWidth(state.lang.capslock) + 1));
state.box.positionXY(TerminalBuffer.START_POSITION);