mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-05 09:25:38 +00:00
text,font/gofont: replace text.Collection with slice of FontFaces
A slice of FontFace pairs are simpler, and thread safe in case a client wants to append or modify the font collection. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -29,9 +29,9 @@ type Theme struct {
|
||||
radioUncheckedIcon *widget.Icon
|
||||
}
|
||||
|
||||
func NewTheme(col *text.Collection) *Theme {
|
||||
func NewTheme(fontCollection []text.FontFace) *Theme {
|
||||
t := &Theme{
|
||||
Shaper: text.NewCache(col),
|
||||
Shaper: text.NewCache(fontCollection),
|
||||
}
|
||||
t.Color.Primary = rgb(0x3f51b5)
|
||||
t.Color.Text = rgb(0x000000)
|
||||
|
||||
Reference in New Issue
Block a user