mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-06 01:45:36 +00:00
io/semantic: [API] replace DisabledOp with EnabledOp
The double-negative DisabledOp is harder to understand than a straightforward EnabledOp. Note that the absence of an EnabledOp implies still means that the widget is enabled. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+1
-1
@@ -49,7 +49,7 @@ func (b *Bool) Layout(gtx layout.Context, w layout.Widget) layout.Dimensions {
|
||||
b.changed = true
|
||||
}
|
||||
semantic.SelectedOp(b.Value).Add(gtx.Ops)
|
||||
semantic.DisabledOp(gtx.Queue == nil).Add(gtx.Ops)
|
||||
semantic.EnabledOp(gtx.Queue != nil).Add(gtx.Ops)
|
||||
return w(gtx)
|
||||
})
|
||||
return dims
|
||||
|
||||
Reference in New Issue
Block a user