lint(container): style
Some checks failed
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 1m41s
Some checks failed
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 1m41s
This commit is contained in:
@@ -595,9 +595,7 @@ pub fn Container(comptime Event: type) type {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn deinit(this: *const @This()) void {
|
pub fn deinit(this: *const @This()) void {
|
||||||
for (this.elements.items) |*element| {
|
for (this.elements.items) |*element| element.deinit();
|
||||||
element.deinit();
|
|
||||||
}
|
|
||||||
this.elements.deinit();
|
this.elements.deinit();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -774,6 +772,7 @@ pub fn Container(comptime Event: type) type {
|
|||||||
|
|
||||||
for (this.elements.items) |child| {
|
for (this.elements.items) |child| {
|
||||||
if (child.properties.size.grow == .fixed) continue;
|
if (child.properties.size.grow == .fixed) continue;
|
||||||
|
|
||||||
switch (layout.direction) {
|
switch (layout.direction) {
|
||||||
.horizontal => if (child.properties.size.grow == .vertical) continue,
|
.horizontal => if (child.properties.size.grow == .vertical) continue,
|
||||||
.vertical => if (child.properties.size.grow == .horizontal) continue,
|
.vertical => if (child.properties.size.grow == .horizontal) continue,
|
||||||
@@ -795,10 +794,8 @@ pub fn Container(comptime Event: type) type {
|
|||||||
|
|
||||||
size_to_correct = @min(size_to_correct, remainder / growable_children);
|
size_to_correct = @min(size_to_correct, remainder / growable_children);
|
||||||
var overflow: u16 = 0;
|
var overflow: u16 = 0;
|
||||||
if (size_to_correct == 0 and remainder > 0) {
|
if (size_to_correct == 0 and remainder > 0) overflow = remainder;
|
||||||
// there is some overflow
|
|
||||||
overflow = remainder;
|
|
||||||
}
|
|
||||||
for (this.elements.items) |*child| {
|
for (this.elements.items) |*child| {
|
||||||
const child_size = switch (layout.direction) {
|
const child_size = switch (layout.direction) {
|
||||||
.horizontal => child.size.x,
|
.horizontal => child.size.x,
|
||||||
|
|||||||
Reference in New Issue
Block a user