mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Context menu improvements
This commit is contained in:
@@ -114,6 +114,21 @@ final class ContextActionsContainerNode: ASDisplayNode {
|
||||
return CGSize(width: maxWidth, height: verticalOffset)
|
||||
}
|
||||
|
||||
func updateTheme(theme: PresentationTheme) {
|
||||
for itemNode in self.itemNodes {
|
||||
switch itemNode {
|
||||
case let .action(action):
|
||||
action.updateTheme(theme: theme)
|
||||
case let .separator(separator):
|
||||
separator.backgroundColor = theme.contextMenu.sectionSeparatorColor
|
||||
case let .itemSeparator(itemSeparator):
|
||||
itemSeparator.backgroundColor = theme.contextMenu.itemSeparatorColor
|
||||
}
|
||||
}
|
||||
|
||||
self.backgroundColor = theme.contextMenu.backgroundColor
|
||||
}
|
||||
|
||||
func actionNode(at point: CGPoint) -> ContextActionNode? {
|
||||
for itemNode in self.itemNodes {
|
||||
switch itemNode {
|
||||
|
||||
Reference in New Issue
Block a user