diff options
| author | Sam Anthony <sam@samanthony.xyz> | 2026-03-03 14:29:13 -0500 |
|---|---|---|
| committer | Sam Anthony <sam@samanthony.xyz> | 2026-03-03 14:29:13 -0500 |
| commit | 474f4984f8be450524eedd3e89bcbfdfa1b4f516 (patch) | |
| tree | f36f3f23dddeecb5d281c5146265a5b357b92039 /lay/strain/solve.go | |
| parent | 0a0b9b8cc9cdc0ffe1819de0266dd1e3c3eb564f (diff) | |
| download | gui-474f4984f8be450524eedd3e89bcbfdfa1b4f516.zip | |
fix compiler errors
Diffstat (limited to 'lay/strain/solve.go')
| -rw-r--r-- | lay/strain/solve.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lay/strain/solve.go b/lay/strain/solve.go index e1a89d8..7fd3c03 100644 --- a/lay/strain/solve.go +++ b/lay/strain/solve.go @@ -146,9 +146,9 @@ func (s *Solver) addSizeConstraint(constr Constraint, fieldIdx int) error { fieldConstrs := &s.fieldSizeConstrs[fieldIdx] // Clear mutually exclusive constraints and replace with new one - switch constr.Dim { + switch constr.Dimension { case Width: - width := s.style.Pixels(constr.Value).Round() + width := float64(s.style.Pixels(constr.Value).Round()) switch constr.Op { case casso.EQ: s.removeConstraints(fieldConstrs.widthEq, fieldConstrs.widthGte, fieldConstrs.widthLte) @@ -175,7 +175,7 @@ func (s *Solver) addSizeConstraint(constr Constraint, fieldIdx int) error { panic(fmt.Sprintf("unreachable: impossible %T: %v", constr.Op, constr.Op)) } case Height: - height := s.style.Pixels(constr.Value).Round() + height := float64(s.style.Pixels(constr.Value).Round()) switch constr.Op { case casso.EQ: s.removeConstraints(fieldConstrs.heightEq, fieldConstrs.heightGte, fieldConstrs.heightLte) @@ -202,7 +202,7 @@ func (s *Solver) addSizeConstraint(constr Constraint, fieldIdx int) error { panic(fmt.Sprintf("unreachable: impossible %T: %v", constr.Op, constr.Op)) } default: - panic(fmt.Sprintf("unreachable: impossible %T: %v", constr.Dim, constr.Dim)) + panic(fmt.Sprintf("unreachable: impossible %T: %v", constr.Dimension, constr.Dimension)) } return nil |