mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-04 00:45:35 +00:00
all: make pointer.Area an interface
With an interface instead of anonymous functions, amending an area's parameters can be done even after adding it to an OpHandler. This will be useful when we switch to serialized op lists. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -498,7 +498,7 @@ func (a *ActionButton) Layout(cs layout.Constraints) (ui.Op, layout.Dimens) {
|
||||
layout.Margins{Top: ui.Dp(4)},
|
||||
layout.F(func(cs layout.Constraints) (ui.Op, layout.Dimens) {
|
||||
op, dims := fab(c, a.sendIco.image(c), fabCol, ui.Dp(56)).Layout(cs)
|
||||
ops := ui.Ops{op, a.btnClicker.Op(gesture.Ellipse(dims.Size))}
|
||||
ops := ui.Ops{op, a.btnClicker.Op(&gesture.Ellipse{dims.Size})}
|
||||
return ops, dims
|
||||
}),
|
||||
))
|
||||
@@ -556,7 +556,7 @@ func (a *App) user(c *ui.Config, index int) layout.Widget {
|
||||
Layout()
|
||||
}),
|
||||
).Layout(cs)
|
||||
ops := ui.Ops{op, click.Op(gesture.Rect(dims.Size))}
|
||||
ops := ui.Ops{op, click.Op(&gesture.Rect{dims.Size})}
|
||||
return ops, dims
|
||||
}))
|
||||
return elem.Layout()
|
||||
|
||||
Reference in New Issue
Block a user