mod(size): rename merge function to add; new max function
All checks were successful
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 1m6s
All checks were successful
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 1m6s
This commit is contained in:
@@ -595,7 +595,7 @@ pub fn Container(comptime Event: type) type {
|
||||
const len: u16 = @truncate(this.elements.items.len);
|
||||
if (len > 0) {
|
||||
for (this.elements.items) |element| {
|
||||
size = size.merge(element.minSize());
|
||||
size = size.add(element.minSize());
|
||||
}
|
||||
var gap = this.properties.layout.gap;
|
||||
if (this.properties.layout.separator.enabled) gap += 1;
|
||||
@@ -605,10 +605,7 @@ pub fn Container(comptime Event: type) type {
|
||||
.vertical => size.rows += gap * (len - 1),
|
||||
}
|
||||
}
|
||||
return .{
|
||||
.cols = @max(size.cols, this.properties.min_size.cols),
|
||||
.rows = @max(size.rows, this.properties.min_size.rows),
|
||||
};
|
||||
return size.max(this.properties.min_size);
|
||||
}
|
||||
|
||||
pub fn handle(this: *@This(), event: Event) !void {
|
||||
|
||||
Reference in New Issue
Block a user