refactor: move from_client_box and to_client_box to Widget.Box

This commit is contained in:
CJ van den Berg 2025-11-30 22:49:05 +01:00
parent a6e1087773
commit a1455e8e3d
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
4 changed files with 34 additions and 33 deletions

View file

@ -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();