mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-04 00:45:35 +00:00
widget/material: better disabled color calculation
Use desaturation in combination with alpha multiplication. Signed-off-by: Egon Elbre <egonelbre@gmail.com>
This commit is contained in:
@@ -43,7 +43,7 @@ func (c *checkable) layout(gtx layout.Context, checked bool) layout.Dimensions {
|
||||
size := gtx.Px(c.Size)
|
||||
icon.Color = c.IconColor
|
||||
if gtx.Queue == nil {
|
||||
icon.Color = f32color.MulAlpha(icon.Color, 150)
|
||||
icon.Color = f32color.Disabled(icon.Color)
|
||||
}
|
||||
icon.Layout(gtx, unit.Px(float32(size)))
|
||||
return layout.Dimensions{
|
||||
|
||||
Reference in New Issue
Block a user