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:
@@ -55,7 +55,7 @@ func (s SwitchStyle) Layout(gtx layout.Context) layout.Dimensions {
|
||||
col = s.Color.Enabled
|
||||
}
|
||||
if gtx.Queue == nil {
|
||||
col = f32color.MulAlpha(col, 150)
|
||||
col = f32color.Disabled(col)
|
||||
}
|
||||
trackColor := s.Color.Track
|
||||
op.Offset(f32.Point{Y: trackOff}).Add(gtx.Ops)
|
||||
|
||||
Reference in New Issue
Block a user