Поправлена панель настроек

This commit is contained in:
2026-02-25 19:14:06 +03:00
parent 0ee7be2002
commit 0d546782bb

View File

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