| | |
| | | // MARK: - Preferences View |
| | | |
| | | struct PreferencesView: View { |
| | | private let settingsWindowWidth: CGFloat = 880 |
| | | private let settingsContentWidth: CGFloat = 820 |
| | | private let settingsWindowWidth: CGFloat = 1000 |
| | | private let settingsContentWidth: CGFloat = 940 |
| | | private let generalContentWidth: CGFloat = 720 |
| | | private let generalLabelWidth: CGFloat = 190 |
| | | private let generalControlWidth: CGFloat = 500 |
| | |
| | | isApplyingSystemScheme = true |
| | | |
| | | DispatchQueue.global(qos: .userInitiated).async { |
| | | let scannedApps = AppIndexer.scan(useCache: false) |
| | | let result = SmartStartService.applySystemInitialScheme(apps: scannedApps) |
| | | let store = result.store |
| | | let apps = TagEditor.annotate(apps: scannedApps, store: store) |
| | | let colors = store.tags.mapValues { $0.color } |
| | | let result = AppLibraryController.applySystemInitialScheme() |
| | | |
| | | DispatchQueue.main.async { |
| | | isApplyingSystemScheme = false |
| | | allApps = apps |
| | | tagColors = colors |
| | | allApps = result.snapshot.apps |
| | | tagColors = result.snapshot.tagColors |
| | | refreshDataState() |
| | | notifyDataChanged() |
| | | |
| | |
| | | .transition(.opacity.combined(with: .move(edge: .bottom))) |
| | | } |
| | | } |
| | | .frame(width: settingsWindowWidth, height: 460) |
| | | .frame(width: settingsWindowWidth, height: 480) |
| | | .onAppear { |
| | | syncSelectedLanguage() |
| | | showPendingHotkeyWarningIfNeeded() |