From 765192bd93f86fc583e2728855e6f196837accda Mon Sep 17 00:00:00 2001 From: Alessandro Boron Date: Tue, 14 May 2024 10:23:54 +1000 Subject: [PATCH] Fix address bar different focus state color when new tab vs new window (#2750) Task/Issue URL: https://app.asana.com/0/1177771139624306/1207076354771782/f **Description**: This PR fixes the issue where the address bar border color displayed is wrong when a new window is opened. --- .../NavigationBar/View/AddressBarViewController.swift | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/DuckDuckGo/NavigationBar/View/AddressBarViewController.swift b/DuckDuckGo/NavigationBar/View/AddressBarViewController.swift index 7976bb9dc6..83f7dd9360 100644 --- a/DuckDuckGo/NavigationBar/View/AddressBarViewController.swift +++ b/DuckDuckGo/NavigationBar/View/AddressBarViewController.swift @@ -25,7 +25,7 @@ final class AddressBarViewController: NSViewController { @IBOutlet var addressBarTextField: AddressBarTextField! @IBOutlet var passiveTextField: NSTextField! @IBOutlet var inactiveBackgroundView: NSView! - @IBOutlet var activeBackgroundView: NSView! + @IBOutlet var activeBackgroundView: ColorView! @IBOutlet var activeOuterBorderView: NSView! @IBOutlet var activeBackgroundViewWithSuggestions: NSView! @IBOutlet var progressIndicator: LoadingProgressView! @@ -319,10 +319,8 @@ final class AddressBarViewController: NSViewController { let isKey = self.view.window?.isKeyWindow ?? false activeOuterBorderView.alphaValue = isKey && isFirstResponder && isHomePage ? 1 : 0 - activeOuterBorderView.layer?.backgroundColor = NSColor.controlAccentColor.withAlphaComponent(0.2).cgColor - activeBackgroundView.layer?.borderColor = NSColor.controlAccentColor.withAlphaComponent(0.8).cgColor activeOuterBorderView.layer?.backgroundColor = accentColor.withAlphaComponent(0.2).cgColor - activeBackgroundView.layer?.borderColor = accentColor.withAlphaComponent(0.8).cgColor + activeBackgroundView.borderColor = accentColor.withAlphaComponent(0.8) addressBarTextField.placeholderString = tabViewModel?.tab.content == .newtab ? UserText.addressBarPlaceholder : "" }