macos: fixed width for downloading/extracting, better padding

This commit is contained in:
Mitchell Hashimoto
2025-10-10 07:18:54 -07:00
parent f124bb4975
commit ba8eae027e
4 changed files with 29 additions and 4 deletions

View File

@@ -37,6 +37,19 @@ class UpdateViewModel: ObservableObject {
}
}
/// The maximum width text for states that show progress.
/// Used to prevent the pill from resizing as percentages change.
var maxWidthText: String {
switch state {
case .downloading:
return "Downloading: 100%"
case .extracting:
return "Preparing: 100%"
default:
return text
}
}
/// The SF Symbol icon name for the current update state.
/// Returns nil for idle, downloading, and extracting states.
var iconName: String? {