@@ -31,6 +31,10 @@ public class BrowserAddressToolbar: UIView,
3131 static let toolbarAnimationTime : CGFloat = 0.15
3232 static let iconsAnimationTime : CGFloat = 0.1
3333 static let iconsAnimationDelay : CGFloat = 0.075
34+
35+ static let shadowRadius : CGFloat = 14
36+ static let shadowOpacity : Float = 1
37+ static let shadowOffset = CGSize ( width: 0 , height: 2 )
3438 }
3539
3640 public var notificationCenter : any NotificationProtocol = NotificationCenter . default
@@ -269,6 +273,16 @@ public class BrowserAddressToolbar: UIView,
269273 setupAccessibility ( )
270274 }
271275
276+ private func setupShadow( theme: Theme ) {
277+ locationContainer. layer. shadowPath = UIBezierPath ( roundedRect: locationContainer. bounds,
278+ cornerRadius: locationContainer. layer. cornerRadius) . cgPath
279+ locationContainer. layer. shadowRadius = UX . shadowRadius
280+ locationContainer. layer. shadowOffset = UX . shadowOffset
281+ locationContainer. layer. shadowColor = theme. colors. shadowStrong. cgColor
282+ locationContainer. layer. shadowOpacity = UX . shadowOpacity
283+ locationContainer. layer. masksToBounds = false
284+ }
285+
272286 private func setupDragInteraction( ) {
273287 // Setup UIDragInteraction to handle dragging the location
274288 // bar for dropping its URL into other apps.
@@ -487,6 +501,7 @@ public class BrowserAddressToolbar: UIView,
487501 toolbarTopBorderView. backgroundColor = colors. borderPrimary
488502 toolbarBottomBorderView. backgroundColor = colors. borderPrimary
489503 locationView. applyTheme ( theme: theme)
504+ setupShadow ( theme: theme)
490505 self . theme = theme
491506 }
492507
0 commit comments