diff --git a/Signal.xcodeproj/project.pbxproj b/Signal.xcodeproj/project.pbxproj index 21731fe126..3a3332790b 100644 --- a/Signal.xcodeproj/project.pbxproj +++ b/Signal.xcodeproj/project.pbxproj @@ -11018,6 +11018,7 @@ D95C39EA296E108100A9DA23 /* UsernameSelectionViewController.swift in Sources */, 45B821F92981F7D400BB08BE /* VideoDurationHelper.swift in Sources */, 66AE5779298440A100E40CFA /* ViewControllerContext.swift in Sources */, + 45B821F92981F7D400BB08BE /* VideoDurationHelper.swift in Sources */, 3434AE1C22AEDE7D002EE04E /* ViewOnceMessageViewController.swift in Sources */, 88928A7726419D6B009C9B30 /* VoiceMessageDraftView.swift in Sources */, 88928A7526418904009C9B30 /* VoiceMessageTooltip.swift in Sources */, diff --git a/Signal/src/views/PhotoGridViewCell.swift b/Signal/src/views/PhotoGridViewCell.swift index 96f07be728..f8db46788e 100644 --- a/Signal/src/views/PhotoGridViewCell.swift +++ b/Signal/src/views/PhotoGridViewCell.swift @@ -250,10 +250,10 @@ public class PhotoGridViewCell: UICollectionViewCell { self.durationLabel = durationLabel } if durationLabelBackground == nil { - let gradientView = GradientView(from: .ows_blackAlpha40, to: .clear) - gradientView.gradientLayer.type = .radial - gradientView.gradientLayer.startPoint = CGPoint(x: 0.5, y: 0.5) - gradientView.gradientLayer.endPoint = CGPoint(x: 0, y: 90/122) // 122 x 58 oval + let gradientView = GradientView(from: .clear, to: .ows_blackAlpha60) + gradientView.gradientLayer.type = .axial + gradientView.gradientLayer.startPoint = CGPoint(x: 0.5, y: 0.0) + gradientView.gradientLayer.endPoint = CGPoint(x: 0.5, y: 1.0) self.durationLabelBackground = gradientView } @@ -268,10 +268,10 @@ public class PhotoGridViewCell: UICollectionViewCell { } if durationLabelBackground.superview == nil { contentView.insertSubview(durationLabelBackground, belowSubview: durationLabel) - durationLabelBackground.autoPinEdge(.top, to: .top, of: durationLabel, withOffset: -10) - durationLabelBackground.autoPinEdge(.leading, to: .leading, of: durationLabel, withOffset: -24) - durationLabelBackground.centerXAnchor.constraint(equalTo: contentView.trailingAnchor).isActive = true - durationLabelBackground.centerYAnchor.constraint(equalTo: contentView.bottomAnchor).isActive = true + durationLabelBackground.topAnchor.constraint(equalTo: contentView.centerYAnchor).isActive = true + durationLabelBackground.autoPinEdge(toSuperviewEdge: .leading) + durationLabelBackground.autoPinEdge(toSuperviewEdge: .trailing) + durationLabelBackground.autoPinEdge(toSuperviewEdge: .bottom) } durationLabel.isHidden = false