mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-06 01:45:36 +00:00
all: rename more *layout.Context names to gtx
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -77,7 +77,7 @@ func initProfiling() {
|
||||
|
||||
func (a *App) run() error {
|
||||
a.ui.profiling = *stats
|
||||
c := &layout.Context{
|
||||
gtx := &layout.Context{
|
||||
Queue: a.w.Queue(),
|
||||
}
|
||||
for {
|
||||
@@ -127,9 +127,9 @@ func (a *App) run() error {
|
||||
}
|
||||
}
|
||||
case app.UpdateEvent:
|
||||
c.Reset(&e.Config, layout.RigidConstraints(e.Size))
|
||||
a.ui.Layout(c)
|
||||
a.w.Update(c.Ops)
|
||||
gtx.Reset(&e.Config, layout.RigidConstraints(e.Size))
|
||||
a.ui.Layout(gtx)
|
||||
a.w.Update(gtx.Ops)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,12 +19,12 @@ func BenchmarkUI(b *testing.B) {
|
||||
fetch := func(_ string) {}
|
||||
u := newUI(fetch)
|
||||
cfg := new(config)
|
||||
c := &layout.Context{
|
||||
gtx := &layout.Context{
|
||||
Queue: new(queue),
|
||||
}
|
||||
for i := 0; i < b.N; i++ {
|
||||
c.Reset(cfg, layout.RigidConstraints(image.Point{800, 600}))
|
||||
u.Layout(c)
|
||||
gtx.Reset(cfg, layout.RigidConstraints(image.Point{800, 600}))
|
||||
u.Layout(gtx)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user