mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-07 10:25:37 +00:00
cmd: update to latest gioui.org/ui version
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
|
go 1.12
|
||||||
|
|
||||||
require (
|
require (
|
||||||
gioui.org/ui v0.0.0-20190621151416-0b6dd4efd95e
|
gioui.org/ui v0.0.0-20190622153657-4f94f1078a1e
|
||||||
github.com/google/go-github/v24 v24.0.1
|
github.com/google/go-github/v24 v24.0.1
|
||||||
golang.org/x/exp v0.0.0-20190321205749-f0864edee7f3
|
golang.org/x/exp v0.0.0-20190321205749-f0864edee7f3
|
||||||
golang.org/x/image v0.0.0-20190321063152-3fc05d484e9f
|
golang.org/x/image v0.0.0-20190321063152-3fc05d484e9f
|
||||||
|
|||||||
@@ -104,8 +104,6 @@ type ActionButton struct {
|
|||||||
Open bool
|
Open bool
|
||||||
icons []*icon
|
icons []*icon
|
||||||
sendIco *icon
|
sendIco *icon
|
||||||
btnClicker *gesture.Click
|
|
||||||
btnsClicker *gesture.Click
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@@ -259,8 +257,6 @@ func newApp(w *app.Window) *App {
|
|||||||
face: a.face(fonts.regular, 9),
|
face: a.face(fonts.regular, 9),
|
||||||
sendIco: &icon{src: icons.ContentSend, size: ui.Dp(24)},
|
sendIco: &icon{src: icons.ContentSend, size: ui.Dp(24)},
|
||||||
icons: []*icon{},
|
icons: []*icon{},
|
||||||
btnClicker: new(gesture.Click),
|
|
||||||
btnsClicker: new(gesture.Click),
|
|
||||||
}
|
}
|
||||||
a.edit2 = &text.Editor{
|
a.edit2 = &text.Editor{
|
||||||
Config: &a.cfg,
|
Config: &a.cfg,
|
||||||
@@ -539,8 +535,6 @@ func (a *App) layoutUsers(ops *ui.Ops, cs layout.Constraints) layout.Dimens {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (a *ActionButton) Layout(ops *ui.Ops, cs layout.Constraints) layout.Dimens {
|
func (a *ActionButton) Layout(ops *ui.Ops, cs layout.Constraints) layout.Dimens {
|
||||||
a.btnsClicker.Update(a.inputs)
|
|
||||||
a.btnClicker.Update(a.inputs)
|
|
||||||
c := a.config
|
c := a.config
|
||||||
fabCol := brandColor
|
fabCol := brandColor
|
||||||
f := layout.Flex{Axis: layout.Vertical, MainAxisAlignment: layout.Start, CrossAxisAlignment: layout.End, MainAxisSize: layout.Min}
|
f := layout.Flex{Axis: layout.Vertical, MainAxisAlignment: layout.Start, CrossAxisAlignment: layout.End, MainAxisSize: layout.Min}
|
||||||
@@ -550,7 +544,6 @@ func (a *ActionButton) Layout(ops *ui.Ops, cs layout.Constraints) layout.Dimens
|
|||||||
cs = in.Begin(ops, cs)
|
cs = in.Begin(ops, cs)
|
||||||
dims := fab(ops, cs, a.sendIco.image(c), fabCol, c.Dp(56))
|
dims := fab(ops, cs, a.sendIco.image(c), fabCol, c.Dp(56))
|
||||||
pointer.AreaEllipse(dims.Size).Add(ops)
|
pointer.AreaEllipse(dims.Size).Add(ops)
|
||||||
a.btnClicker.Add(ops)
|
|
||||||
dims = in.End(dims)
|
dims = in.End(dims)
|
||||||
return f.Layout(f.End(dims))
|
return f.Layout(f.End(dims))
|
||||||
}
|
}
|
||||||
@@ -576,8 +569,12 @@ func (a *App) layoutContributors(ops *ui.Ops, cs layout.Constraints) layout.Dime
|
|||||||
func (a *App) user(ops *ui.Ops, cs layout.Constraints, c *ui.Config, index int) layout.Dimens {
|
func (a *App) user(ops *ui.Ops, cs layout.Constraints, c *ui.Config, index int) layout.Dimens {
|
||||||
u := a.users[index]
|
u := a.users[index]
|
||||||
click := &a.userClicks[index]
|
click := &a.userClicks[index]
|
||||||
for _, r := range click.Update(a.inputs) {
|
for {
|
||||||
if r.Type == gesture.TypeClick {
|
e, ok := click.Next(a.inputs)
|
||||||
|
if !ok {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
if e.Type == gesture.TypeClick {
|
||||||
a.selectedUser = a.newUserPage(u)
|
a.selectedUser = a.newUserPage(u)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user