mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-04 17:05:38 +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"
|
"image/color"
|
||||||
|
|
||||||
"gioui.org/f32"
|
"gioui.org/f32"
|
||||||
|
"gioui.org/font"
|
||||||
"gioui.org/layout"
|
"gioui.org/layout"
|
||||||
"gioui.org/op"
|
"gioui.org/op"
|
||||||
"gioui.org/op/paint"
|
"gioui.org/op/paint"
|
||||||
@@ -25,9 +26,9 @@ type Theme struct {
|
|||||||
TextSize unit.Value
|
TextSize unit.Value
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewTheme(shaper *text.Shaper) *Theme {
|
func NewTheme() *Theme {
|
||||||
t := &Theme{
|
t := &Theme{
|
||||||
Shaper: shaper,
|
Shaper: font.Default(),
|
||||||
}
|
}
|
||||||
t.Color.Primary = rgb(0x3f51b5)
|
t.Color.Primary = rgb(0x3f51b5)
|
||||||
t.Color.Text = rgb(0x000000)
|
t.Color.Text = rgb(0x000000)
|
||||||
|
|||||||
Reference in New Issue
Block a user