refactor: move from_client_box and to_client_box to Widget.Box
This commit is contained in:
parent
a6e1087773
commit
a1455e8e3d
4 changed files with 34 additions and 33 deletions
|
|
@ -95,7 +95,7 @@ pub fn handle_resize(self: *Self, pos: Widget.Box) void {
|
|||
self.plane.resize_simple(@intCast(pos.h), @intCast(pos.w)) catch return;
|
||||
self.box = pos;
|
||||
self.menu.container.resize(self.box);
|
||||
const client_box = self.menu.container.to_client_box(pos, padding);
|
||||
const client_box = pos.to_client_box(padding);
|
||||
self.view_rows = client_box.h;
|
||||
self.view_cols = client_box.w;
|
||||
self.update_scrollbar();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue