mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
Update rail icons.
This commit is contained in:
parent
2f7880af8e
commit
66efcb4639
6 changed files with 39 additions and 13 deletions
23
Signal/Images.xcassets/x-24.imageset/Contents.json
vendored
Normal file
23
Signal/Images.xcassets/x-24.imageset/Contents.json
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "x-24@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "x-24@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "x-24@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
BIN
Signal/Images.xcassets/x-24.imageset/x-24@1x.png
vendored
Normal file
BIN
Signal/Images.xcassets/x-24.imageset/x-24@1x.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 243 B |
BIN
Signal/Images.xcassets/x-24.imageset/x-24@2x.png
vendored
Normal file
BIN
Signal/Images.xcassets/x-24.imageset/x-24@2x.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 398 B |
BIN
Signal/Images.xcassets/x-24.imageset/x-24@3x.png
vendored
Normal file
BIN
Signal/Images.xcassets/x-24.imageset/x-24@3x.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 573 B |
|
@ -1676,12 +1676,14 @@ public class ApprovalRailCellView: GalleryRailCellView {
|
|||
strongSelf.approvalRailCellDelegate?.approvalRailCellView(strongSelf, didRemoveItem: attachmentItem)
|
||||
}
|
||||
|
||||
button.setImage(#imageLiteral(resourceName: "ic_circled_x"), for: .normal)
|
||||
button.setImage(UIImage(named: "x-24")?.withRenderingMode(.alwaysTemplate), for: .normal)
|
||||
button.tintColor = .white
|
||||
button.layer.shadowColor = UIColor.black.cgColor
|
||||
button.layer.shadowRadius = 2
|
||||
button.layer.shadowOpacity = 0.66
|
||||
button.layer.shadowOffset = .zero
|
||||
|
||||
let kInsetDistance: CGFloat = 5
|
||||
button.imageEdgeInsets = UIEdgeInsets(top: kInsetDistance, left: kInsetDistance, bottom: kInsetDistance, right: kInsetDistance)
|
||||
|
||||
let kButtonWidth: CGFloat = 24 + kInsetDistance * 2
|
||||
let kButtonWidth: CGFloat = 24
|
||||
button.autoSetDimensions(to: CGSize(width: kButtonWidth, height: kButtonWidth))
|
||||
|
||||
return button
|
||||
|
@ -1704,8 +1706,8 @@ public class ApprovalRailCellView: GalleryRailCellView {
|
|||
if isSelected {
|
||||
addSubview(deleteButton)
|
||||
|
||||
deleteButton.autoPinEdge(toSuperviewEdge: .top, withInset: -12)
|
||||
deleteButton.autoPinEdge(toSuperviewEdge: .trailing, withInset: -8)
|
||||
deleteButton.autoPinEdge(toSuperviewEdge: .top, withInset: cellBorderWidth)
|
||||
deleteButton.autoPinEdge(toSuperviewEdge: .trailing, withInset: cellBorderWidth + 4)
|
||||
} else {
|
||||
deleteButton.removeFromSuperview()
|
||||
}
|
||||
|
@ -1726,8 +1728,8 @@ public class ApprovalRailCellView: GalleryRailCellView {
|
|||
if hasCaption {
|
||||
addSubview(captionIndicator)
|
||||
|
||||
captionIndicator.autoPinEdge(toSuperviewEdge: .top, withInset: 2)
|
||||
captionIndicator.autoPinEdge(toSuperviewEdge: .leading, withInset: 6)
|
||||
captionIndicator.autoPinEdge(toSuperviewEdge: .top, withInset: cellBorderWidth)
|
||||
captionIndicator.autoPinEdge(toSuperviewEdge: .leading, withInset: cellBorderWidth + 4)
|
||||
} else {
|
||||
captionIndicator.removeFromSuperview()
|
||||
}
|
||||
|
|
|
@ -63,17 +63,18 @@ public class GalleryRailCellView: UIView {
|
|||
|
||||
private(set) var isSelected: Bool = false
|
||||
|
||||
public let cellBorderWidth: CGFloat = 2
|
||||
|
||||
func setIsSelected(_ isSelected: Bool) {
|
||||
let borderWidth: CGFloat = 2
|
||||
self.isSelected = isSelected
|
||||
|
||||
// Reserve space for the selection border whether or not the cell is selected.
|
||||
layoutMargins = UIEdgeInsets(top: 0, left: borderWidth, bottom: 0, right: borderWidth)
|
||||
layoutMargins = UIEdgeInsets(top: 0, left: cellBorderWidth, bottom: 0, right: cellBorderWidth)
|
||||
|
||||
if isSelected {
|
||||
imageView.layer.borderColor = Theme.galleryHighlightColor.cgColor
|
||||
imageView.layer.borderWidth = borderWidth
|
||||
imageView.layer.cornerRadius = borderWidth
|
||||
imageView.layer.borderWidth = cellBorderWidth
|
||||
imageView.layer.cornerRadius = cellBorderWidth
|
||||
} else {
|
||||
imageView.layer.borderWidth = 0
|
||||
imageView.layer.cornerRadius = 0
|
||||
|
|
Loading…
Reference in a new issue