@@ -18,7 +18,6 @@ class KeyableWindow: NSWindow {
1818// MARK: - SidePanelController
1919
2020final class SidePanelController : NSWindowController {
21- private let cornerRadius : CGFloat = 10
2221 private( set) var isShown = false
2322 private var isAnimating = false
2423 private var animationGeneration = 0
@@ -80,7 +79,7 @@ final class SidePanelController: NSWindowController {
8079 hostingView . frame = containerView . bounds
8180 hostingView . autoresizingMask = [ . width , . height ]
8281 hostingView . wantsLayer = true
83- hostingView . layer ? . cornerRadius = 10
82+ hostingView . layer ? . cornerRadius = Self . windowCornerRadius ( using : appSettings )
8483 hostingView . layer ? . maskedCorners = Self . maskedCorners ( for : side )
8584 hostingView . layer ? . masksToBounds = true
8685 containerView . addSubview ( hostingView )
@@ -270,6 +269,13 @@ final class SidePanelController: NSWindowController {
270269 object : nil ,
271270 )
272271
272+ NotificationCenter . default . addObserver (
273+ self ,
274+ selector : #selector( handleLiquidGlassSettingChanged ) ,
275+ name : . liquidGlassSettingChanged ,
276+ object : nil ,
277+ )
278+
273279 // Listen for pin state changes to toggle window draggability
274280 NotificationCenter . default . addObserver (
275281 self ,
@@ -286,6 +292,10 @@ final class SidePanelController: NSWindowController {
286292
287293 // MARK: - Settings Change
288294
295+ @ objc private func handleLiquidGlassSettingChanged ( ) {
296+ contentHostingView ? . layer ? . cornerRadius = Self . windowCornerRadius ( using : appSettings )
297+ }
298+
289299 @ objc private func handleSettingsChanged ( ) {
290300 guard let window , let containerView = window . contentView else { return }
291301
@@ -647,6 +657,13 @@ final class SidePanelController: NSWindowController {
647657 return ( shown , hidden )
648658 }
649659
660+ /// Match the shell to the active macOS appearance generation.
661+ private static func windowCornerRadius ( using settings : AppSettings ) -> CGFloat {
662+ settings . usesLiquidGlass
663+ ? SurfaceMetrics . liquidGlassWindowCornerRadius
664+ : SurfaceMetrics . classicWindowCornerRadius
665+ }
666+
650667 /// Corner mask for the given edge side.
651668 private static func maskedCorners ( for side : EdgeSide ) -> CACornerMask {
652669 switch side {
0 commit comments