Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: FormView setting row spacing infinite loop & layout pin anchor remove cast appkit.LayoutAnchor #229

Merged
merged 1 commit into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,4 @@ module github.com/progrium/macdriver

go 1.18

require github.com/go-test/deep v1.1.0

require (
github.com/yuin/goldmark v1.5.5 // indirect
golang.org/x/mod v0.12.0 // indirect
golang.org/x/sys v0.11.0 // indirect
golang.org/x/tools v0.12.0 // indirect
)
require github.com/go-test/deep v1.1.0
10 changes: 0 additions & 10 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,12 +1,2 @@
github.com/go-test/deep v1.1.0 h1:WOcxcdHcvdgThNXjw0t76K42FXTU7HpNQWHpA2HHNlg=
github.com/go-test/deep v1.1.0/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE=
github.com/yuin/goldmark v1.4.13 h1:fVcFKWvrslecOb/tg+Cc05dkeYx540o0FuFt3nUVDoE=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
github.com/yuin/goldmark v1.5.5 h1:IJznPe8wOzfIKETmMkd06F8nXkmlhaHqFRM9l1hAGsU=
github.com/yuin/goldmark v1.5.5/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc=
golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM=
golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/tools v0.12.0 h1:YW6HUoUmYBpwSgyaGaZq1fHjrBjX1rlpZ54T6mu2kss=
golang.org/x/tools v0.12.0/go.mod h1:Sc0INKfu04TlqNoRA1hgpFZbhYXHPr4V5DzpSBTPqQM=
4 changes: 1 addition & 3 deletions helper/layout/layout.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,7 @@ func AliginCenterY(view appkit.IView, targetView appkit.IView) {
}

func PinAnchorTo(anchor appkit.ILayoutAnchor, targetAncor appkit.ILayoutAnchor, offset float64) {
// we do this because this method was not added to ILayoutAnchor, but we
// added it to LayoutAnchor manually
anchor.(appkit.LayoutAnchor).ConstraintEqualToAnchorConstant(targetAncor, offset).SetActive(true)
anchor.ConstraintEqualToAnchorConstant(targetAncor, offset).SetActive(true)
}

// PinEdgesToSuperView set view's insets to it's super view.
Expand Down
2 changes: 1 addition & 1 deletion helper/widgets/form_view.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func (f *FormView) InsertRow(index int, name string, control appkit.IControl) {

// SetRowSpacing set spacing between rows.
func (f *FormView) SetRowSpacing(spacing float64) {
f.SetRowSpacing(spacing)
f.GridView.SetRowSpacing(spacing)
}

// SetLabelWidth set width for labels
Expand Down