Skip to content

Commit

Permalink
Bugfix FXIOS-8985 ⁃ Weird display of "Customize Homepage" button afte…
Browse files Browse the repository at this point in the history
…r changing the wallpaper (#19950)

* FXIOS-8985 #19833 ⁃ Weird display of "Customize Homepage" button after changing the wallpaper

* FXIOS-8985 #19833 ⁃ Weird display of "Customize Homepage" button after changing the wallpaper

Added corner radius only for the UIVisualEffectView subview, of the Customize Homepage button.

* FXIOS-8985 #19833 ⁃ Weird display of "Customize Homepage" button after changing the wallpaper

* FXIOS-8985 #19833 ⁃ Weird display of "Customize Homepage" button after changing the wallpaper

Added few comments on the change

* Apply suggestions from code review

* Apply suggestions from code review

---------

Co-authored-by: Nishant Bhasin <nish.bhasin@gmail.com>
  • Loading branch information
dicarobinho and nbhasin2 authored May 7, 2024
1 parent 37e874b commit 596bc3f
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ public class SecondaryRoundedButton: ResizableButton, ThemeApplicable {
updatedConfiguration.background.backgroundColorTransformer = nil
updatedConfiguration.background.cornerRadius = UX.buttonCornerRadius
updatedConfiguration.cornerStyle = .fixed
addCornerRadiusForVisualEffectView(radiusSize: UX.buttonCornerRadius)

accessibilityIdentifier = viewModel.a11yIdentifier

Expand Down Expand Up @@ -97,6 +98,14 @@ public class SecondaryRoundedButton: ResizableButton, ThemeApplicable {
setNeedsUpdateConfiguration()
}

func addCornerRadiusForVisualEffectView(radiusSize: CGFloat) {
// Note: changing the corner radius for the subview, in this case UIVisualEffectView
// is required for certain cases where UIVisualEffectView doesn't update with super view radius change
for subview in self.subviews where subview is UIVisualEffectView {
subview.layer.cornerRadius = radiusSize
}
}

// MARK: ThemeApplicable

public func applyTheme(theme: Theme) {
Expand Down

0 comments on commit 596bc3f

Please sign in to comment.