progrium / darwinkit

Native Mac APIs for Go. Previously known as MacDriver
MIT License
4.99k stars 158 forks source link

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

Closed Charliego3 closed 8 months ago

Charliego3 commented 10 months ago
  1. FormView embedding appkit.GridView, But GridView itself has a SetRowSpacing method, so the SetRowSpacing method of GridView should be called in FormView, Otherwise it will lead to an infinite loop. effect: f.GridView.SetRowSpacing(spacing)
  2. appkit.ILayoutAnchor now has the ConstraintEqualToAnchorConstant method. There is no need to cast it to appkit.LayoutAnchor, otherwise it will cause panic, because for example, the return value of view.TopAnchor() is appkit.LayoutYAxisAnchor instead of appkit.LayoutAnchor. If forced conversion is performed, will cause panic
progrium commented 8 months ago

Awesome, sorry I missed this until now. Thanks!