mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-05 01:15: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:
@@ -17,7 +17,7 @@ type RadioButtonStyle struct {
|
||||
// RadioButton returns a RadioButton with a label. The key specifies
|
||||
// the value for the Enum.
|
||||
func RadioButton(th *Theme, group *widget.Enum, key, label string) RadioButtonStyle {
|
||||
return RadioButtonStyle{
|
||||
r := RadioButtonStyle{
|
||||
Group: group,
|
||||
checkable: checkable{
|
||||
Label: label,
|
||||
@@ -32,6 +32,8 @@ func RadioButton(th *Theme, group *widget.Enum, key, label string) RadioButtonSt
|
||||
},
|
||||
Key: key,
|
||||
}
|
||||
r.checkable.Font.Typeface = th.Face
|
||||
return r
|
||||
}
|
||||
|
||||
// Layout updates enum and displays the radio button.
|
||||
|
||||
Reference in New Issue
Block a user