forked from joejulian/gio
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:
@@ -60,7 +60,7 @@ func (c *checkable) layout(gtx layout.Context, checked, hovered bool) layout.Dim
|
||||
return layout.UniformInset(2).Layout(gtx, func(gtx layout.Context) layout.Dimensions {
|
||||
size := gtx.Dp(c.Size)
|
||||
col := c.IconColor
|
||||
if gtx.Source == nil {
|
||||
if !gtx.Enabled() {
|
||||
col = f32color.Disabled(col)
|
||||
}
|
||||
gtx.Constraints.Min = image.Point{X: size}
|
||||
|
||||
Reference in New Issue
Block a user