From a1e008f9305a784a6baabef3d875ad1805dfe523 Mon Sep 17 00:00:00 2001 From: Michael Kirk Date: Fri, 19 Apr 2019 16:41:36 -0600 Subject: [PATCH] apply new rounding/highlight design --- SignalMessaging/Views/GalleryRailView.swift | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/SignalMessaging/Views/GalleryRailView.swift b/SignalMessaging/Views/GalleryRailView.swift index c05097ad1..62f6daa2e 100644 --- a/SignalMessaging/Views/GalleryRailView.swift +++ b/SignalMessaging/Views/GalleryRailView.swift @@ -27,6 +27,7 @@ public class GalleryRailCellView: UIView { clipsToBounds = false addSubview(contentContainer) contentContainer.autoPinEdgesToSuperviewMargins() + contentContainer.layer.cornerRadius = 4.8 let tapGesture = UITapGestureRecognizer(target: self, action: #selector(didTap(sender:))) addGestureRecognizer(tapGesture) @@ -64,7 +65,7 @@ public class GalleryRailCellView: UIView { private(set) var isSelected: Bool = false - public let cellBorderWidth: CGFloat = 2 + public let cellBorderWidth: CGFloat = 3 func setIsSelected(_ isSelected: Bool) { self.isSelected = isSelected @@ -75,10 +76,8 @@ public class GalleryRailCellView: UIView { if isSelected { contentContainer.layer.borderColor = Theme.galleryHighlightColor.cgColor contentContainer.layer.borderWidth = cellBorderWidth - contentContainer.layer.cornerRadius = cellBorderWidth } else { contentContainer.layer.borderWidth = 0 - contentContainer.layer.cornerRadius = 0 } } @@ -179,7 +178,7 @@ public class GalleryRailView: UIView, GalleryRailCellViewDelegate { self.cellViews = cellViews let stackView = UIStackView(arrangedSubviews: cellViews) stackView.axis = .horizontal - stackView.spacing = 2 + stackView.spacing = 0 stackView.clipsToBounds = false scrollView.addSubview(stackView)