Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Packages/ZettelKit/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import PackageDescription
let package = Package(
name: "ZettelKit",
platforms: [
.macOS(.v26),
.macOS(.v15),
.iOS(.v26)
],
products: [
Expand Down
4 changes: 2 additions & 2 deletions Zettel.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 26.0;
MACOSX_DEPLOYMENT_TARGET = 15.0;
MARKETING_VERSION = 1.2;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "";
Expand Down Expand Up @@ -496,7 +496,7 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 26.0;
MACOSX_DEPLOYMENT_TARGET = 15.0;
MARKETING_VERSION = 1.2;
PRODUCT_BUNDLE_IDENTIFIER = "";
PRODUCT_NAME = Zettel;
Expand Down
2 changes: 1 addition & 1 deletion ZettelMac/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
</dict>
</array>
<key>LSMinimumSystemVersion</key>
<string>26.0</string>
<string>15.0</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
</dict>
Expand Down
2 changes: 1 addition & 1 deletion ZettelMac/Preferences/MacDockIconPreference.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ enum MacDockIconPreference {
let activationPolicy: NSApplication.ActivationPolicy = shouldHide ? .accessory : .regular
let didSet = NSApplication.shared.setActivationPolicy(activationPolicy)
if !didSet {
let currentIsHidden = NSApplication.shared.activationPolicy == .accessory
let currentIsHidden = NSApplication.shared.activationPolicy() == .accessory
UserDefaults.standard.set(currentIsHidden, forKey: storageKey)
}
}
Expand Down
17 changes: 16 additions & 1 deletion ZettelMac/Views/TagAutocompletePanel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ struct TagSuggestionsView: View {
}
}
.padding(.vertical, 4)
.glassEffect(in: .rect(cornerRadius: 10))
.modifier(GlassEffectFallback(cornerRadius: 10))
// No SwiftUI shadow — NSHostingView clips it to a hard rect.
// p.hasShadow = true on the NSPanel gives the correct shaped shadow.
}
Expand Down Expand Up @@ -157,6 +157,21 @@ private struct TagSuggestionRow: View {
}
}

// MARK: - Glass Effect Fallback

/// Applies `.glassEffect` on macOS 26+, falls back to `.background(.ultraThinMaterial)` on earlier versions.
private struct GlassEffectFallback: ViewModifier {
let cornerRadius: CGFloat

func body(content: Content) -> some View {
if #available(macOS 26, *) {
content.glassEffect(in: .rect(cornerRadius: cornerRadius))
} else {
content.background(.ultraThinMaterial, in: .rect(cornerRadius: cornerRadius))
}
}
}

// MARK: - Controller

/// Manages the floating `NSPanel` that hosts `TagSuggestionsView`.
Expand Down
8 changes: 5 additions & 3 deletions ZettelMac/Window/ZettelWindowManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,11 @@ final class ZettelWindowManager: NSObject, ObservableObject {
panel.titlebarAppearsTransparent = true
panel.titleVisibility = .hidden

// Transparent background for Liquid Glass
panel.isOpaque = false
panel.backgroundColor = .clear
// Transparent background for Liquid Glass (macOS 26+)
if #available(macOS 26, *) {
panel.isOpaque = false
panel.backgroundColor = .clear
}

// Set min size
panel.minSize = NSSize(width: 420, height: 380)
Expand Down