Refactor: one colorFade transition replaces internal.Fade

textInputFade becomes colorFade in theme.go and serves AvatarGroup,
Image retry, Tag and EditableText, which used internal.Fade. MyGo already
skips element transitions under ReduceMotion, so dropping the Motion
check keeps behaviour.
This commit is contained in:
ZacharyZhang-NY committed 2026-10-05 13:50:47 -04:00
1 parent c0be05d043
commit 43c96a7a81
11 files changed
+167 -21

No files matched your search

+3
View File
@@ -124,6 +124,9 @@ func Tokens(c *ui.Context) theme.Tokens { return current(c).tokens }
// Density returns the window's density.
func Density(c *ui.Context) theme.Density { return current(c).density }
// colorFade eases background and border colors between states; MyGo skips it under reduced motion.
var colorFade = ui.ElementTransition{Colors: true, Duration: theme.StateDuration}
// Motion returns d, or zero when the desktop asks for reduced motion.
func Motion(c *ui.Context, d time.Duration) time.Duration {
if c.Preferences().ReduceMotion {