From 2f1427f5290724f2ec37417976bdf82fa50a9e6c Mon Sep 17 00:00:00 2001 From: Lukas <134181853+bo2themax@users.noreply.github.com> Date: Mon, 17 Nov 2025 09:21:30 +0100 Subject: [PATCH] =?UTF-8?q?macOS:=20match=20scroller=E2=80=99s=20appearanc?= =?UTF-8?q?e=20with=20surface=E2=80=99s=20background?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- macos/Sources/Ghostty/SurfaceScrollView.swift | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/macos/Sources/Ghostty/SurfaceScrollView.swift b/macos/Sources/Ghostty/SurfaceScrollView.swift index 86ec355fa..4e81eda14 100644 --- a/macos/Sources/Ghostty/SurfaceScrollView.swift +++ b/macos/Sources/Ghostty/SurfaceScrollView.swift @@ -172,13 +172,16 @@ class SurfaceScrollView: NSView { } // MARK: Scrolling - + private func synchronizeAppearance() { let scrollbarConfig = surfaceView.derivedConfig.scrollbar scrollView.hasVerticalScroller = scrollbarConfig != .never scrollView.verticalScroller?.controlSize = .small + let hasLightBackground = OSColor(surfaceView.derivedConfig.backgroundColor).isLightColor + // Make sure the scroller’s appearance matches the surface's background color. + scrollView.appearance = NSAppearance(named: hasLightBackground ? .aqua : .darkAqua) } - + /// Positions the surface view to fill the currently visible rectangle. /// /// This is called whenever the scroll position changes. The surface view (which does the