Пример #1
0
func setLayoutSpacing(layout walk.Layout, spacing int, spacingZero bool) error {
	if !spacingZero && spacing == 0 {
		spacing = 6
	}

	return layout.SetSpacing(spacing)
}
Пример #2
0
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())
}