diff --git a/Mac/Preferences/PreferencesControlsBackgroundView.swift b/Mac/Preferences/PreferencesControlsBackgroundView.swift index 36353dd6b..5625f3d3d 100644 --- a/Mac/Preferences/PreferencesControlsBackgroundView.swift +++ b/Mac/Preferences/PreferencesControlsBackgroundView.swift @@ -26,9 +26,11 @@ final class PreferencesControlsBackgroundView: NSView { } override func draw(_ dirtyRect: NSRect) { + let fillColor = self.effectiveAppearance.isDarkMode ? darkModeFillColor : lightModeFillColor fillColor.setFill() - dirtyRect.fill() + let r = NSIntersectionRect(dirtyRect, bounds) + r.fill() let borderColor = self.effectiveAppearance.isDarkMode ? darkModeBorderColor : lightModeBorderColor borderColor.set() diff --git a/Mac/Preferences/PreferencesTableViewBackgroundView.swift b/Mac/Preferences/PreferencesTableViewBackgroundView.swift index 34548e429..21839a895 100644 --- a/Mac/Preferences/PreferencesTableViewBackgroundView.swift +++ b/Mac/Preferences/PreferencesTableViewBackgroundView.swift @@ -16,6 +16,8 @@ final class PreferencesTableViewBackgroundView: NSView { override func draw(_ dirtyRect: NSRect) { let color = self.effectiveAppearance.isDarkMode ? darkBorderColor : lightBorderColor color.setFill() - dirtyRect.fill() + + let r = NSIntersectionRect(dirtyRect, bounds) + r.fill() } }