func setLayoutSpacing(layout walk.Layout, spacing int, spacingZero bool) error { if !spacingZero && spacing == 0 { spacing = 6 } return layout.SetSpacing(spacing) }
func setLayoutMargins(layout walk.Layout, margins Margins, marginsZero bool) error { if !marginsZero && margins.isZero() { margins = Margins{9, 9, 9, 9} } return layout.SetMargins(margins.toW()) }