mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-06 18:05:35 +00:00
io/input: [API] introduce Source, the interface between a Router and widgets
This change gets rid of the event.Queue interface by replacing it with input.Source values. Source provides the interface to Router necessary to implement interface widgets. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -61,7 +61,7 @@ func (e EditorStyle) Layout(gtx layout.Context) layout.Dimensions {
|
||||
paint.ColorOp{Color: e.HintColor}.Add(gtx.Ops)
|
||||
hintColor := hintColorMacro.Stop()
|
||||
selectionColorMacro := op.Record(gtx.Ops)
|
||||
paint.ColorOp{Color: blendDisabledColor(gtx.Source == nil, e.SelectionColor)}.Add(gtx.Ops)
|
||||
paint.ColorOp{Color: blendDisabledColor(!gtx.Enabled(), e.SelectionColor)}.Add(gtx.Ops)
|
||||
selectionColor := selectionColorMacro.Stop()
|
||||
|
||||
var maxlines int
|
||||
|
||||
Reference in New Issue
Block a user