mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-03 08:25:34 +00:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user