add(sizing): grow configuration
All checks were successful
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 1m14s
All checks were successful
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 1m14s
Currently the 'grid' and 'mixed' examples are not working yet.
This commit is contained in:
@@ -94,8 +94,8 @@ pub fn Scrollable(Event: type) type {
|
||||
this.size = size;
|
||||
|
||||
// TODO scrollbar space - depending on configuration and only if necessary?
|
||||
this.container_size = Point.max(size, this.container.fit_resize());
|
||||
this.container.resize(.{}, this.container_size);
|
||||
this.container.resize(.{}, this.size);
|
||||
this.container_size = this.container.size;
|
||||
}
|
||||
|
||||
fn handle(ctx: *anyopaque, event: Event) !void {
|
||||
@@ -206,7 +206,9 @@ test "scrollable vertical" {
|
||||
.direction = .vertical,
|
||||
.padding = .all(1),
|
||||
},
|
||||
.size = .{ .y = size.y + 15 },
|
||||
.size = .{
|
||||
.dim = .{ .y = size.y + 15 },
|
||||
},
|
||||
}, .{});
|
||||
try box.append(try .init(allocator, .{
|
||||
.rectangle = .{ .fill = .grey },
|
||||
@@ -281,7 +283,9 @@ test "scrollable horizontal" {
|
||||
.direction = .horizontal,
|
||||
.padding = .all(1),
|
||||
},
|
||||
.size = .{ .x = size.x + 15 },
|
||||
.size = .{
|
||||
.dim = .{ .x = size.x + 15 },
|
||||
},
|
||||
}, .{});
|
||||
try box.append(try .init(allocator, .{
|
||||
.rectangle = .{ .fill = .grey },
|
||||
|
||||
Reference in New Issue
Block a user