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:
@@ -61,7 +61,7 @@ func (e EditorStyle) Layout(gtx layout.Context) layout.Dimensions {
|
||||
if e.Editor.Len() > 0 {
|
||||
textColor := e.Color
|
||||
if disabled {
|
||||
textColor = f32color.MulAlpha(textColor, 150)
|
||||
textColor = f32color.Disabled(textColor)
|
||||
}
|
||||
paint.ColorOp{Color: textColor}.Add(gtx.Ops)
|
||||
e.Editor.PaintText(gtx)
|
||||
|
||||
Reference in New Issue
Block a user