mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-05 01:15:35 +00:00
apps: use DrawEvent.Size instead of Window.Size
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-20190713112858-112368a2e39a
|
||||
gioui.org/ui v0.0.0-20190714110834-6e97d65af145
|
||||
github.com/google/go-github/v24 v24.0.1
|
||||
golang.org/x/exp v0.0.0-20190627132806-fd42eb6b336f
|
||||
golang.org/x/image v0.0.0-20190703141733-d6a02ce849c9
|
||||
|
||||
@@ -228,7 +228,7 @@ func (a *App) run() error {
|
||||
case app.DrawEvent:
|
||||
ops.Reset()
|
||||
a.cfg = e.Config
|
||||
cs := layout.ExactConstraints(a.w.Size())
|
||||
cs := layout.ExactConstraints(e.Size)
|
||||
a.Layout(ops, cs)
|
||||
if a.profiling {
|
||||
a.layoutTimings(ops, cs)
|
||||
|
||||
+1
-1
@@ -52,7 +52,7 @@ func loop(w *app.Window) error {
|
||||
return e.Err
|
||||
case app.DrawEvent:
|
||||
cfg = e.Config
|
||||
cs := layout.ExactConstraints(w.Size())
|
||||
cs := layout.ExactConstraints(e.Size)
|
||||
ops.Reset()
|
||||
ops.Begin()
|
||||
draw.ColorOp{Color: maroon}.Add(ops)
|
||||
|
||||
Reference in New Issue
Block a user