mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 06:35:51 +00:00
Autoremove improvements
This commit is contained in:
@@ -169,8 +169,10 @@ private final class AccessoryItemIconButtonNode: HighlightTrackingButtonNode {
|
||||
let previousItem = self.item
|
||||
self.item = item
|
||||
|
||||
let (updatedImage, text, _, _, _) = AccessoryItemIconButtonNode.imageAndInsets(item: item, theme: self.theme, strings: self.strings)
|
||||
|
||||
if let image = self.iconImageNode.image {
|
||||
self.iconImageNode.image = AccessoryItemIconButtonNode.imageAndInsets(item: item, theme: self.theme, strings: self.strings).0
|
||||
self.iconImageNode.image = updatedImage
|
||||
|
||||
let bottomInset: CGFloat = 0.0
|
||||
let imageFrame = CGRect(origin: CGPoint(x: floor((size.width - image.size.width) / 2.0), y: floor((size.height - image.size.height) / 2.0) - bottomInset), size: image.size)
|
||||
@@ -307,6 +309,12 @@ private final class AccessoryItemIconButtonNode: HighlightTrackingButtonNode {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if let text = text {
|
||||
self.setAttributedTitle(NSAttributedString(string: text, font: accessoryButtonFont, textColor: self.theme.chat.inputPanel.inputControlColor), for: .normal)
|
||||
} else {
|
||||
self.setAttributedTitle(NSAttributedString(), for: .normal)
|
||||
}
|
||||
}
|
||||
|
||||
var buttonWidth: CGFloat {
|
||||
|
||||
Reference in New Issue
Block a user