From 8cd4c2e5de659d42a9488123906d0d4e5ded11d2 Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Sun, 13 Oct 2019 18:23:39 +0200 Subject: [PATCH] widget/material: use font.Default And simplify NewTheme to take no arguments. Signed-off-by: Elias Naur --- widget/material/material.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/widget/material/material.go b/widget/material/material.go index 10042b21..0ca180c1 100644 --- a/widget/material/material.go +++ b/widget/material/material.go @@ -8,6 +8,7 @@ import ( "image/color" "gioui.org/f32" + "gioui.org/font" "gioui.org/layout" "gioui.org/op" "gioui.org/op/paint" @@ -25,9 +26,9 @@ type Theme struct { TextSize unit.Value } -func NewTheme(shaper *text.Shaper) *Theme { +func NewTheme() *Theme { t := &Theme{ - Shaper: shaper, + Shaper: font.Default(), } t.Color.Primary = rgb(0x3f51b5) t.Color.Text = rgb(0x000000)