feat(content): scrollable contents; bump zterm dependency
All checks were successful
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 1m23s

With functional increments in `zterm`'s `Scrollable` `Element`, an
implementation (such as `Content`) can provide a size hint for the
minimal required size to dynamically change its dimensions for the
scrollable `Container` in the `Scrollable` `Element`.
This commit is contained in:
2025-11-01 14:44:05 +01:00
parent 8ac6c16289
commit 74bf941820
4 changed files with 47 additions and 10 deletions

View File

@@ -59,13 +59,16 @@ pub fn main() !void {
}
// main actual tui_website page content
{
// intermediate container for *padding*
var content: Content = .init(allocator);
var content_container: App.Container = try .init(allocator, .{
const content_container: App.Container = try .init(allocator, .{}, content.element());
var scrollable: App.Scrollable = .init(content_container, .enabled(.green));
// intermediate container for *padding* containing the scrollable `Content`
var scrollable_container: App.Container = try .init(allocator, .{
.layout = .{ .padding = .horizontal(2) },
}, .{});
try content_container.append(try .init(allocator, .{}, content.element()));
try container.append(content_container);
try scrollable_container.append(try .init(allocator, .{}, scrollable.element()));
try container.append(scrollable_container);
}
// footer
{