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:
11 files changed
+167
-21
No files matched your search
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user