Snapshots: hide view until ReduceMotion applies; Spinner repaints when motion setting flips
This commit is contained in:
2 files changed
+8
-2
No files matched your search
+1
-1
@@ -36,7 +36,7 @@ func Spinner(c *ui.Context, opts SpinnerOptions) *ui.Element {
|
||||
still := c.Preferences().ReduceMotion
|
||||
row := ui.Row(c).Gap(Density(c).Unit() * 2).AlignItems(ui.Center).Role(ui.RoleProgress).Label(label)
|
||||
row.Children(func() {
|
||||
ui.Box(c).Size(size, size).Shrink(0).Draw(func(p *ui.Painter, r ui.Rect) {
|
||||
ui.Box(c).Key(still).Size(size, size).Shrink(0).Draw(func(p *ui.Painter, r ui.Rect) {
|
||||
turn := 0.0
|
||||
if !still {
|
||||
turn = float64(p.Now().UnixMilli()%1200) / 1200
|
||||
|
||||
Reference in new issue
Block a user