mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-04 00:45:35 +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:
@@ -7,6 +7,7 @@ import (
|
||||
|
||||
"golang.org/x/exp/shiny/materialdesign/icons"
|
||||
|
||||
"gioui.org/font"
|
||||
"gioui.org/text"
|
||||
"gioui.org/unit"
|
||||
"gioui.org/widget"
|
||||
@@ -41,6 +42,8 @@ type Theme struct {
|
||||
RadioChecked *widget.Icon
|
||||
RadioUnchecked *widget.Icon
|
||||
}
|
||||
// Face selects the default typeface for text.
|
||||
Face font.Typeface
|
||||
|
||||
// FingerSize is the minimum touch target size.
|
||||
FingerSize unit.Dp
|
||||
|
||||
Reference in New Issue
Block a user