mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-03 08:25:34 +00:00
cmd: update to latest API
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+1
-1
@@ -3,7 +3,7 @@ module gioui.org/apps
|
||||
go 1.12
|
||||
|
||||
require (
|
||||
gioui.org/ui v0.0.0-20190621150145-7aa7bb3be408
|
||||
gioui.org/ui v0.0.0-20190621151416-0b6dd4efd95e
|
||||
github.com/google/go-github/v24 v24.0.1
|
||||
golang.org/x/exp v0.0.0-20190321205749-f0864edee7f3
|
||||
golang.org/x/image v0.0.0-20190321063152-3fc05d484e9f
|
||||
|
||||
@@ -179,7 +179,7 @@ func (a *App) run() error {
|
||||
switch e := e.(type) {
|
||||
case input.Event:
|
||||
a.inputs.Add(e)
|
||||
if e, ok := e.(key.Chord); ok {
|
||||
if e, ok := e.(key.ChordEvent); ok {
|
||||
switch e.Name {
|
||||
case key.NameEscape:
|
||||
os.Exit(0)
|
||||
@@ -189,7 +189,7 @@ func (a *App) run() error {
|
||||
}
|
||||
}
|
||||
}
|
||||
case app.ChangeStage:
|
||||
case app.StageEvent:
|
||||
if e.Stage >= app.StageRunning {
|
||||
if a.ctxCancel == nil {
|
||||
a.ctx, a.ctxCancel = context.WithCancel(context.Background())
|
||||
@@ -203,7 +203,7 @@ func (a *App) run() error {
|
||||
a.ctxCancel = nil
|
||||
}
|
||||
}
|
||||
case *app.Command:
|
||||
case *app.CommandEvent:
|
||||
switch e.Type {
|
||||
case app.CommandBack:
|
||||
if a.selectedUser != nil {
|
||||
@@ -211,7 +211,7 @@ func (a *App) run() error {
|
||||
e.Cancel = true
|
||||
}
|
||||
}
|
||||
case app.Draw:
|
||||
case app.DrawEvent:
|
||||
ops.Reset()
|
||||
a.cfg = e.Config
|
||||
cs := layout.ExactConstraints(a.w.Size())
|
||||
|
||||
+1
-1
@@ -51,7 +51,7 @@ func loop(w *app.Window) {
|
||||
for w.IsAlive() {
|
||||
e := <-w.Events()
|
||||
switch e := e.(type) {
|
||||
case app.Draw:
|
||||
case app.DrawEvent:
|
||||
cfg = e.Config
|
||||
cs := layout.ExactConstraints(w.Size())
|
||||
ops.Reset()
|
||||
|
||||
Reference in New Issue
Block a user