diff options
| author | Gabriel Schneider <[email protected]> | 2026-07-03 18:49:00 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-08-01 15:02:07 -0300 |
| commit | a354d34329de597b80943c78e2afd84f235ee505 (patch) | |
| tree | 6b161ea390a60864dd284a7b17dd8f025269567f /replay.zig | |
| parent | f3b62fe53b19e36f21f8020831718cbf095d6a7b (diff) | |
| download | pardes-a354d34329de597b80943c78e2afd84f235ee505.tar.gz pardes-a354d34329de597b80943c78e2afd84f235ee505.zip | |
improving layout
Diffstat (limited to 'replay.zig')
| -rw-r--r-- | replay.zig | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -165,6 +165,10 @@ fn paneVWeight(panes: []const Pane, id: usize) ?f32 { return panes[id].vweight; } +fn setPaneVWeight(panes: []Pane, id: usize, weight: f32) void { + panes[id].vweight = weight; +} + fn renderPane(alloc: std.mem.Allocator, root: ui.Window, p: *Pane, r: Rect, active: bool) !void { if (r.w <= GUTTER or r.h == 0) return; const text = root.child(.{ .x_off = r.x + GUTTER, .y_off = r.y, .width = r.w - GUTTER, .height = r.h }); @@ -629,7 +633,7 @@ const App = struct { self.panes[b].vweight = pair - self.panes[a].vweight; } }, - .move => |d| moveTerm(&self.layout, &self.rects, &self.col_x, &self.col_w, d.id, d.cur_x, d.cur_y), + .move => |d| moveTerm(&self.layout, self.panes, &self.rects, &self.col_x, &self.col_w, d.id, d.cur_x, d.cur_y, setPaneVWeight), .none => {}, } self.drag = .none; |
