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.

Keep the title bar clear on every macOS

Țugui Dragoș5dea132c6ef3
diff --git a/Peel/Navigation/TitleBarBackground.swift b/Peel/Navigation/TitleBarBackground.swift
index ec0d1b7d..cf178fe9 100644
--- a/Peel/Navigation/TitleBarBackground.swift
+++ b/Peel/Navigation/TitleBarBackground.swift
@@ -1,15 +1,10 @@
import SwiftUI
extension View {
- /// 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.
- @ViewBuilder
+ /// 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.
func clearTitleBar() -> some View {
- if #available(macOS 27, *) {
- toolbarBackgroundVisibility(.hidden, for: .windowToolbar)
- } else {
- self
- }
+ toolbarBackgroundVisibility(.hidden, for: .windowToolbar)
}
}