Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ class LocationTextField: UITextField, UITextFieldDelegate, ThemeApplicable {
tintColor = colors.layerSelectedText
clearButtonTintColor = colors.iconPrimary
markedTextStyle = [NSAttributedString.Key.backgroundColor: colors.layerAutofillText]
textColor = colors.textPrimary
tintClearButton()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,13 +238,6 @@ final class LocationView: UIView,
}

// MARK: - Layout
override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) {
super.traitCollectionDidChange(previousTraitCollection)
DispatchQueue.main.async { [self] in
formatAndTruncateURLTextField()
}
}

override func layoutSubviews() {
super.layoutSubviews()

Expand Down Expand Up @@ -543,7 +536,6 @@ final class LocationView: UIView,

private func formatAndTruncateURLTextField() {
guard !isEditing else { return }

let paragraphStyle = NSMutableParagraphStyle()
paragraphStyle.lineBreakMode = .byTruncatingHead

Expand Down Expand Up @@ -703,7 +695,6 @@ final class LocationView: UIView,
}

func locationTextFieldDidEndEditing(_ textField: UITextField) {
formatAndTruncateURLTextField()
if isURLTextFieldEmpty {
updateGradient()
} else {
Expand Down Expand Up @@ -755,11 +746,11 @@ final class LocationView: UIView,
searchEngineContentView.applyTheme(theme: theme)
lockIconButton.backgroundColor = scrollAlpha.isZero ? nil : mainBackgroundColor
urlTextField.applyTheme(theme: theme)
urlTextField.textColor = urlTextFieldColor
urlTextField.attributedPlaceholder = NSAttributedString(
string: urlTextField.placeholder ?? "",
attributes: [.foregroundColor: colors.textPrimary]
)

safeListedURLImageColor = colors.iconAccentBlue
lockIconImageColor = colors.textSecondary

Expand Down