From 0d546782bba6c52ea65e8b8589ddf82973e19beb Mon Sep 17 00:00:00 2001 From: Roman Pytkov Date: Wed, 25 Feb 2026 19:14:06 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BE=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B0=20=D0=BF=D0=B0=D0=BD=D0=B5=D0=BB=D1=8C=20?= =?UTF-8?q?=D0=BD=D0=B0=D1=81=D1=82=D1=80=D0=BE=D0=B5=D0=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ui/left_panel.zig | 52 ++++++++++++++++++++++--------------------- 1 file changed, 27 insertions(+), 25 deletions(-) diff --git a/src/ui/left_panel.zig b/src/ui/left_panel.zig index 63329d1..06af973 100644 --- a/src/ui/left_panel.zig +++ b/src/ui/left_panel.zig @@ -66,31 +66,6 @@ pub fn leftPanel(ctx: *WindowContext) void { }, ); { - // Верхняя часть: дерево объектов - var tree_section = dvui.box( - @src(), - .{ .dir = .vertical }, - .{ - .expand = .both, - .padding = dvui.Rect.all(panel_padding), - .corner_radius = dvui.Rect.all(panel_radius), - .color_fill = fill_color, - .background = true, - }, - ); - { - dvui.label(@src(), "Objects", .{}, .{}); - var scroll = dvui.scrollArea( - @src(), - .{ .vertical = .auto }, - .{ .expand = .vertical, .background = false }, - ); - { - objectTree(ctx); - } - scroll.deinit(); - } - tree_section.deinit(); // Нижняя часть: настройки var settings_section = dvui.box( @@ -98,6 +73,7 @@ pub fn leftPanel(ctx: *WindowContext) void { .{ .dir = .vertical }, .{ .expand = .horizontal, + .gravity_y = 1.0, .margin = .{ .y = 5 }, .padding = dvui.Rect.all(panel_padding), .corner_radius = dvui.Rect.all(panel_radius), @@ -130,6 +106,32 @@ pub fn leftPanel(ctx: *WindowContext) void { } } settings_section.deinit(); + + // Верхняя часть: дерево объектов + var tree_section = dvui.box( + @src(), + .{ .dir = .vertical }, + .{ + .expand = .both, + .padding = dvui.Rect.all(panel_padding), + .corner_radius = dvui.Rect.all(panel_radius), + .color_fill = fill_color, + .background = true, + }, + ); + { + dvui.label(@src(), "Objects", .{}, .{}); + var scroll = dvui.scrollArea( + @src(), + .{ .vertical = .auto }, + .{ .expand = .both, .background = false }, + ); + { + objectTree(ctx); + } + scroll.deinit(); + } + tree_section.deinit(); } panel.deinit(); }