mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-07 18:35:34 +00:00
ui/layout,ui/app: fix tests, go fmt, update comments
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+10
-10
@@ -98,21 +98,21 @@ type window struct {
|
|||||||
notify struct {
|
notify struct {
|
||||||
read, write int
|
read, write int
|
||||||
}
|
}
|
||||||
ppdp, ppsp float32
|
ppdp, ppsp float32
|
||||||
scroll struct {
|
scroll struct {
|
||||||
time time.Duration
|
time time.Duration
|
||||||
steps image.Point
|
steps image.Point
|
||||||
dist f32.Point
|
dist f32.Point
|
||||||
}
|
}
|
||||||
lastPos f32.Point
|
lastPos f32.Point
|
||||||
lastTouch f32.Point
|
lastTouch f32.Point
|
||||||
|
|
||||||
fling struct {
|
fling struct {
|
||||||
yExtrapolation fling.Extrapolation
|
yExtrapolation fling.Extrapolation
|
||||||
xExtrapolation fling.Extrapolation
|
xExtrapolation fling.Extrapolation
|
||||||
anim fling.Animation
|
anim fling.Animation
|
||||||
start bool
|
start bool
|
||||||
dir f32.Point
|
dir f32.Point
|
||||||
}
|
}
|
||||||
|
|
||||||
stage Stage
|
stage Stage
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ func (c *Click) State() ClickState {
|
|||||||
return c.state
|
return c.state
|
||||||
}
|
}
|
||||||
|
|
||||||
// Next returns the next click event, if any.
|
// Events returns the next click event, if any.
|
||||||
func (c *Click) Events(q ui.Queue) []ClickEvent {
|
func (c *Click) Events(q ui.Queue) []ClickEvent {
|
||||||
var events []ClickEvent
|
var events []ClickEvent
|
||||||
for _, evt := range q.Events(c) {
|
for _, evt := range q.Events(c) {
|
||||||
|
|||||||
@@ -149,6 +149,6 @@ func (config) Px(v ui.Value) int {
|
|||||||
return int(v.V + .5)
|
return int(v.V + .5)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (queue) Next(k ui.Key) (ui.Event, bool) {
|
func (queue) Events(k ui.Key) []ui.Event {
|
||||||
return nil, false
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -66,7 +66,7 @@ const (
|
|||||||
|
|
||||||
const inf = 1e6
|
const inf = 1e6
|
||||||
|
|
||||||
// Init prepares the list for iterating through its children with Next.
|
// init prepares the list for iterating through its children with next.
|
||||||
func (l *List) init(gtx *Context, len int) {
|
func (l *List) init(gtx *Context, len int) {
|
||||||
if l.more() {
|
if l.more() {
|
||||||
panic("unfinished child")
|
panic("unfinished child")
|
||||||
|
|||||||
Reference in New Issue
Block a user