mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-05 01:15:35 +00:00
widget/material: manage widget colors with Palette type
This introduces a new material.Palette type that captures the color information necessary to render a widget. This type is embedded in the material.Theme to make it easier to swap to a different palette for part of the UI by reassinging the Palette field. Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>
This commit is contained in:
@@ -18,8 +18,8 @@ func CheckBox(th *Theme, checkBox *widget.Bool, label string) CheckBoxStyle {
|
||||
CheckBox: checkBox,
|
||||
checkable: checkable{
|
||||
Label: label,
|
||||
Color: th.Color.Text,
|
||||
IconColor: th.Color.Primary,
|
||||
Color: th.Palette.Fg,
|
||||
IconColor: th.Palette.ContrastBg,
|
||||
TextSize: th.TextSize.Scale(14.0 / 16.0),
|
||||
Size: unit.Dp(26),
|
||||
shaper: th.Shaper,
|
||||
|
||||
Reference in New Issue
Block a user