mirror of
https://github.com/FBukovina/Atoll.git
synced 2026-10-27 15:14:33 +00:00
Update onboarding
This commit is contained in:
parent
5b489ee90d
commit
5accee5d02
6 changed files with 78 additions and 81 deletions
|
|
@ -209,6 +209,7 @@ func applyProfileSettings(_ profiles: Set<String>) {
|
|||
if isDeveloper {
|
||||
Defaults[.enableColorPickerFeature] = true
|
||||
Defaults[.enableStatsFeature] = true
|
||||
Defaults[.enableTerminalFeature] = true
|
||||
Defaults[.enableTimerFeature] = true
|
||||
Defaults[.enableScreenAssistant] = true
|
||||
Defaults[.showMirror] = false
|
||||
|
|
@ -262,9 +263,35 @@ func applyProfileSettings(_ profiles: Set<String>) {
|
|||
Defaults[.menubarIcon] = true
|
||||
Defaults[.enableHaptics] = true
|
||||
|
||||
// Lyrics disabled by default for all profiles
|
||||
Defaults[.enableLyrics] = false
|
||||
|
||||
// Weather widget defaults to inline style
|
||||
Defaults[.lockScreenWeatherWidgetStyle] = .inline
|
||||
|
||||
// Auto-detect notch: Dynamic Island for non-notch Macs, standard notch otherwise
|
||||
if mainScreenHasNotch() {
|
||||
Defaults[.externalDisplayStyle] = .notch
|
||||
} else {
|
||||
Defaults[.externalDisplayStyle] = .dynamicIsland
|
||||
}
|
||||
|
||||
// Lock screen glass: custom liquid glass v11 on macOS 26+
|
||||
if #available(macOS 26.0, *) {
|
||||
Defaults[.lockScreenGlassStyle] = .liquid
|
||||
Defaults[.lockScreenGlassCustomizationMode] = .customLiquid
|
||||
Defaults[.lockScreenMusicLiquidGlassVariant] = .v11
|
||||
}
|
||||
|
||||
print("✅ Applied profile settings for: \(profiles.joined(separator: ", "))")
|
||||
}
|
||||
|
||||
/// Returns `true` when the main screen has a physical notch (safe area insets > 0).
|
||||
private func mainScreenHasNotch() -> Bool {
|
||||
guard let screen = NSScreen.main else { return false }
|
||||
return screen.safeAreaInsets.top > 0
|
||||
}
|
||||
|
||||
#Preview {
|
||||
ProfileSelectionView(onContinue: { profiles in
|
||||
print("Selected profiles: \(profiles)")
|
||||
|
|
|
|||
|
|
@ -778,6 +778,7 @@ struct SettingsView: View {
|
|||
SettingsSearchEntry(tab: .shelf, title: "Quick Share Service", keywords: ["shelf", "share", "airdrop"], highlightID: SettingsTab.shelf.highlightID(for: "Quick Share Service")),
|
||||
|
||||
// Appearance
|
||||
SettingsSearchEntry(tab: .appearance, title: "Main screen style", keywords: ["dynamic island", "pill", "non-notch", "display style", "notch style"], highlightID: SettingsTab.appearance.highlightID(for: "Main screen style")),
|
||||
SettingsSearchEntry(tab: .appearance, title: "Settings icon in notch", keywords: ["settings button", "toolbar"], highlightID: SettingsTab.appearance.highlightID(for: "Settings icon in notch")),
|
||||
SettingsSearchEntry(tab: .appearance, title: "Enable window shadow", keywords: ["shadow", "appearance"], highlightID: SettingsTab.appearance.highlightID(for: "Enable window shadow")),
|
||||
SettingsSearchEntry(tab: .appearance, title: "Corner radius scaling", keywords: ["corner radius", "shape"], highlightID: SettingsTab.appearance.highlightID(for: "Corner radius scaling")),
|
||||
|
|
@ -3457,6 +3458,7 @@ struct Appearance: View {
|
|||
@Default(.lockScreenTimerWidgetUsesBlur) private var timerGlassModeIsGlass
|
||||
@Default(.enableLockScreenMediaWidget) private var enableLockScreenMediaWidget
|
||||
@Default(.enableLockScreenTimerWidget) private var enableLockScreenTimerWidget
|
||||
@Default(.externalDisplayStyle) private var externalDisplayStyle
|
||||
@State private var selectedListVisualizer: CustomVisualizer? = nil
|
||||
|
||||
@State private var isIconImporterPresented = false
|
||||
|
|
@ -3468,6 +3470,12 @@ struct Appearance: View {
|
|||
@State private var url: String = ""
|
||||
@State private var speed: CGFloat = 1.0
|
||||
|
||||
/// Whether the main screen has a physical notch.
|
||||
private var mainScreenHasPhysicalNotch: Bool {
|
||||
guard let screen = NSScreen.main else { return false }
|
||||
return screen.safeAreaInsets.top > 0
|
||||
}
|
||||
|
||||
private var notchWidthRange: ClosedRange<Double> {
|
||||
let minW = Double(currentRecommendedMinimumNotchWidth())
|
||||
let maxW = min(900, Double(maxAllowedNotchWidth()))
|
||||
|
|
@ -3528,6 +3536,27 @@ struct Appearance: View {
|
|||
Text("General")
|
||||
}
|
||||
|
||||
// Show display style picker only on non-notch Macs (main screen has no physical notch)
|
||||
if !mainScreenHasPhysicalNotch {
|
||||
Section {
|
||||
Picker("Main screen style", selection: $externalDisplayStyle) {
|
||||
ForEach(ExternalDisplayStyle.allCases) { style in
|
||||
Text(style.localizedName)
|
||||
.tag(style)
|
||||
}
|
||||
}
|
||||
.onChange(of: externalDisplayStyle) {
|
||||
NotificationCenter.default.post(name: Notification.Name.notchHeightChanged, object: nil)
|
||||
}
|
||||
.settingsHighlight(id: highlightID("Main screen style"))
|
||||
Text(externalDisplayStyle.description)
|
||||
.font(.caption)
|
||||
.foregroundStyle(.secondary)
|
||||
} header: {
|
||||
Text("Display Style")
|
||||
}
|
||||
}
|
||||
|
||||
notchWidthControls()
|
||||
|
||||
Section {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue