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
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:
11
src/main.zig
11
src/main.zig
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user