Skip to content

armgit / peel

Public Imported from GitHub
0

Uninstall Mac apps with every file they leave behind, and see why each belongs. Free up space, fine-tune macOS, and set up Terminal.

Change a background item's buttons at once and fade only its badges

Țugui Dragoș0820fddc560c
diff --git a/Peel/Views/BackgroundItems/BackgroundItemDetailView.swift b/Peel/Views/BackgroundItems/BackgroundItemDetailView.swift
index 60041ed5..27a23070 100644
--- a/Peel/Views/BackgroundItems/BackgroundItemDetailView.swift
+++ b/Peel/Views/BackgroundItems/BackgroundItemDetailView.swift
@@ -289,8 +289,6 @@ struct BackgroundItemDetailView: View {
}
}
.formStyle(.grouped)
- .motion(value: item.state)
- .motion(value: item.isDisabled)
.task(id: Look(item: item.id, scans: backgroundItems.scans)) {
legacyStatus = await Self.legacyStatus(of: item)
}
@@ -431,6 +429,9 @@ struct BackgroundItemDetailView: View {
}
}
.padding(.vertical, 4)
+ // Only the badges fade to a new state: the buttons change at once, so two never show in one place.
+ .motion(value: item.state)
+ .motion(value: item.isDisabled)
}
/// The item's state, as one badge whose text, symbol, and color change with it. A badge per state would swap