diff --git a/widget/widget.go b/widget/widget.go index fb38511750..557e999031 100644 --- a/widget/widget.go +++ b/widget/widget.go @@ -11,6 +11,8 @@ import ( // BaseWidget provides a helper that handles basic widget behaviours. type BaseWidget struct { + noCopy noCopy // so `go vet` can complain if a widget is passed by value (copied) + size fyne.Size position fyne.Position Hidden bool @@ -212,3 +214,9 @@ const ( // Since: 2.5 Adaptive Orientation = 2 ) + +type noCopy struct{} + +func (*noCopy) Lock() {} + +func (*noCopy) Unlock() {}