feat: allow closing the panel view by dragging down
This commit is contained in:
parent
3ca4d06cc4
commit
55fb6d29a0
1 changed files with 5 additions and 1 deletions
|
@ -160,8 +160,12 @@ fn bottom_bar_primary_drag(self: *Self, y: usize) tp.result {
|
||||||
break :blk self.panels.?;
|
break :blk self.panels.?;
|
||||||
};
|
};
|
||||||
const h = self.plane.dim_y();
|
const h = self.plane.dim_y();
|
||||||
self.panel_height = @max(2, h - @min(h, y + 1));
|
self.panel_height = @max(1, h - @min(h, y + 1));
|
||||||
panels.layout = .{ .static = self.panel_height.? };
|
panels.layout = .{ .static = self.panel_height.? };
|
||||||
|
if (self.panel_height == 1) {
|
||||||
|
self.panel_height = null;
|
||||||
|
command.executeName("toggle_panel", .{}) catch {};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn toggle_panel_view(self: *Self, view: anytype, enable_only: bool) !void {
|
fn toggle_panel_view(self: *Self, view: anytype, enable_only: bool) !void {
|
||||||
|
|
Loading…
Add table
Reference in a new issue