Skip to content

Commit ccec524

Browse files
authored
Fix: FormView setting row spacing & layout pin anchor (#229)
1 parent 4533128 commit ccec524

File tree

4 files changed

+3
-22
lines changed

4 files changed

+3
-22
lines changed

go.mod

+1-8
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,4 @@ module github.com/progrium/macdriver
22

33
go 1.18
44

5-
require github.com/go-test/deep v1.1.0
6-
7-
require (
8-
github.com/yuin/goldmark v1.5.5 // indirect
9-
golang.org/x/mod v0.12.0 // indirect
10-
golang.org/x/sys v0.11.0 // indirect
11-
golang.org/x/tools v0.12.0 // indirect
12-
)
5+
require github.com/go-test/deep v1.1.0

go.sum

-10
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,2 @@
11
github.com/go-test/deep v1.1.0 h1:WOcxcdHcvdgThNXjw0t76K42FXTU7HpNQWHpA2HHNlg=
22
github.com/go-test/deep v1.1.0/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE=
3-
github.com/yuin/goldmark v1.4.13 h1:fVcFKWvrslecOb/tg+Cc05dkeYx540o0FuFt3nUVDoE=
4-
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
5-
github.com/yuin/goldmark v1.5.5 h1:IJznPe8wOzfIKETmMkd06F8nXkmlhaHqFRM9l1hAGsU=
6-
github.com/yuin/goldmark v1.5.5/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
7-
golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc=
8-
golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
9-
golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM=
10-
golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
11-
golang.org/x/tools v0.12.0 h1:YW6HUoUmYBpwSgyaGaZq1fHjrBjX1rlpZ54T6mu2kss=
12-
golang.org/x/tools v0.12.0/go.mod h1:Sc0INKfu04TlqNoRA1hgpFZbhYXHPr4V5DzpSBTPqQM=

helper/layout/layout.go

+1-3
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,7 @@ func AliginCenterY(view appkit.IView, targetView appkit.IView) {
5050
}
5151

5252
func PinAnchorTo(anchor appkit.ILayoutAnchor, targetAncor appkit.ILayoutAnchor, offset float64) {
53-
// we do this because this method was not added to ILayoutAnchor, but we
54-
// added it to LayoutAnchor manually
55-
anchor.(appkit.LayoutAnchor).ConstraintEqualToAnchorConstant(targetAncor, offset).SetActive(true)
53+
anchor.ConstraintEqualToAnchorConstant(targetAncor, offset).SetActive(true)
5654
}
5755

5856
// PinEdgesToSuperView set view's insets to it's super view.

helper/widgets/form_view.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ func (f *FormView) InsertRow(index int, name string, control appkit.IControl) {
5656

5757
// SetRowSpacing set spacing between rows.
5858
func (f *FormView) SetRowSpacing(spacing float64) {
59-
f.SetRowSpacing(spacing)
59+
f.GridView.SetRowSpacing(spacing)
6060
}
6161

6262
// SetLabelWidth set width for labels

0 commit comments

Comments
 (0)