widget/material: allow configuring default typeface on theme

This commit introduces the material.Theme.Face field, which will automatically
populate the Font.Typeface in every text widget created using a constructor function
in package material.

Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>
This commit is contained in:
Chris Waldon
2023-06-22 15:06:22 -04:00
committed by Elias Naur
parent 6384ab6087
commit acab582487
6 changed files with 19 additions and 5 deletions
+4 -1
View File
@@ -33,7 +33,10 @@ type EditorStyle struct {
func Editor(th *Theme, editor *widget.Editor, hint string) EditorStyle {
return EditorStyle{
Editor: editor,
Editor: editor,
Font: font.Font{
Typeface: th.Face,
},
TextSize: th.TextSize,
Color: th.Palette.Fg,
shaper: th.Shaper,