Various improvements
This commit is contained in:
parent
73b67e9a4e
commit
d5d4bad649
20 changed files with 2491 additions and 146 deletions
|
|
@ -1,16 +1,6 @@
|
|||
#import <UIKit/UIKit.h>
|
||||
#import <dlfcn.h>
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
/*NSString *basePath = [[NSString stringWithUTF8String:argv[0]] stringByDeletingLastPathComponent];
|
||||
void *Share = dlopen([[basePath stringByAppendingPathComponent:@"PlugIns/Share.appex/Share"] UTF8String], RTLD_LAZY);
|
||||
void *NotificationContent = dlopen([[basePath stringByAppendingPathComponent:@"PlugIns/NotificationContent.appex/NotificationContent"] UTF8String], RTLD_LAZY);
|
||||
sleep(1000);
|
||||
void *NotificationService = dlopen([[basePath stringByAppendingPathComponent:@"PlugIns/NotificationService.appex/NotificationService"] UTF8String], RTLD_LAZY);
|
||||
void *SiriIntents = dlopen([[basePath stringByAppendingPathComponent:@"PlugIns/SiriIntents.appex/SiriIntents"] UTF8String], RTLD_LAZY);
|
||||
void *Widget = dlopen([[basePath stringByAppendingPathComponent:@"PlugIns/Widget.appex/Widget"] UTF8String], RTLD_LAZY);
|
||||
1*/
|
||||
|
||||
@autoreleasepool {
|
||||
return UIApplicationMain(argc, argv, @"Application", @"AppDelegate");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -666,11 +666,11 @@ public func makeDefaultDarkPresentationTheme(extendingThemeReference: Presentati
|
|||
panelControlColor: UIColor(rgb: 0xffffff),
|
||||
panelControlDisabledColor: UIColor(rgb: 0x808080, alpha: 0.5),
|
||||
panelControlDestructiveColor: UIColor(rgb: 0xff3b30),
|
||||
inputBackgroundColor: UIColor(rgb: 0x060606),
|
||||
inputBackgroundColor: UIColor(rgb: 0xffffff, alpha: 0.14).blitOver(.black, alpha: 1.0).withAlphaComponent(0.95),
|
||||
inputStrokeColor: UIColor(rgb: 0xffffff, alpha: 0.1),
|
||||
inputPlaceholderColor: UIColor(rgb: 0x7b7b7b),
|
||||
inputTextColor: UIColor(rgb: 0xffffff),
|
||||
inputControlColor: UIColor(rgb: 0xffffff),
|
||||
inputControlColor: UIColor(rgb: 0xffffff, alpha: 0.5),
|
||||
actionControlFillColor: UIColor(rgb: 0xffffff),
|
||||
actionControlForegroundColor: UIColor(rgb: 0x000000),
|
||||
primaryTextColor: UIColor(rgb: 0xffffff),
|
||||
|
|
|
|||
|
|
@ -950,7 +950,7 @@ public func makeDefaultDayPresentationTheme(extendingThemeReference: Presentatio
|
|||
inputStrokeColor: UIColor(rgb: 0x000000, alpha: 0.1),
|
||||
inputPlaceholderColor: UIColor(rgb: 0x000000, alpha: 0.4),
|
||||
inputTextColor: UIColor(rgb: 0x000000),
|
||||
inputControlColor: UIColor(rgb: 0x000000, alpha: 1.0),
|
||||
inputControlColor: UIColor(rgb: 0x000000, alpha: 0.6),
|
||||
actionControlFillColor: defaultDayAccentColor,
|
||||
actionControlForegroundColor: UIColor(rgb: 0xffffff),
|
||||
primaryTextColor: UIColor(rgb: 0x000000, alpha: 1.0),
|
||||
|
|
|
|||
|
|
@ -400,13 +400,13 @@ public final class ChatChannelSubscriberInputPanelNode: ChatInputPanelNode {
|
|||
|
||||
if previousState?.theme !== interfaceState.theme {
|
||||
self.helpButtonIconView.image = generateTintedImage(image: UIImage(bundleImageName: "Chat/Input/Accessory Panels/Help"), color: .white)?.withRenderingMode(.alwaysTemplate)
|
||||
self.helpButtonIconView.tintColor = interfaceState.theme.chat.inputPanel.inputControlColor
|
||||
self.helpButtonIconView.tintColor = interfaceState.theme.chat.inputPanel.panelControlColor
|
||||
|
||||
self.suggestedPostButtonIconView.image = generateTintedImage(image: UIImage(bundleImageName: "Chat/Input/Accessory Panels/SuggestPost"), color: .white)?.withRenderingMode(.alwaysTemplate)
|
||||
self.suggestedPostButtonIconView.tintColor = interfaceState.theme.chat.inputPanel.inputControlColor
|
||||
self.suggestedPostButtonIconView.tintColor = interfaceState.theme.chat.inputPanel.panelControlColor
|
||||
|
||||
self.giftButtonIconView.image = generateTintedImage(image: UIImage(bundleImageName: "Chat/Input/Accessory Panels/Gift"), color: .white)?.withRenderingMode(.alwaysTemplate)
|
||||
self.giftButtonIconView.tintColor = interfaceState.theme.chat.inputPanel.inputControlColor
|
||||
self.giftButtonIconView.tintColor = interfaceState.theme.chat.inputPanel.panelControlColor
|
||||
}
|
||||
|
||||
if let context = self.context, let peer = interfaceState.renderedPeer?.peer, previousState?.renderedPeer?.peer == nil || !peer.isEqual(previousState!.renderedPeer!.peer!) || previousState?.theme !== interfaceState.theme || previousState?.strings !== interfaceState.strings || previousState?.peerIsMuted != interfaceState.peerIsMuted || previousState?.pinnedMessage != interfaceState.pinnedMessage || force {
|
||||
|
|
@ -441,7 +441,7 @@ public final class ChatChannelSubscriberInputPanelNode: ChatInputPanelNode {
|
|||
if case .join = self.action {
|
||||
titleColor = interfaceState.theme.chat.inputPanel.actionControlForegroundColor
|
||||
} else {
|
||||
titleColor = interfaceState.theme.chat.inputPanel.inputControlColor
|
||||
titleColor = interfaceState.theme.chat.inputPanel.panelControlColor
|
||||
}
|
||||
self.buttonTitle.attributedText = NSAttributedString(string: title, font: Font.regular(17.0), textColor: titleColor)
|
||||
self.buttonTintTitle.attributedText = NSAttributedString(string: title, font: Font.regular(17.0), textColor: .black)
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ private final class GlassButtonView: HighlightTrackingButton {
|
|||
func update(theme: PresentationTheme, size: CGSize, transition: ComponentTransition) {
|
||||
let params = Params(theme: theme, size: size)
|
||||
if self.params != params {
|
||||
self.iconView.tintColor = params.theme.chat.inputPanel.inputControlColor
|
||||
self.iconView.tintColor = params.theme.chat.inputPanel.panelControlColor
|
||||
self.params = params
|
||||
self.updateImpl(params: params, transition: transition)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -415,7 +415,7 @@ public final class ChatRecordingPreviewInputPanelNodeImpl: ChatInputPanelNode {
|
|||
}
|
||||
|
||||
if updateWaveform {
|
||||
self.waveformNode.waveformNode.setup(color: interfaceState.theme.chat.inputPanel.inputControlColor.withMultipliedAlpha(0.4), gravity: .center, waveform: audio.waveform)
|
||||
self.waveformNode.waveformNode.setup(color: interfaceState.theme.chat.inputPanel.panelControlColor.withMultipliedAlpha(0.4), gravity: .center, waveform: audio.waveform)
|
||||
self.waveformNode.foregroundWaveformNode.setup(color: interfaceState.theme.list.itemCheckColors.foregroundColor.withMultipliedAlpha(0.5), gravity: .center, waveform: audio.waveform)
|
||||
self.tintWaveformNode.setup(color: UIColor(white: 0.0, alpha: 0.5), gravity: .center, waveform: audio.waveform)
|
||||
self.waveformForegroundNode.setup(color: interfaceState.theme.list.itemCheckColors.foregroundColor, gravity: .center, waveform: audio.waveform)
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ swift_library(
|
|||
"//submodules/TelegramUI/Components/MaskedContainerComponent",
|
||||
"//submodules/AppBundle",
|
||||
"//submodules/PresentationDataUtils",
|
||||
"//submodules/TelegramUI/Components/GlassBackgroundComponent",
|
||||
],
|
||||
visibility = [
|
||||
"//visibility:public",
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -21,6 +21,7 @@ import TextBadgeComponent
|
|||
import MaskedContainerComponent
|
||||
import AppBundle
|
||||
import PresentationDataUtils
|
||||
import GlassBackgroundComponent
|
||||
|
||||
public final class ChatSidePanelEnvironment: Equatable {
|
||||
public let insets: UIEdgeInsets
|
||||
|
|
@ -1442,7 +1443,6 @@ public final class ChatSideTopicsPanel: Component {
|
|||
private let scrollViewMask: UIImageView
|
||||
|
||||
private var background: ComponentView<Empty>?
|
||||
private var separatorLayer: SimpleLayer?
|
||||
|
||||
private let selectedLineContainer: AsyncListComponent.OverlayContainerView
|
||||
private let selectedLineView: UIImageView
|
||||
|
|
@ -1486,6 +1486,7 @@ public final class ChatSideTopicsPanel: Component {
|
|||
self.scrollContainerView = UIView()
|
||||
self.scrollViewMask = UIImageView()
|
||||
self.scrollContainerView.mask = self.scrollViewMask
|
||||
//self.scrollContainerView.addSubview(self.scrollViewMask)
|
||||
|
||||
super.init(frame: frame)
|
||||
|
||||
|
|
@ -1721,10 +1722,72 @@ public final class ChatSideTopicsPanel: Component {
|
|||
|
||||
switch component.location {
|
||||
case .side:
|
||||
self.scrollViewMask.image = generateGradientImage(size: CGSize(width: 8.0, height: 8.0), colors: [
|
||||
UIColor(white: 1.0, alpha: 0.0),
|
||||
UIColor(white: 1.0, alpha: 1.0)
|
||||
], locations: [0.0, 1.0], direction: .vertical)?.stretchableImage(withLeftCapWidth: 0, topCapHeight: 8)
|
||||
let cornerRadius: CGFloat = 20.0
|
||||
self.scrollViewMask.image = generateImage(CGSize(width: 1.0 + cornerRadius * 2.0, height: 8.0 + 1.0 + cornerRadius * 2.0), rotatedContext: { size, context in
|
||||
UIGraphicsPushContext(context)
|
||||
defer {
|
||||
UIGraphicsPopContext()
|
||||
}
|
||||
|
||||
context.clear(CGRect(origin: CGPoint(), size: size))
|
||||
|
||||
let spreadPath = UIBezierPath(
|
||||
roundedRect: CGRect(origin: CGPoint(x: 0.0, y: -cornerRadius), size: CGSize(width: size.width, height: size.height + cornerRadius)),
|
||||
cornerRadius: cornerRadius
|
||||
).cgPath
|
||||
context.setFillColor(UIColor.black.cgColor)
|
||||
context.addPath(spreadPath)
|
||||
context.fillPath()
|
||||
|
||||
if let image = generateGradientImage(size: CGSize(width: 8.0, height: 8.0), colors: [
|
||||
UIColor(white: 1.0, alpha: 1.0),
|
||||
UIColor(white: 1.0, alpha: 0.0)
|
||||
], locations: [0.0, 1.0], direction: .vertical) {
|
||||
image.draw(in: CGRect(origin: CGPoint(), size: CGSize(width: size.width, height: image.size.width)), blendMode: .destinationOut, alpha: 1.0)
|
||||
}
|
||||
|
||||
/*let innerSize = size
|
||||
let shadowInset: CGFloat = 32.0
|
||||
|
||||
let addInnerShadow: (CGPoint, CGFloat, UIColor) -> Void = { position, blur, shadowColor in
|
||||
if let image = generateImage(CGSize(width: size.width + shadowInset * 2.0, height: size.height + shadowInset * 2.0), rotatedContext: { size, context in
|
||||
context.clear(CGRect(origin: CGPoint(), size: size))
|
||||
let spreadRect = CGRect(origin: CGPoint(x: shadowInset, y: shadowInset), size: innerSize).insetBy(dx: -0.25, dy: -0.25)
|
||||
let spreadPath = UIBezierPath(
|
||||
roundedRect: spreadRect,
|
||||
cornerRadius: min(spreadRect.width, spreadRect.height) * 0.5
|
||||
).cgPath
|
||||
|
||||
context.setShadow(offset: CGSize(width: position.x, height: position.y), blur: blur, color: shadowColor.cgColor)
|
||||
context.setFillColor(shadowColor.cgColor)
|
||||
let enclosingRect = spreadRect.insetBy(dx: -10000.0, dy: -10000.0)
|
||||
for _ in 0 ..< 3 {
|
||||
context.addPath(UIBezierPath(rect: enclosingRect).cgPath)
|
||||
context.addPath(spreadPath)
|
||||
context.fillPath(using: .evenOdd)
|
||||
}
|
||||
|
||||
/*let cleanRect = CGRect(origin: CGPoint(x: shadowInset, y: shadowInset), size: innerSize)
|
||||
let cleanPath = UIBezierPath(
|
||||
roundedRect: cleanRect,
|
||||
cornerRadius: min(cleanRect.width, cleanRect.height) * 0.5
|
||||
).cgPath
|
||||
context.setBlendMode(.copy)
|
||||
context.setFillColor(UIColor.clear.cgColor)
|
||||
context.addPath(UIBezierPath(rect: enclosingRect).cgPath)
|
||||
context.addPath(cleanPath)
|
||||
context.fillPath(using: .evenOdd)
|
||||
context.setBlendMode(.normal)*/
|
||||
}) {
|
||||
image.draw(in: CGRect(origin: CGPoint(x: -shadowInset, y: -shadowInset), size: CGSize(width: image.size.width, height: image.size.height)), blendMode: .normal, alpha: 1.0)
|
||||
}
|
||||
}
|
||||
|
||||
addInnerShadow(CGPoint(x: 0.0, y: -6.0), 10.0, .red)
|
||||
addInnerShadow(CGPoint(x: 0.0, y: 6.0), 10.0, .red)*/
|
||||
|
||||
|
||||
})?.stretchableImage(withLeftCapWidth: Int(cornerRadius) + 1, topCapHeight: Int(cornerRadius) + 1)
|
||||
case .top:
|
||||
self.scrollViewMask.image = generateGradientImage(size: CGSize(width: 8.0, height: 8.0), colors: [
|
||||
UIColor(white: 1.0, alpha: 0.0),
|
||||
|
|
@ -1735,45 +1798,6 @@ public final class ChatSideTopicsPanel: Component {
|
|||
let themeUpdated = self.component?.theme !== component.theme
|
||||
self.component = component
|
||||
|
||||
if case .side = component.location {
|
||||
let background: ComponentView<Empty>
|
||||
if let current = self.background {
|
||||
background = current
|
||||
} else {
|
||||
background = ComponentView()
|
||||
self.background = background
|
||||
}
|
||||
let _ = background.update(
|
||||
transition: transition,
|
||||
component: AnyComponent(BlurredBackgroundComponent(
|
||||
color: component.theme.rootController.navigationBar.blurredBackgroundColor
|
||||
)),
|
||||
environment: {},
|
||||
containerSize: availableSize
|
||||
)
|
||||
|
||||
if let backgroundView = background.view {
|
||||
if backgroundView.superview == nil {
|
||||
self.insertSubview(backgroundView, at: 0)
|
||||
}
|
||||
transition.setFrame(view: backgroundView, frame: CGRect(origin: CGPoint(), size: availableSize))
|
||||
}
|
||||
|
||||
let separatorLayer: SimpleLayer
|
||||
if let current = self.separatorLayer {
|
||||
separatorLayer = current
|
||||
} else {
|
||||
separatorLayer = SimpleLayer()
|
||||
self.separatorLayer = separatorLayer
|
||||
self.layer.addSublayer(separatorLayer)
|
||||
}
|
||||
if themeUpdated {
|
||||
separatorLayer.backgroundColor = component.theme.rootController.navigationBar.separatorColor.cgColor
|
||||
}
|
||||
|
||||
transition.setFrame(layer: separatorLayer, frame: CGRect(origin: CGPoint(x: availableSize.width, y: 0.0), size: CGSize(width: UIScreenPixel, height: availableSize.height)))
|
||||
}
|
||||
|
||||
if themeUpdated {
|
||||
switch component.location {
|
||||
case .side:
|
||||
|
|
@ -1871,7 +1895,7 @@ public final class ChatSideTopicsPanel: Component {
|
|||
let itemFrame: CGRect
|
||||
switch component.location {
|
||||
case .side:
|
||||
itemFrame = CGRect(origin: CGPoint(x: 0.0, y: directionContainerInset), size: itemSize)
|
||||
itemFrame = CGRect(origin: CGPoint(x: 8.0 + 4.0, y: directionContainerInset + 8.0), size: itemSize)
|
||||
directionContainerInset += itemSize.height
|
||||
case .top:
|
||||
itemFrame = CGRect(origin: CGPoint(x: directionContainerInset, y: 0.0), size: itemSize)
|
||||
|
|
@ -1890,18 +1914,51 @@ public final class ChatSideTopicsPanel: Component {
|
|||
let scrollSize: CGSize
|
||||
let scrollFrame: CGRect
|
||||
let listContentInsets: UIEdgeInsets
|
||||
let additionalInsets: UIEdgeInsets
|
||||
switch component.location {
|
||||
case .side:
|
||||
scrollSize = CGSize(width: availableSize.width, height: availableSize.height - directionContainerInset)
|
||||
scrollFrame = CGRect(origin: CGPoint(x: 0.0, y: directionContainerInset), size: scrollSize)
|
||||
listContentInsets = UIEdgeInsets(top: 8.0 + environment.insets.top, left: 0.0, bottom: 8.0 + environment.insets.bottom, right: 0.0)
|
||||
additionalInsets = UIEdgeInsets(top: 8.0, left: 8.0, bottom: 8.0, right: 0.0)
|
||||
scrollSize = CGSize(width: availableSize.width, height: availableSize.height - directionContainerInset - environment.insets.top - containerInsets.bottom - additionalInsets.top - additionalInsets.bottom)
|
||||
scrollFrame = CGRect(origin: CGPoint(x: additionalInsets.left, y: directionContainerInset + environment.insets.top + additionalInsets.top), size: scrollSize)
|
||||
listContentInsets = UIEdgeInsets(top: 8.0, left: 0.0, bottom: 8.0, right: 0.0)
|
||||
case .top:
|
||||
scrollSize = CGSize(width: availableSize.width - directionContainerInset, height: availableSize.height)
|
||||
scrollFrame = CGRect(origin: CGPoint(x: directionContainerInset, y: 0.0), size: scrollSize)
|
||||
listContentInsets = UIEdgeInsets(top: 0.0, left: 8.0, bottom: 0.0, right: 8.0)
|
||||
additionalInsets = UIEdgeInsets()
|
||||
}
|
||||
|
||||
if case .side = component.location {
|
||||
let background: ComponentView<Empty>
|
||||
if let current = self.background {
|
||||
background = current
|
||||
} else {
|
||||
background = ComponentView()
|
||||
self.background = background
|
||||
}
|
||||
let backgroundFrame = CGRect(origin: CGPoint(x: scrollFrame.minX, y: environment.insets.top + additionalInsets.top), size: CGSize(width: scrollFrame.width, height: scrollFrame.height + directionContainerInset))
|
||||
let _ = background.update(
|
||||
transition: transition,
|
||||
component: AnyComponent(GlassBackgroundComponent(
|
||||
size: backgroundFrame.size,
|
||||
cornerRadius: 20.0,
|
||||
isDark: component.theme.overallDarkAppearance,
|
||||
tintColor: .init(kind: .panel, color: component.theme.chat.inputPanel.inputBackgroundColor.withMultipliedAlpha(0.7))
|
||||
)),
|
||||
environment: {},
|
||||
containerSize: backgroundFrame.size
|
||||
)
|
||||
|
||||
if let backgroundView = background.view {
|
||||
if backgroundView.superview == nil {
|
||||
self.insertSubview(backgroundView, at: 0)
|
||||
}
|
||||
transition.setFrame(view: backgroundView, frame: backgroundFrame)
|
||||
}
|
||||
}
|
||||
|
||||
self.scrollContainerView.frame = scrollFrame
|
||||
|
||||
self.scrollViewMask.frame = CGRect(origin: CGPoint(x: 0.0, y: 0.0), size: scrollSize)
|
||||
|
||||
let scrollToId: ScrollId
|
||||
|
|
|
|||
|
|
@ -196,8 +196,8 @@ public final class ChatTextInputActionButtonsNode: ASDisplayNode, ChatSendMessag
|
|||
self.expandMediaInputButtonIcon = GlassBackgroundView.ContentImageView()
|
||||
self.expandMediaInputButtonBackgroundView.contentView.addSubview(self.expandMediaInputButtonIcon)
|
||||
self.expandMediaInputButtonIcon.image = PresentationResourcesChat.chatInputPanelExpandButtonImage(presentationInterfaceState.theme)
|
||||
self.expandMediaInputButtonIcon.tintColor = theme.chat.inputPanel.inputControlColor
|
||||
self.expandMediaInputButtonIcon.setMonochromaticEffect(tintColor: theme.chat.inputPanel.inputControlColor)
|
||||
self.expandMediaInputButtonIcon.tintColor = theme.chat.inputPanel.panelControlColor
|
||||
self.expandMediaInputButtonIcon.setMonochromaticEffect(tintColor: theme.chat.inputPanel.panelControlColor)
|
||||
|
||||
super.init()
|
||||
|
||||
|
|
@ -265,8 +265,8 @@ public final class ChatTextInputActionButtonsNode: ASDisplayNode, ChatSendMessag
|
|||
|
||||
public func updateTheme(theme: PresentationTheme, wallpaper: TelegramWallpaper) {
|
||||
self.micButton.updateTheme(theme: theme)
|
||||
self.expandMediaInputButtonIcon.tintColor = theme.chat.inputPanel.inputControlColor
|
||||
self.expandMediaInputButtonIcon.setMonochromaticEffect(tintColor: theme.chat.inputPanel.inputControlColor)
|
||||
self.expandMediaInputButtonIcon.tintColor = theme.chat.inputPanel.panelControlColor
|
||||
self.expandMediaInputButtonIcon.setMonochromaticEffect(tintColor: theme.chat.inputPanel.panelControlColor)
|
||||
}
|
||||
|
||||
private var absoluteRect: (CGRect, CGSize)?
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ public final class ChatTextInputAudioRecordingCancelIndicator: UIView, GlassBack
|
|||
|
||||
self.arrowView = GlassBackgroundView.ContentImageView()
|
||||
self.arrowView.image = UIImage(bundleImageName: "Chat/Input/Text/AudioRecordingCancelArrow")?.withRenderingMode(.alwaysTemplate)
|
||||
self.arrowView.tintColor = theme.chat.inputPanel.inputControlColor
|
||||
self.arrowView.tintColor = theme.chat.inputPanel.panelControlColor
|
||||
|
||||
self.labelNode = TextNode()
|
||||
self.labelNode.displaysAsynchronously = false
|
||||
|
|
@ -56,7 +56,7 @@ public final class ChatTextInputAudioRecordingCancelIndicator: UIView, GlassBack
|
|||
|
||||
let makeLayout = TextNode.asyncLayout(self.labelNode)
|
||||
let makeTintLayout = TextNode.asyncLayout(self.tintLabelNode)
|
||||
let (labelLayout, labelApply) = makeLayout(TextNodeLayoutArguments(attributedString: NSAttributedString(string: strings.Conversation_SlideToCancel, font: Font.regular(14.0), textColor: theme.chat.inputPanel.inputControlColor), backgroundColor: nil, maximumNumberOfLines: 1, truncationType: .end, constrainedSize: CGSize(width: 200.0, height: 100.0), alignment: .natural, cutout: nil, insets: UIEdgeInsets()))
|
||||
let (labelLayout, labelApply) = makeLayout(TextNodeLayoutArguments(attributedString: NSAttributedString(string: strings.Conversation_SlideToCancel, font: Font.regular(14.0), textColor: theme.chat.inputPanel.panelControlColor), backgroundColor: nil, maximumNumberOfLines: 1, truncationType: .end, constrainedSize: CGSize(width: 200.0, height: 100.0), alignment: .natural, cutout: nil, insets: UIEdgeInsets()))
|
||||
let (_, tintLabelApply) = makeTintLayout(TextNodeLayoutArguments(attributedString: NSAttributedString(string: strings.Conversation_SlideToCancel, font: Font.regular(14.0), textColor: .black), backgroundColor: nil, maximumNumberOfLines: 1, truncationType: .end, constrainedSize: CGSize(width: 200.0, height: 100.0), alignment: .natural, cutout: nil, insets: UIEdgeInsets()))
|
||||
let _ = labelApply()
|
||||
let _ = tintLabelApply
|
||||
|
|
@ -79,7 +79,7 @@ public final class ChatTextInputAudioRecordingCancelIndicator: UIView, GlassBack
|
|||
}
|
||||
|
||||
public func updateTheme(theme: PresentationTheme) {
|
||||
self.arrowView.tintColor = theme.chat.inputPanel.inputControlColor
|
||||
self.arrowView.tintColor = theme.chat.inputPanel.panelControlColor
|
||||
self.cancelButton.setTitle(self.strings.Common_Cancel, with: cancelFont, with: theme.chat.inputPanel.panelControlAccentColor, for: [])
|
||||
let makeLayout = TextNode.asyncLayout(self.labelNode)
|
||||
let makeTintLayout = TextNode.asyncLayout(self.tintLabelNode)
|
||||
|
|
|
|||
|
|
@ -87,8 +87,13 @@ final class AccessoryItemIconButton: HighlightTrackingButton, GlassBackgroundVie
|
|||
}
|
||||
|
||||
self.iconImageView.image = image
|
||||
self.iconImageView.tintColor = theme.chat.inputPanel.inputControlColor
|
||||
self.iconImageView.alpha = alpha
|
||||
if #available(iOS 26.0, *) {
|
||||
self.iconImageView.tintColor = theme.chat.inputPanel.inputControlColor.withAlphaComponent(1.0)
|
||||
self.iconImageView.alpha = alpha * theme.chat.inputPanel.inputControlColor.alpha
|
||||
} else {
|
||||
self.iconImageView.tintColor = theme.chat.inputPanel.inputControlColor
|
||||
self.iconImageView.alpha = alpha
|
||||
}
|
||||
|
||||
self.accessibilityLabel = accessibilityLabel
|
||||
|
||||
|
|
@ -128,8 +133,13 @@ final class AccessoryItemIconButton: HighlightTrackingButton, GlassBackgroundVie
|
|||
}
|
||||
|
||||
self.iconImageView.image = image
|
||||
self.iconImageView.tintColor = theme.chat.inputPanel.inputControlColor
|
||||
self.iconImageView.alpha = alpha
|
||||
if #available(iOS 26.0, *) {
|
||||
self.iconImageView.tintColor = theme.chat.inputPanel.inputControlColor.withAlphaComponent(1.0)
|
||||
self.iconImageView.alpha = alpha * theme.chat.inputPanel.inputControlColor.alpha
|
||||
} else {
|
||||
self.iconImageView.tintColor = theme.chat.inputPanel.inputControlColor
|
||||
self.iconImageView.alpha = alpha
|
||||
}
|
||||
|
||||
self.accessibilityLabel = accessibilityLabel
|
||||
}
|
||||
|
|
@ -308,7 +318,7 @@ final class AccessoryItemIconButton: HighlightTrackingButton, GlassBackgroundVie
|
|||
transition: .immediate,
|
||||
component: AnyComponent(LottieComponent(
|
||||
content: LottieComponent.AppBundleContent(name: animationName),
|
||||
color: self.theme.chat.inputPanel.inputControlColor
|
||||
color: self.theme.chat.inputPanel.inputControlColor.withAlphaComponent(1.0)
|
||||
)),
|
||||
environment: {},
|
||||
containerSize: animationFrame.size
|
||||
|
|
@ -322,7 +332,8 @@ final class AccessoryItemIconButton: HighlightTrackingButton, GlassBackgroundVie
|
|||
self.tintMask.addSubview(tintMaskAnimationView)
|
||||
}
|
||||
}
|
||||
view.setMonochromaticEffect(tintColor: self.theme.chat.inputPanel.inputControlColor)
|
||||
view.setMonochromaticEffect(tintColor: self.theme.chat.inputPanel.inputControlColor.withAlphaComponent(1.0))
|
||||
view.alpha = self.theme.chat.inputPanel.inputControlColor.alpha
|
||||
let animationFrameValue = CGRect(origin: CGPoint(x: animationFrame.minX + floor((animationFrame.width - animationSize.width) / 2.0), y: animationFrame.minY + floor((animationFrame.height - animationSize.height) / 2.0)), size: animationSize)
|
||||
view.frame = animationFrameValue
|
||||
if let tintMaskAnimationView = self.tintMaskAnimationView {
|
||||
|
|
|
|||
|
|
@ -1597,13 +1597,13 @@ public class ChatTextInputPanelNode: ChatInputPanelNode, ASEditableTextNodeDeleg
|
|||
|
||||
if interfaceState.interfaceState.mediaDraftState != nil {
|
||||
self.attachmentButtonIcon.image = UIImage(bundleImageName: "Chat/Context Menu/Delete")?.withRenderingMode(.alwaysTemplate)
|
||||
self.attachmentButtonIcon.tintColor = interfaceState.theme.chat.inputPanel.inputControlColor
|
||||
self.attachmentButtonIcon.tintColor = interfaceState.theme.chat.inputPanel.panelControlColor
|
||||
} else if isEditingMedia {
|
||||
self.attachmentButtonIcon.image = PresentationResourcesChat.chatInputPanelEditAttachmentButtonImage(interfaceState.theme)
|
||||
self.attachmentButtonIcon.tintColor = interfaceState.theme.chat.inputPanel.inputControlColor
|
||||
self.attachmentButtonIcon.tintColor = interfaceState.theme.chat.inputPanel.panelControlColor
|
||||
} else {
|
||||
self.attachmentButtonIcon.image = PresentationResourcesChat.chatInputPanelAttachmentButtonImage(interfaceState.theme)
|
||||
self.attachmentButtonIcon.tintColor = interfaceState.theme.chat.inputPanel.inputControlColor
|
||||
self.attachmentButtonIcon.tintColor = interfaceState.theme.chat.inputPanel.panelControlColor
|
||||
}
|
||||
|
||||
self.actionButtons.updateTheme(theme: interfaceState.theme, wallpaper: interfaceState.chatWallpaper)
|
||||
|
|
@ -1630,13 +1630,13 @@ public class ChatTextInputPanelNode: ChatInputPanelNode, ASEditableTextNodeDeleg
|
|||
if wasEditingMedia != isEditingMedia || hadMediaDraft != hasMediaDraft {
|
||||
if interfaceState.interfaceState.mediaDraftState != nil {
|
||||
self.attachmentButtonIcon.image = UIImage(bundleImageName: "Chat/Context Menu/Delete")?.withRenderingMode(.alwaysTemplate)
|
||||
self.attachmentButtonIcon.tintColor = interfaceState.theme.chat.inputPanel.inputControlColor
|
||||
self.attachmentButtonIcon.tintColor = interfaceState.theme.chat.inputPanel.panelControlColor
|
||||
} else if isEditingMedia {
|
||||
self.attachmentButtonIcon.image = PresentationResourcesChat.chatInputPanelEditAttachmentButtonImage(interfaceState.theme)
|
||||
self.attachmentButtonIcon.tintColor = interfaceState.theme.chat.inputPanel.actionControlForegroundColor
|
||||
} else {
|
||||
self.attachmentButtonIcon.image = PresentationResourcesChat.chatInputPanelAttachmentButtonImage(interfaceState.theme)
|
||||
self.attachmentButtonIcon.tintColor = interfaceState.theme.chat.inputPanel.inputControlColor
|
||||
self.attachmentButtonIcon.tintColor = interfaceState.theme.chat.inputPanel.panelControlColor
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -420,7 +420,7 @@ public final class ChatTextInputMediaRecordingButton: TGModernConversationInputM
|
|||
animationName = "anim_micToVideo"
|
||||
}
|
||||
|
||||
let animationTintColor = self.useDarkTheme ? .white : self.theme.chat.inputPanel.inputControlColor
|
||||
let animationTintColor = self.useDarkTheme ? .white : self.theme.chat.inputPanel.panelControlColor
|
||||
let _ = self.animationView.update(
|
||||
transition: .immediate,
|
||||
component: AnyComponent(LottieComponent(
|
||||
|
|
|
|||
|
|
@ -316,7 +316,7 @@ public class GlassBackgroundView: UIView {
|
|||
self.foregroundView = nil
|
||||
self.shadowView = nil
|
||||
} else {
|
||||
self.backgroundNode = NavigationBackgroundNode(color: .black, enableBlur: true, customBlurRadius: 5.0)
|
||||
self.backgroundNode = NavigationBackgroundNode(color: .black, enableBlur: true, customBlurRadius: 8.0)
|
||||
self.nativeView = nil
|
||||
self.nativeContainerView = nil
|
||||
self.nativeParamsView = nil
|
||||
|
|
@ -682,9 +682,9 @@ public extension GlassBackgroundView {
|
|||
context.setFillColor(fillColor.cgColor)
|
||||
context.fillEllipse(in: CGRect(origin: CGPoint(), size: size).insetBy(dx: inset, dy: inset))
|
||||
|
||||
addShadow(false, CGPoint(x: 0.0, y: 0.0), 3.0, 0.0, UIColor(white: 1.0, alpha: 0.5), false)
|
||||
addShadow(false, CGPoint(x: 3.0, y: -3.0), 2.0, 0.0, UIColor(white: 1.0, alpha: 0.25), false)
|
||||
addShadow(false, CGPoint(x: -3.0, y: 3.0), 2.0, 0.0, UIColor(white: 1.0, alpha: 0.25), false)
|
||||
addShadow(false, CGPoint(x: 0.0, y: 0.0), 3.0, 0.0, UIColor(white: 1.0, alpha: 0.25), false)
|
||||
addShadow(false, CGPoint(x: 2.0, y: -2.0), 1.0, 0.0, UIColor(white: 1.0, alpha: 0.125), false)
|
||||
addShadow(false, CGPoint(x: -2.0, y: 2.0), 1.0, 0.0, UIColor(white: 1.0, alpha: 0.125), false)
|
||||
} else {
|
||||
addShadow(true, CGPoint(), 16.0, 0.0, UIColor(white: 0.0, alpha: 0.08), false)
|
||||
|
||||
|
|
@ -822,7 +822,6 @@ public final class GlassBackgroundComponent: Component {
|
|||
public final class View: GlassBackgroundView {
|
||||
func update(component: GlassBackgroundComponent, availableSize: CGSize, state: EmptyComponentState, environment: Environment<Empty>, transition: ComponentTransition) -> CGSize {
|
||||
self.update(size: component.size, cornerRadius: component.cornerRadius, isDark: component.isDark, tintColor: component.tintColor, transition: transition)
|
||||
self.frame = CGRect(origin: .zero, size: component.size)
|
||||
|
||||
return component.size
|
||||
}
|
||||
|
|
|
|||
|
|
@ -501,7 +501,7 @@ public final class TabBarComponent: Component {
|
|||
let size = CGSize(width: min(availableSize.width, contentWidth), height: contentHeight)
|
||||
|
||||
transition.setFrame(view: self.backgroundView, frame: CGRect(origin: CGPoint(), size: size))
|
||||
self.backgroundView.update(size: size, cornerRadius: size.height * 0.5, isDark: component.theme.overallDarkAppearance, tintColor: .init(kind: .panel, color: component.theme.list.plainBackgroundColor.withMultipliedAlpha(0.75)), transition: transition)
|
||||
self.backgroundView.update(size: size, cornerRadius: size.height * 0.5, isDark: component.theme.overallDarkAppearance, tintColor: .init(kind: .panel, color: component.theme.chat.inputPanel.inputBackgroundColor.withMultipliedAlpha(0.7)), transition: transition)
|
||||
|
||||
if let nativeTabBar = self.nativeTabBar {
|
||||
transition.setFrame(view: nativeTabBar, frame: CGRect(origin: CGPoint(x: floor((size.width - nativeTabBar.bounds.width) * 0.5), y: 0.0), size: nativeTabBar.bounds.size))
|
||||
|
|
|
|||
|
|
@ -601,7 +601,7 @@ private final class VideoMessageCameraScreenComponent: CombinedComponent {
|
|||
component: AnyComponent(
|
||||
Image(
|
||||
image: state.image(.flip, theme: environment.theme),
|
||||
tintColor: environment.theme.chat.inputPanel.inputControlColor,
|
||||
tintColor: environment.theme.chat.inputPanel.panelControlColor,
|
||||
size: CGSize(width: 30.0, height: 30.0)
|
||||
)
|
||||
)
|
||||
|
|
@ -646,7 +646,7 @@ private final class VideoMessageCameraScreenComponent: CombinedComponent {
|
|||
component: AnyComponent(
|
||||
LottieComponent(
|
||||
content: LottieComponent.AppBundleContent(name: flashIconName),
|
||||
color: environment.theme.chat.inputPanel.inputControlColor,
|
||||
color: environment.theme.chat.inputPanel.panelControlColor,
|
||||
startingPosition: !component.cameraState.flashModeDidChange ? .end : .begin,
|
||||
size: CGSize(width: 40.0, height: 40.0),
|
||||
loop: false,
|
||||
|
|
@ -660,7 +660,7 @@ private final class VideoMessageCameraScreenComponent: CombinedComponent {
|
|||
component: AnyComponent(
|
||||
Image(
|
||||
image: state.image(.flash, theme: environment.theme),
|
||||
tintColor: environment.theme.chat.inputPanel.inputControlColor,
|
||||
tintColor: environment.theme.chat.inputPanel.panelControlColor,
|
||||
size: CGSize(width: 30.0, height: 30.0)
|
||||
)
|
||||
)
|
||||
|
|
@ -732,7 +732,7 @@ private final class VideoMessageCameraScreenComponent: CombinedComponent {
|
|||
component: AnyComponent(
|
||||
BundleIconComponent(
|
||||
name: component.cameraState.isViewOnceEnabled ? "Media Gallery/ViewOnceEnabled" : "Media Gallery/ViewOnce",
|
||||
tintColor: environment.theme.chat.inputPanel.inputControlColor
|
||||
tintColor: environment.theme.chat.inputPanel.panelControlColor
|
||||
)
|
||||
)
|
||||
)
|
||||
|
|
@ -776,7 +776,7 @@ private final class VideoMessageCameraScreenComponent: CombinedComponent {
|
|||
component: AnyComponent(
|
||||
BundleIconComponent(
|
||||
name: "Chat/Input/Text/IconVideo",
|
||||
tintColor: environment.theme.chat.inputPanel.inputControlColor
|
||||
tintColor: environment.theme.chat.inputPanel.panelControlColor
|
||||
)
|
||||
)
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1340,9 +1340,8 @@ class ChatControllerNode: ASDisplayNode, ASScrollViewDelegate {
|
|||
self.titleTopicsAccessoryPanelNode = nil
|
||||
}
|
||||
|
||||
var defaultLeftPanelWidth: CGFloat = 72.0
|
||||
defaultLeftPanelWidth += layout.safeInsets.left
|
||||
let leftPanelLeftInset = defaultLeftPanelWidth - 72.0
|
||||
let defaultLeftPanelWidth: CGFloat = 72.0 + 8.0
|
||||
let leftPanelLeftInset = defaultLeftPanelWidth - (72.0 + 8.0)
|
||||
|
||||
var leftPanelSize: CGSize?
|
||||
var dismissedLeftPanel: (component: AnyComponentWithIdentity<ChatSidePanelEnvironment>, view: ComponentView<ChatSidePanelEnvironment>)?
|
||||
|
|
@ -1356,7 +1355,7 @@ class ChatControllerNode: ASDisplayNode, ASScrollViewDelegate {
|
|||
self.leftPanel = (leftPanelComponent, leftPanel.view)
|
||||
}
|
||||
|
||||
leftPanelSize = CGSize(width: defaultLeftPanelWidth, height: layout.size.height)
|
||||
leftPanelSize = CGSize(width: defaultLeftPanelWidth + 8.0, height: layout.size.height)
|
||||
} else if let leftPanel = self.leftPanel {
|
||||
dismissedLeftPanel = leftPanel
|
||||
self.leftPanel = nil
|
||||
|
|
@ -1378,7 +1377,7 @@ class ChatControllerNode: ASDisplayNode, ASScrollViewDelegate {
|
|||
titleAccessoryPanelNode.clipsToBounds = true
|
||||
}
|
||||
|
||||
let layoutResult = titleAccessoryPanelNode.updateLayout(width: layout.size.width, leftInset: leftPanelSize?.width ?? layout.safeInsets.left, rightInset: layout.safeInsets.right, transition: immediatelyLayoutTitleAccessoryPanelNodeAndAnimateAppearance ? .immediate : transition, interfaceState: self.chatPresentationInterfaceState)
|
||||
let layoutResult = titleAccessoryPanelNode.updateLayout(width: layout.size.width, leftInset: layout.safeInsets.left, rightInset: layout.safeInsets.right, transition: immediatelyLayoutTitleAccessoryPanelNodeAndAnimateAppearance ? .immediate : transition, interfaceState: self.chatPresentationInterfaceState)
|
||||
titleAccessoryPanelHeight = layoutResult.insetHeight
|
||||
titleAccessoryPanelBackgroundHeight = layoutResult.backgroundHeight
|
||||
titleAccessoryPanelHitTestSlop = layoutResult.hitTestSlop
|
||||
|
|
@ -1432,7 +1431,7 @@ class ChatControllerNode: ASDisplayNode, ASScrollViewDelegate {
|
|||
translationPanelNode.clipsToBounds = true
|
||||
}
|
||||
|
||||
let height = translationPanelNode.updateLayout(width: layout.size.width, leftInset: leftPanelSize?.width ?? layout.safeInsets.left, rightInset: layout.safeInsets.right, leftDisplayInset: leftPanelSize?.width ?? 0.0, transition: immediatelyLayoutTitleAccessoryPanelNodeAndAnimateAppearance ? .immediate : transition, interfaceState: self.chatPresentationInterfaceState)
|
||||
let height = translationPanelNode.updateLayout(width: layout.size.width, leftInset: layout.safeInsets.left, rightInset: layout.safeInsets.right, leftDisplayInset: 0.0, transition: immediatelyLayoutTitleAccessoryPanelNodeAndAnimateAppearance ? .immediate : transition, interfaceState: self.chatPresentationInterfaceState)
|
||||
translationPanelHeight = height
|
||||
if immediatelyLayoutTranslationPanelNodeAndAnimateAppearance {
|
||||
translationPanelNode.layer.animateAlpha(from: 0.0, to: 1.0, duration: 0.2)
|
||||
|
|
@ -1496,7 +1495,7 @@ class ChatControllerNode: ASDisplayNode, ASScrollViewDelegate {
|
|||
self.titleAccessoryPanelContainer.addSubnode(adPanelNode)
|
||||
}
|
||||
|
||||
let height = adPanelNode.updateLayout(width: layout.size.width, leftInset: leftPanelSize?.width ?? layout.safeInsets.left, rightInset: layout.safeInsets.right, transition: transition, interfaceState: self.chatPresentationInterfaceState)
|
||||
let height = adPanelNode.updateLayout(width: layout.size.width, leftInset: layout.safeInsets.left, rightInset: layout.safeInsets.right, transition: transition, interfaceState: self.chatPresentationInterfaceState)
|
||||
if let adMessage = self.chatPresentationInterfaceState.adMessage, let opaqueId = adMessage.adAttribute?.opaqueId {
|
||||
self.historyNode.markAdAsSeen(opaqueId: opaqueId)
|
||||
}
|
||||
|
|
@ -1545,7 +1544,7 @@ class ChatControllerNode: ASDisplayNode, ASScrollViewDelegate {
|
|||
self.titleAccessoryPanelContainer.addSubnode(feePanelNode)
|
||||
}
|
||||
|
||||
let height = feePanelNode.updateLayout(width: layout.size.width, leftInset: leftPanelSize?.width ?? layout.safeInsets.left, rightInset: layout.safeInsets.right, leftDisplayInset: leftPanelSize?.width ?? 0.0, transition: animateAppearance ? .immediate : transition, interfaceState: self.chatPresentationInterfaceState)
|
||||
let height = feePanelNode.updateLayout(width: layout.size.width, leftInset: layout.safeInsets.left, rightInset: layout.safeInsets.right, leftDisplayInset: 0.0, transition: animateAppearance ? .immediate : transition, interfaceState: self.chatPresentationInterfaceState)
|
||||
|
||||
feePanelHeight = height
|
||||
if transition.isAnimated && animateAppearance {
|
||||
|
|
@ -1848,8 +1847,6 @@ class ChatControllerNode: ASDisplayNode, ASScrollViewDelegate {
|
|||
|
||||
var titlePanelsContentOffset: CGFloat = 0.0
|
||||
|
||||
let sidePanelTopInset: CGFloat = insets.top
|
||||
|
||||
var titleTopicsAccessoryPanelFrame: CGRect?
|
||||
if let _ = self.titleTopicsAccessoryPanelNode, let panelHeight = titleTopicsAccessoryPanelHeight {
|
||||
titleTopicsAccessoryPanelFrame = CGRect(origin: CGPoint(x: 0.0, y: titlePanelsContentOffset), size: CGSize(width: layout.size.width, height: panelHeight))
|
||||
|
|
@ -1897,15 +1894,10 @@ class ChatControllerNode: ASDisplayNode, ASScrollViewDelegate {
|
|||
insets.top += panelHeight
|
||||
extraNavigationBarHeight += panelHeight
|
||||
}
|
||||
|
||||
var extraNavigationBarLeftCutout: CGSize?
|
||||
if let leftPanelSize {
|
||||
extraNavigationBarLeftCutout = CGSize(width: leftPanelSize.width, height: navigationBarHeight)
|
||||
} else {
|
||||
extraNavigationBarLeftCutout = CGSize(width: 0.0, height: navigationBarHeight)
|
||||
}
|
||||
|
||||
updateExtraNavigationBarBackgroundHeight(extraNavigationBarHeight, extraNavigationBarHitTestSlop, extraNavigationBarLeftCutout, transition)
|
||||
updateExtraNavigationBarBackgroundHeight(extraNavigationBarHeight, extraNavigationBarHitTestSlop, nil, transition)
|
||||
|
||||
let sidePanelTopInset: CGFloat = insets.top
|
||||
|
||||
let contentBounds = CGRect(x: 0.0, y: 0.0, width: layout.size.width - wrappingInsets.left - wrappingInsets.right, height: layout.size.height - wrappingInsets.top - wrappingInsets.bottom)
|
||||
|
||||
|
|
@ -2543,31 +2535,22 @@ class ChatControllerNode: ASDisplayNode, ASScrollViewDelegate {
|
|||
ChatSidePanelEnvironment(insets: UIEdgeInsets(
|
||||
top: 0.0,
|
||||
left: leftPanelLeftInset,
|
||||
bottom: containerInsets.bottom + inputPanelsHeight,
|
||||
bottom: containerInsets.bottom + inputPanelsHeight + 8.0,
|
||||
right: 0.0
|
||||
))
|
||||
},
|
||||
containerSize: CGSize(width: leftPanelSize.width, height: leftPanelSize.height - sidePanelTopInset)
|
||||
containerSize: CGSize(width: defaultLeftPanelWidth, height: leftPanelSize.height - sidePanelTopInset)
|
||||
)
|
||||
|
||||
let leftPanelFrame = CGRect(origin: CGPoint(x: 0.0, y: sidePanelTopInset), size: leftPanelSize)
|
||||
let leftPanelFrame = CGRect(origin: CGPoint(x: layout.safeInsets.left, y: sidePanelTopInset), size: leftPanelSize)
|
||||
if let leftPanelView = leftPanel.view.view {
|
||||
if leftPanelView.superview == nil {
|
||||
self.leftPanelContainer.view.addSubview(leftPanelView)
|
||||
}
|
||||
if immediatelyLayoutLeftPanelNodeAndAnimateAppearance {
|
||||
leftPanelView.frame = leftPanelFrame.offsetBy(dx: -leftPanelSize.width, dy: 0.0)
|
||||
|
||||
if self.titleTopicsAccessoryPanelNode != nil || dismissedTitleTopicsAccessoryPanelNode != nil {
|
||||
if let leftPanelView = leftPanelView as? ChatSideTopicsPanel.View {
|
||||
leftPanelView.updateGlobalOffset(globalOffset: -leftPanelSize.width, transition: ComponentTransition(transition))
|
||||
}
|
||||
}
|
||||
leftPanelView.frame = leftPanelFrame.offsetBy(dx: -leftPanelSize.width - 16.0, dy: 0.0)
|
||||
}
|
||||
transition.updateFrame(view: leftPanelView, frame: leftPanelFrame)
|
||||
if let leftPanelView = leftPanelView as? ChatSideTopicsPanel.View {
|
||||
leftPanelView.updateGlobalOffset(globalOffset: 0.0, transition: ComponentTransition(transition))
|
||||
}
|
||||
}
|
||||
}
|
||||
if let dismissedLeftPanel, let dismissedLeftPanelView = dismissedLeftPanel.view.view {
|
||||
|
|
@ -2584,14 +2567,9 @@ class ChatControllerNode: ASDisplayNode, ASScrollViewDelegate {
|
|||
},
|
||||
containerSize: CGSize(width: defaultLeftPanelWidth, height: layout.size.height - sidePanelTopInset - (containerInsets.bottom + inputPanelsHeight))
|
||||
)
|
||||
transition.updateFrame(view: dismissedLeftPanelView, frame: CGRect(origin: CGPoint(x: -dismissedLeftPanelSize.width, y: sidePanelTopInset), size: dismissedLeftPanelSize), completion: { [weak dismissedLeftPanelView] _ in
|
||||
transition.updateFrame(view: dismissedLeftPanelView, frame: CGRect(origin: CGPoint(x: -layout.safeInsets.left - dismissedLeftPanelSize.width - 16.0, y: sidePanelTopInset), size: dismissedLeftPanelSize), completion: { [weak dismissedLeftPanelView] _ in
|
||||
dismissedLeftPanelView?.removeFromSuperview()
|
||||
})
|
||||
if let dismissedLeftPanelView = dismissedLeftPanelView as? ChatSideTopicsPanel.View {
|
||||
if self.titleTopicsAccessoryPanelNode != nil {
|
||||
dismissedLeftPanelView.updateGlobalOffset(globalOffset: -dismissedLeftPanelSize.width, transition: ComponentTransition(transition))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if let navigationBarBackgroundContent = self.navigationBarBackgroundContent {
|
||||
|
|
@ -2612,12 +2590,8 @@ class ChatControllerNode: ASDisplayNode, ASScrollViewDelegate {
|
|||
if let titleTopicsAccessoryPanelNode = self.titleTopicsAccessoryPanelNode, let titleTopicsAccessoryPanelFrame, (immediatelyLayoutTitleTopicsAccessoryPanelNodeAndAnimateAppearance || !titleTopicsAccessoryPanelNode.frame.equalTo(titleTopicsAccessoryPanelFrame)) {
|
||||
if immediatelyLayoutTitleTopicsAccessoryPanelNodeAndAnimateAppearance {
|
||||
titleTopicsAccessoryPanelNode.frame = titleTopicsAccessoryPanelFrame.offsetBy(dx: 0.0, dy: -titleTopicsAccessoryPanelFrame.height)
|
||||
if self.leftPanel != nil || dismissedLeftPanel != nil {
|
||||
titleTopicsAccessoryPanelNode.updateGlobalOffset(globalOffset: -titleTopicsAccessoryPanelFrame.height, transition: .immediate)
|
||||
}
|
||||
|
||||
ComponentTransition(transition).setFrame(view: titleTopicsAccessoryPanelNode.view, frame: titleTopicsAccessoryPanelFrame)
|
||||
titleTopicsAccessoryPanelNode.updateGlobalOffset(globalOffset: 0.0, transition: ComponentTransition(transition))
|
||||
} else {
|
||||
let previousFrame = titleTopicsAccessoryPanelNode.frame
|
||||
titleTopicsAccessoryPanelNode.frame = titleTopicsAccessoryPanelFrame
|
||||
|
|
@ -2759,9 +2733,6 @@ class ChatControllerNode: ASDisplayNode, ASScrollViewDelegate {
|
|||
transition.updateFrame(node: dismissedTitleTopicsAccessoryPanelNode, frame: dismissedTopPanelFrame, completion: { [weak dismissedTitleTopicsAccessoryPanelNode] _ in
|
||||
dismissedTitleTopicsAccessoryPanelNode?.removeFromSupernode()
|
||||
})
|
||||
if self.leftPanel != nil {
|
||||
dismissedTitleTopicsAccessoryPanelNode.updateGlobalOffset(globalOffset: -dismissedTopPanelFrame.height, transition: ComponentTransition(transition))
|
||||
}
|
||||
}
|
||||
|
||||
if let dismissedTitleAccessoryPanelNode {
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ class ChatHistoryNavigationButtonNode: ContextControllerSourceNode {
|
|||
self.buttonNode.view.addSubview(self.backgroundView)
|
||||
self.backgroundView.frame = CGRect(origin: CGPoint(), size: size)
|
||||
self.backgroundView.update(size: size, cornerRadius: size.height * 0.5, isDark: theme.overallDarkAppearance, tintColor: .init(kind: .panel, color: theme.chat.inputPanel.inputBackgroundColor.withMultipliedAlpha(0.7)), transition: .immediate)
|
||||
self.imageView.tintColor = theme.chat.inputPanel.inputControlColor
|
||||
self.imageView.tintColor = theme.chat.inputPanel.panelControlColor
|
||||
|
||||
self.backgroundView.contentView.addSubview(self.imageView)
|
||||
self.imageView.frame = CGRect(origin: CGPoint(), size: size)
|
||||
|
|
@ -111,7 +111,7 @@ class ChatHistoryNavigationButtonNode: ContextControllerSourceNode {
|
|||
self.theme = theme
|
||||
|
||||
self.backgroundView.update(size: self.backgroundView.bounds.size, cornerRadius: self.backgroundView.bounds.size.height * 0.5, isDark: theme.overallDarkAppearance, tintColor: .init(kind: .panel, color: theme.chat.inputPanel.inputBackgroundColor.withMultipliedAlpha(0.7)), transition: .immediate)
|
||||
self.imageView.tintColor = theme.chat.inputPanel.inputControlColor
|
||||
self.imageView.tintColor = theme.chat.inputPanel.panelControlColor
|
||||
|
||||
switch self.type {
|
||||
case .down:
|
||||
|
|
|
|||
|
|
@ -308,7 +308,7 @@ final class ChatTagSearchInputPanelNode: ChatInputPanelNode {
|
|||
component: AnyComponent(PlainButtonComponent(
|
||||
content: AnyComponent(AnimatedTextComponent(
|
||||
font: Font.regular(15.0),
|
||||
color: params.interfaceState.theme.chat.inputPanel.inputControlColor,
|
||||
color: params.interfaceState.theme.chat.inputPanel.panelControlColor,
|
||||
items: modeButtonTitle
|
||||
)),
|
||||
effectAlignment: .right,
|
||||
|
|
@ -362,7 +362,7 @@ final class ChatTagSearchInputPanelNode: ChatInputPanelNode {
|
|||
component: AnyComponent(PlainButtonComponent(
|
||||
content: AnyComponent(BundleIconComponent(
|
||||
name: "Chat/Input/Search/Calendar",
|
||||
tintColor: params.interfaceState.theme.chat.inputPanel.inputControlColor
|
||||
tintColor: params.interfaceState.theme.chat.inputPanel.panelControlColor
|
||||
)),
|
||||
effectAlignment: .center,
|
||||
minSize: CGSize(width: 40.0, height: 40.0),
|
||||
|
|
@ -419,7 +419,7 @@ final class ChatTagSearchInputPanelNode: ChatInputPanelNode {
|
|||
component: AnyComponent(PlainButtonComponent(
|
||||
content: AnyComponent(BundleIconComponent(
|
||||
name: "Chat/Input/Search/Members",
|
||||
tintColor: params.interfaceState.theme.chat.inputPanel.inputControlColor
|
||||
tintColor: params.interfaceState.theme.chat.inputPanel.panelControlColor
|
||||
)),
|
||||
effectAlignment: .center,
|
||||
minSize: CGSize(width: 40.0, height: 40.0),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue