Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
fixed url bar autocompletion text frame issue
- Loading branch information
Showing
with
6 additions
and
3 deletions.
-
+6
−3
Client/Frontend/Widgets/AutocompleteTextField.swift
|
|
@@ -253,11 +253,14 @@ class AutocompleteTextField: UITextField, UITextFieldDelegate { |
|
|
let enteredTextSize = self.attributedText?.boundingRect(with: self.frame.size, options: NSStringDrawingOptions.usesLineFragmentOrigin, context: nil) |
|
|
frame.origin.x = (enteredTextSize?.width.rounded() ?? 0) |
|
|
frame.size.width = self.frame.size.width - frame.origin.x |
|
|
#if PAID |
|
|
frame.size.height = self.frame.size.height + 1 |
|
|
#else |
|
|
frame.size.height = self.frame.size.height - 1 |
|
|
|
|
|
#if PAID |
|
|
if self.text?.count ?? 0 == 0 { |
|
|
frame.origin.y = 1 |
|
|
} |
|
|
#endif |
|
|
|
|
|
label.frame = frame |
|
|
return label |
|
|
} |
|
|
|