Skip to content

Commit

Permalink
Fix address bar different focus state color when new tab vs new window (
Browse files Browse the repository at this point in the history
#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.
  • Loading branch information
alessandroboron authored May 14, 2024
1 parent 1cf47c4 commit 765192b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions DuckDuckGo/NavigationBar/View/AddressBarViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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!
Expand Down Expand Up @@ -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 : ""
}
Expand Down

0 comments on commit 765192b

Please sign in to comment.