Script control size fix

This commit is contained in:
James Magahern
2020-08-14 18:47:11 -07:00
parent f2190abb6e
commit c6adf599f4
2 changed files with 3 additions and 3 deletions

View File

@@ -43,8 +43,8 @@ class ScriptPolicyControl: UIControl
denyButton.imageView?.contentMode = .scaleAspectFit denyButton.imageView?.contentMode = .scaleAspectFit
} }
override var intrinsicContentSize: CGSize { override func sizeThatFits(_ size: CGSize) -> CGSize {
CGSize(width: 100.0, height: UIView.noIntrinsicMetric) return segmentContainer.sizeThatFits(size)
} }
override func layoutSubviews() { override func layoutSubviews() {

View File

@@ -33,7 +33,7 @@ class ScriptPolicyControlListCell: UICollectionViewListCell
override func layoutSubviews() { override func layoutSubviews() {
let policyControlWidth = CGFloat(80.0) let policyControlWidth = policyControl.sizeThatFits(bounds.size).width
policyControl.frame = CGRect( policyControl.frame = CGRect(
x: bounds.maxX - policyControlWidth - layoutMargins.right, x: bounds.maxX - policyControlWidth - layoutMargins.right,
y: 0, y: 0,