示例#1
0
文件: layouts.go 项目: kumakichi/walk
func setLayoutSpacing(layout walk.Layout, spacing int, spacingZero bool) error {
	if !spacingZero && spacing == 0 {
		spacing = 6
	}

	return layout.SetSpacing(spacing)
}
示例#2
0
文件: layouts.go 项目: kumakichi/walk
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())
}