refactor: simplify Plane/Widget usage
This commit is contained in:
parent
62cd53c0f3
commit
4145460012
15 changed files with 64 additions and 50 deletions
|
@ -53,7 +53,7 @@ pub fn create(allocator: Allocator, parent: Plane) !Widget {
|
|||
.plane = try Plane.init(&(Widget.Box{}).opts(name), parent),
|
||||
.logger = log.logger(@typeName(Self)),
|
||||
.entries = std.ArrayList(Entry).init(allocator),
|
||||
.menu = try Menu.create(*Self, allocator, tui.current().mainview, .{
|
||||
.menu = try Menu.create(*Self, allocator, tui.plane(), .{
|
||||
.ctx = self,
|
||||
.on_render = handle_render_menu,
|
||||
.on_scroll = EventHandler.bind(self, Self.handle_scroll),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue