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.

Leave the title bar on macOS 26 as it was

Țugui Dragoșaf6faaaf6c4c
diff --git a/Peel/Navigation/TitleBarBackground.swift b/Peel/Navigation/TitleBarBackground.swift
index cf178fe9..22114f19 100644
--- a/Peel/Navigation/TitleBarBackground.swift
+++ b/Peel/Navigation/TitleBarBackground.swift
@@ -1,10 +1,16 @@
import SwiftUI
extension View {
- /// Keeps the title bar clear. Otherwise the window draws a background behind each column's section of the title
- /// bar even when nothing is under it: always on macOS 27, and on macOS 26 while the sidebar is hidden, an opaque
- /// band with a line under it. What scrolls beneath the title bar is still blurred by the scroll edge effect.
+ /// Keeps the title bar clear on macOS 27, as it is on macOS 26. There the window draws a background behind each
+ /// column's section of the title bar even when nothing is under it; without it, what scrolls beneath the title
+ /// bar is still blurred by the scroll edge effect. On macOS 26 the same modifier would also take away the glass
+ /// behind the toolbar's items and that blur.
+ @ViewBuilder
func clearTitleBar() -> some View {
- toolbarBackgroundVisibility(.hidden, for: .windowToolbar)
+ if #available(macOS 27, *) {
+ toolbarBackgroundVisibility(.hidden, for: .windowToolbar)
+ } else {
+ self
+ }
}
}