mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-03 08:25:34 +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 (p ProgressBarStyle) Layout(gtx layout.Context) layout.Dimensions {
|
||||
fillWidth := progressBarWidth * clamp1(p.Progress)
|
||||
fillColor := p.Color
|
||||
if gtx.Queue == nil {
|
||||
fillColor = f32color.MulAlpha(fillColor, 200)
|
||||
fillColor = f32color.Disabled(fillColor)
|
||||
}
|
||||
return shader(fillWidth, fillColor)
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user