mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-08 08:31:13 +00:00
Update list editing icons
This commit is contained in:
parent
90b2c8761c
commit
f65369f308
22
Images.xcassets/Item List/AddItemIcon.imageset/Contents.json
vendored
Normal file
22
Images.xcassets/Item List/AddItemIcon.imageset/Contents.json
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "ic_addoption@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "ic_addoption@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
BIN
Images.xcassets/Item List/AddItemIcon.imageset/ic_addoption@2x.png
vendored
Normal file
BIN
Images.xcassets/Item List/AddItemIcon.imageset/ic_addoption@2x.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
BIN
Images.xcassets/Item List/AddItemIcon.imageset/ic_addoption@3x.png
vendored
Normal file
BIN
Images.xcassets/Item List/AddItemIcon.imageset/ic_addoption@3x.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
22
Images.xcassets/Item List/RemoveItemIcon.imageset/Contents.json
vendored
Normal file
22
Images.xcassets/Item List/RemoveItemIcon.imageset/Contents.json
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "ic_deleteotion@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "ic_deleteotion@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
BIN
Images.xcassets/Item List/RemoveItemIcon.imageset/ic_deleteotion@2x.png
vendored
Normal file
BIN
Images.xcassets/Item List/RemoveItemIcon.imageset/ic_deleteotion@2x.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
BIN
Images.xcassets/Item List/RemoveItemIcon.imageset/ic_deleteotion@3x.png
vendored
Normal file
BIN
Images.xcassets/Item List/RemoveItemIcon.imageset/ic_deleteotion@3x.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
@ -420,7 +420,8 @@ public func createPollController(account: Account, peerId: PeerId, completion: @
|
||||
}
|
||||
return false
|
||||
})
|
||||
} else {
|
||||
}
|
||||
if resultItemNode == nil {
|
||||
let _ = controller.frameForItemNode({ itemNode in
|
||||
if let itemNode = itemNode as? ItemListItemNode {
|
||||
if let tag = itemNode.tag, tag.isEqual(to: CreatePollEntryTag.option(id)) {
|
||||
|
@ -72,15 +72,7 @@ struct PresentationResourcesItemList {
|
||||
|
||||
static func itemListDeleteIndicatorIcon(_ theme: PresentationTheme) -> UIImage? {
|
||||
return theme.image(PresentationResourceKey.itemListDeleteIndicatorIcon.rawValue, { theme in
|
||||
generateImage(CGSize(width: 22.0, height: 26.0), contextGenerator: { size, context in
|
||||
context.clear(CGRect(origin: CGPoint(), size: size))
|
||||
context.setFillColor(UIColor(white: 0.0, alpha: 0.06).cgColor)
|
||||
context.fillEllipse(in: CGRect(origin: CGPoint(x: 0.0, y: 0.0), size: CGSize(width: 22.0, height: 22.0)))
|
||||
context.setFillColor(theme.list.itemDisclosureActions.destructive.fillColor.cgColor)
|
||||
context.fillEllipse(in: CGRect(origin: CGPoint(x: 0.0, y: 2.0), size: CGSize(width: 22.0, height: 22.0)))
|
||||
context.setFillColor(theme.list.itemDisclosureActions.destructive.foregroundColor.cgColor)
|
||||
context.fill(CGRect(origin: CGPoint(x: floorToScreenPixels((size.width - 11.0) / 2.0), y: 2.0 + floorToScreenPixels((size.width - 1.0) / 2.0)), size: CGSize(width: 11.0, height: 1.0)))
|
||||
})
|
||||
return generateTintedImage(image: UIImage(bundleImageName: "Item List/RemoveItemIcon"), color: theme.list.itemDestructiveColor)
|
||||
})
|
||||
}
|
||||
|
||||
@ -111,16 +103,7 @@ struct PresentationResourcesItemList {
|
||||
|
||||
static func addPhoneIcon(_ theme: PresentationTheme) -> UIImage? {
|
||||
return theme.image(PresentationResourceKey.itemListAddPhoneIcon.rawValue, { theme in
|
||||
generateImage(CGSize(width: 22.0, height: 26.0), contextGenerator: { size, context in
|
||||
context.clear(CGRect(origin: CGPoint(), size: size))
|
||||
context.setFillColor(UIColor(white: 0.0, alpha: 0.06).cgColor)
|
||||
context.fillEllipse(in: CGRect(origin: CGPoint(x: 0.0, y: 0.0), size: CGSize(width: 22.0, height: 22.0)))
|
||||
context.setFillColor(theme.list.itemDisclosureActions.constructive.fillColor.cgColor)
|
||||
context.fillEllipse(in: CGRect(origin: CGPoint(x: 0.0, y: 2.0), size: CGSize(width: 22.0, height: 22.0)))
|
||||
context.setFillColor(theme.list.itemDisclosureActions.constructive.foregroundColor.cgColor)
|
||||
context.fill(CGRect(origin: CGPoint(x: floorToScreenPixels((size.width - 11.0) / 2.0), y: 2.0 + floorToScreenPixels((size.width - 1.0) / 2.0)), size: CGSize(width: 11.0, height: 1.0)))
|
||||
context.fill(CGRect(origin: CGPoint(x: floorToScreenPixels((size.width - 1.0) / 2.0), y: 2.0 + floorToScreenPixels((size.width - 11.0) / 2.0)), size: CGSize(width: 1.0, height: 11.0)))
|
||||
})
|
||||
return generateTintedImage(image: UIImage(bundleImageName: "Item List/AddItemIcon"), color: theme.list.itemAccentColor)
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -168,7 +168,7 @@ class UserInfoEditingPhoneActionItemNode: ListViewItemNode {
|
||||
strongSelf.bottomStripeNode.frame = CGRect(origin: CGPoint(x: leftInset, y: contentSize.height - separatorHeight), size: CGSize(width: params.width - leftInset, height: separatorHeight))
|
||||
|
||||
if let iconImage = iconImage {
|
||||
strongSelf.iconNode.frame = CGRect(origin: CGPoint(x: leftInset, y: floor((layout.contentSize.height - iconImage.size.height) / 2.0) - 1.0), size: iconImage.size)
|
||||
strongSelf.iconNode.frame = CGRect(origin: CGPoint(x: leftInset, y: floor((layout.contentSize.height - iconImage.size.height) / 2.0)), size: iconImage.size)
|
||||
}
|
||||
|
||||
strongSelf.titleNode.frame = CGRect(origin: CGPoint(x: leftInset + 30.0, y: 12.0), size: titleLayout.size)
|
||||
|
Loading…
x
Reference in New Issue
Block a user