fix: WidgetStack should walk widgets from top to bottom
This commit is contained in:
parent
ecc9181894
commit
1ebd0795ba
1 changed files with 5 additions and 1 deletions
|
@ -92,7 +92,11 @@ pub fn resize(self: *Self, pos: Widget.Box) void {
|
|||
}
|
||||
|
||||
pub fn walk(self: *Self, walk_ctx: *anyopaque, f: Widget.WalkFn) bool {
|
||||
for (self.widgets.items) |*w|
|
||||
const len = self.widgets.items.len;
|
||||
for (0..len) |i| {
|
||||
const n = len - i - 1;
|
||||
const w = &self.widgets.items[n];
|
||||
if (w.walk(walk_ctx, f)) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue