Various fixes

This commit is contained in:
Ilya Laktyushin 2025-11-14 01:30:23 +04:00
parent 87035b30ea
commit 4c89870f2d
2 changed files with 7 additions and 5 deletions

View File

@ -152,8 +152,10 @@ final class AttachmentTextInputActionButtonsNode: ASDisplayNode, ChatSendMessage
} }
titleOffset -= 2.0 titleOffset -= 2.0
buttonInset = 14.0 buttonInset = 14.0
self.iconNode.isHidden = true
} else { } else {
segments.append(.text(0, NSAttributedString(string: text, font: Font.semibold(17.0), textColor: interfaceState.theme.chat.inputPanel.actionControlForegroundColor))) segments.append(.text(0, NSAttributedString(string: text, font: Font.semibold(17.0), textColor: interfaceState.theme.chat.inputPanel.actionControlForegroundColor)))
self.iconNode.isHidden = false
} }
self.textNode.segments = segments self.textNode.segments = segments

View File

@ -64,7 +64,7 @@ public final class GlassBarButtonComponent: Component {
private let containerView: UIView private let containerView: UIView
private let genericContainerView: UIView private let genericContainerView: UIView
private let genericBackgroundView: SimpleGlassView private let genericBackgroundView: SimpleGlassView
private let glassContainerView: GlassBackgroundContainerView private let glassContainerView: UIView
private var glassBackgroundView: GlassBackgroundView? private var glassBackgroundView: GlassBackgroundView?
private var componentView: ComponentView<Empty>? private var componentView: ComponentView<Empty>?
@ -74,7 +74,7 @@ public final class GlassBarButtonComponent: Component {
self.containerView = UIView() self.containerView = UIView()
self.genericContainerView = UIView() self.genericContainerView = UIView()
self.genericBackgroundView = SimpleGlassView() self.genericBackgroundView = SimpleGlassView()
self.glassContainerView = GlassBackgroundContainerView() self.glassContainerView = UIView()
super.init(frame: frame) super.init(frame: frame)
@ -189,9 +189,9 @@ public final class GlassBarButtonComponent: Component {
transition.setAlpha(view: self.genericContainerView, alpha: genericAlpha) transition.setAlpha(view: self.genericContainerView, alpha: genericAlpha)
transition.setFrame(view: self.genericContainerView, frame: bounds) transition.setFrame(view: self.genericContainerView, frame: bounds)
transition.setAlpha(view: self.glassContainerView, alpha: glassAlpha) //transition.setAlpha(view: self.glassContainerView, alpha: glassAlpha)
transition.setFrame(view: self.glassContainerView, frame: bounds) transition.setFrame(view: self.glassContainerView, frame: bounds)
self.glassContainerView.update(size: bounds.size, isDark: component.isDark, transition: transition) //self.glassContainerView.update(size: bounds.size, isDark: component.isDark, transition: transition)
transition.setFrame(view: self.genericBackgroundView, frame: bounds) transition.setFrame(view: self.genericBackgroundView, frame: bounds)
@ -204,7 +204,7 @@ public final class GlassBarButtonComponent: Component {
glassBackgroundTransition = .immediate glassBackgroundTransition = .immediate
glassBackgroundView = GlassBackgroundView() glassBackgroundView = GlassBackgroundView()
glassBackgroundView.isUserInteractionEnabled = false glassBackgroundView.isUserInteractionEnabled = false
self.glassContainerView.contentView.addSubview(glassBackgroundView) self.glassContainerView.addSubview(glassBackgroundView)
self.glassBackgroundView = glassBackgroundView self.glassBackgroundView = glassBackgroundView
transition.animateAlpha(view: glassBackgroundView, from: 0.0, to: 1.0) transition.animateAlpha(view: glassBackgroundView, from: 0.0, to: 1.0)