mirror of
https://codeberg.org/fairyglade/ly.git
synced 2026-08-22 13:34:19 +02:00
horizontal align custom binds
This commit is contained in:
parent
e82972f3db
commit
f54bc677f1
1 changed files with 8 additions and 3 deletions
11
src/main.zig
11
src/main.zig
|
|
@ -1893,9 +1893,14 @@ fn positionWidgets(ptr: *anyopaque) !void {
|
|||
state.brightness_up_label.positionXY(last_label
|
||||
.childrenPosition()
|
||||
.addX(1));
|
||||
for (state.custom_binds.items, 1..) |*item, i| {
|
||||
item.lbl.positionXY(state.edge_margin
|
||||
.addY(@intCast(i)));
|
||||
for (state.custom_binds.items, 0..) |*item, i| {
|
||||
if (i == 0)
|
||||
item.lbl.positionXY(state.edge_margin
|
||||
.addY(1))
|
||||
else
|
||||
item.lbl.positionXY(state.custom_binds.items[i-1].lbl.childrenPosition()
|
||||
.addX(1)
|
||||
.removeY(1));
|
||||
}
|
||||
}
|
||||
for (state.custom_info.items, 0..) |*item, i| {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue