apps: update to new material api

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2019-07-05 16:59:45 +02:00
parent 86bc3e612d
commit e3629cc0fb
3 changed files with 43 additions and 40 deletions
+3 -1
View File
@@ -55,8 +55,10 @@ func loop(w *app.Window) {
cfg = e.Config
cs := layout.ExactConstraints(w.Size())
ops.Reset()
ops.Begin()
draw.ColorOp{Col: maroon}.Add(ops)
text.Label{Face: face, Alignment: text.Center, Text: message}.Layout(ops, cs)
material := ops.End()
text.Label{Material: material, Face: face, Alignment: text.Center, Text: message}.Layout(ops, cs)
w.Draw(ops)
faces.Frame()
}