mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
{gesture,widget}: expose Dragging
Knowing whether a widget is being interacted with allows to implement bi-directional updates without feedbacks. Signed-off-by: Egon Elbre <egonelbre@gmail.com>
This commit is contained in:
@@ -21,6 +21,9 @@ type Float struct {
|
||||
changed bool
|
||||
}
|
||||
|
||||
// Dragging returns whether the value is being interacted with.
|
||||
func (f *Float) Dragging() bool { return f.drag.Dragging() }
|
||||
|
||||
// Layout processes events.
|
||||
func (f *Float) Layout(gtx layout.Context, pointerMargin int, min, max float32) layout.Dimensions {
|
||||
size := gtx.Constraints.Min
|
||||
|
||||
Reference in New Issue
Block a user