mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
widget/material: use font.Default
And simplify NewTheme to take no arguments. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
"image/color"
|
||||
|
||||
"gioui.org/f32"
|
||||
"gioui.org/font"
|
||||
"gioui.org/layout"
|
||||
"gioui.org/op"
|
||||
"gioui.org/op/paint"
|
||||
@@ -25,9 +26,9 @@ type Theme struct {
|
||||
TextSize unit.Value
|
||||
}
|
||||
|
||||
func NewTheme(shaper *text.Shaper) *Theme {
|
||||
func NewTheme() *Theme {
|
||||
t := &Theme{
|
||||
Shaper: shaper,
|
||||
Shaper: font.Default(),
|
||||
}
|
||||
t.Color.Primary = rgb(0x3f51b5)
|
||||
t.Color.Text = rgb(0x000000)
|
||||
|
||||
Reference in New Issue
Block a user