Skip to content

Commit a2797c4

Browse files
author
Isaac
committed
Fix
1 parent 35d6c16 commit a2797c4

File tree

2 files changed

+25
-25
lines changed

2 files changed

+25
-25
lines changed

submodules/TelegramUI/Components/Chat/ChatTextInputPanelNode/Sources/ChatTextInputPanelNode.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1957,7 +1957,7 @@ public class ChatTextInputPanelNode: ChatInputPanelNode, ASEditableTextNodeDeleg
19571957
}
19581958
menuButtonTitleTransition.updateFrame(node: self.menuButtonTextNode, frame: CGRect(origin: CGPoint(x: 16.0, y: 11.0), size: menuTextSize))
19591959
transition.updateAlpha(node: self.menuButtonTextNode, alpha: menuButtonExpanded ? 1.0 : 0.0)
1960-
transition.updateFrame(node: self.menuButtonIconNode, frame: CGRect(x: isSendAsButton ? 4.0 + UIScreenPixel : (4.0 + UIScreenPixel), y: isSendAsButton ? 5.0 : (5.0 - UIScreenPixel), width: 30.0, height: 30.0))
1960+
transition.updateFrame(node: self.menuButtonIconNode, frame: CGRect(x: 5.0, y: isSendAsButton ? 5.0 : (5.0 - UIScreenPixel), width: 30.0, height: 30.0))
19611961

19621962
transition.updateFrame(node: self.sendAsAvatarButtonNode, frame: menuButtonFrame)
19631963
transition.updateFrame(node: self.sendAsAvatarContainerNode, frame: CGRect(origin: CGPoint(), size: menuButtonFrame.size))

submodules/TelegramUI/Components/GlassBackgroundComponent/Sources/GlassBackgroundComponent.swift

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -404,34 +404,34 @@ public class GlassBackgroundView: UIView {
404404

405405
let shadowInset: CGFloat = 32.0
406406

407-
let params = Params(cornerRadius: cornerRadius, isDark: isDark, tintColor: tintColor, isInteractive: isInteractive)
408-
if self.params != params {
409-
self.params = params
407+
if let innerColor = tintColor.innerColor {
408+
let innerBackgroundFrame = CGRect(origin: CGPoint(), size: size).insetBy(dx: 3.0, dy: 3.0)
409+
let innerBackgroundRadius = min(innerBackgroundFrame.width, innerBackgroundFrame.height) * 0.5
410410

411-
if let innerColor = params.tintColor.innerColor {
412-
let innerBackgroundFrame = CGRect(origin: CGPoint(), size: size).insetBy(dx: 3.0, dy: 3.0)
413-
let innerBackgroundRadius = min(innerBackgroundFrame.width, innerBackgroundFrame.height) * 0.5
414-
415-
let innerBackgroundView: UIView
416-
if let current = self.innerBackgroundView {
417-
innerBackgroundView = current
418-
} else {
419-
innerBackgroundView = UIView()
420-
self.innerBackgroundView = innerBackgroundView
421-
self.contentView.insertSubview(innerBackgroundView, at: 0)
422-
423-
innerBackgroundView.frame = innerBackgroundFrame
424-
innerBackgroundView.layer.cornerRadius = innerBackgroundRadius
425-
}
411+
let innerBackgroundView: UIView
412+
if let current = self.innerBackgroundView {
413+
innerBackgroundView = current
414+
} else {
415+
innerBackgroundView = UIView()
416+
self.innerBackgroundView = innerBackgroundView
417+
self.contentView.insertSubview(innerBackgroundView, at: 0)
426418

427-
innerBackgroundView.backgroundColor = innerColor
428-
transition.setFrame(view: innerBackgroundView, frame: innerBackgroundFrame)
429-
transition.setCornerRadius(layer: innerBackgroundView.layer, cornerRadius: innerBackgroundRadius)
430-
} else if let innerBackgroundView = self.innerBackgroundView {
431-
self.innerBackgroundView = nil
432-
innerBackgroundView.removeFromSuperview()
419+
innerBackgroundView.frame = innerBackgroundFrame
420+
innerBackgroundView.layer.cornerRadius = innerBackgroundRadius
433421
}
434422

423+
innerBackgroundView.backgroundColor = innerColor
424+
transition.setFrame(view: innerBackgroundView, frame: innerBackgroundFrame)
425+
transition.setCornerRadius(layer: innerBackgroundView.layer, cornerRadius: innerBackgroundRadius)
426+
} else if let innerBackgroundView = self.innerBackgroundView {
427+
self.innerBackgroundView = nil
428+
innerBackgroundView.removeFromSuperview()
429+
}
430+
431+
let params = Params(cornerRadius: cornerRadius, isDark: isDark, tintColor: tintColor, isInteractive: isInteractive)
432+
if self.params != params {
433+
self.params = params
434+
435435
if let shadowView = self.shadowView {
436436
let shadowInnerInset: CGFloat = 0.5
437437
shadowView.image = generateImage(CGSize(width: shadowInset * 2.0 + cornerRadius * 2.0, height: shadowInset * 2.0 + cornerRadius * 2.0), rotatedContext: { size, context in

0 commit comments

Comments
 (0)