From af296d7430eb78aee3e9b065d5d37e14756112c4 Mon Sep 17 00:00:00 2001 From: James Magahern Date: Wed, 30 Sep 2020 18:34:03 -0700 Subject: [PATCH] URLBar: don't animate shadow paths during animation --- App/Titlebar and URL Bar/URLBar.swift | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/App/Titlebar and URL Bar/URLBar.swift b/App/Titlebar and URL Bar/URLBar.swift index 30e4a52..f6d06a6 100644 --- a/App/Titlebar and URL Bar/URLBar.swift +++ b/App/Titlebar and URL Bar/URLBar.swift @@ -181,8 +181,12 @@ class URLBar: ReliefButton override func layoutSubviews() { super.layoutSubviews() - backgroundView.frame = bounds - shadowView.frame = bounds + + if let animationKeys = self.layer.animationKeys(), animationKeys.count > 0 { + // Kill the shadowPath while animating, since we cannot animate shadow paths apparently. + shadowView.layer.shadowPath = nil + } + progressIndicatorView.frame = backgroundView.bounds // Document button