mirror of
https://github.com/vsariola/sointu.git
synced 2025-06-04 01:28:45 -04:00
17 lines
309 B
Go
17 lines
309 B
Go
package gioui
|
|
|
|
import "gioui.org/layout"
|
|
|
|
// general helpers for layout that do not belong to any specific widget
|
|
|
|
func EmptyWidget() layout.Spacer {
|
|
return layout.Spacer{}
|
|
}
|
|
|
|
func OnlyIf(condition bool, widget layout.Widget) layout.Widget {
|
|
if condition {
|
|
return widget
|
|
}
|
|
return EmptyWidget().Layout
|
|
}
|