mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Voice Chat UI fixes
This commit is contained in:
parent
be4f069f1b
commit
3d062fff78
@ -14,7 +14,7 @@ final class CallControllerButtonItemNode: HighlightTrackingButtonNode {
|
|||||||
enum Color: Equatable {
|
enum Color: Equatable {
|
||||||
case red
|
case red
|
||||||
case green
|
case green
|
||||||
case custom(UInt32)
|
case custom(UInt32, CGFloat)
|
||||||
}
|
}
|
||||||
|
|
||||||
case blurred(isFilled: Bool)
|
case blurred(isFilled: Bool)
|
||||||
@ -197,8 +197,8 @@ final class CallControllerButtonItemNode: HighlightTrackingButtonNode {
|
|||||||
fillColor = UIColor(rgb: 0xd92326)
|
fillColor = UIColor(rgb: 0xd92326)
|
||||||
case .green:
|
case .green:
|
||||||
fillColor = UIColor(rgb: 0x74db58)
|
fillColor = UIColor(rgb: 0x74db58)
|
||||||
case let .custom(color):
|
case let .custom(color, alpha):
|
||||||
fillColor = UIColor(rgb: color)
|
fillColor = UIColor(rgb: color, alpha: alpha)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -293,7 +293,7 @@ final class CallControllerButtonItemNode: HighlightTrackingButtonNode {
|
|||||||
fillColor = UIColor(rgb: 0xd92326).withMultipliedBrightnessBy(0.2).withAlphaComponent(0.2)
|
fillColor = UIColor(rgb: 0xd92326).withMultipliedBrightnessBy(0.2).withAlphaComponent(0.2)
|
||||||
case .green:
|
case .green:
|
||||||
fillColor = UIColor(rgb: 0x74db58).withMultipliedBrightnessBy(0.2).withAlphaComponent(0.2)
|
fillColor = UIColor(rgb: 0x74db58).withMultipliedBrightnessBy(0.2).withAlphaComponent(0.2)
|
||||||
case let .custom(color):
|
case let .custom(color, alpha):
|
||||||
fillColor = UIColor(rgb: color).withMultipliedBrightnessBy(0.2).withAlphaComponent(0.2)
|
fillColor = UIColor(rgb: color).withMultipliedBrightnessBy(0.2).withAlphaComponent(0.2)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -158,7 +158,7 @@ final class VoiceChatActionButton: HighlightTrackingButtonNode {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let updatedTitle = self.titleLabel.attributedText?.string != title
|
let updatedTitle = self.titleLabel.attributedText?.string != title
|
||||||
let updatedSubtitle = self.subtitleLabel.attributedText?.string != title
|
let updatedSubtitle = self.subtitleLabel.attributedText?.string != subtitle
|
||||||
|
|
||||||
self.titleLabel.attributedText = NSAttributedString(string: title, font: titleFont, textColor: .white)
|
self.titleLabel.attributedText = NSAttributedString(string: title, font: titleFont, textColor: .white)
|
||||||
self.subtitleLabel.attributedText = NSAttributedString(string: subtitle, font: subtitleFont, textColor: .white)
|
self.subtitleLabel.attributedText = NSAttributedString(string: subtitle, font: subtitleFont, textColor: .white)
|
||||||
|
@ -1570,9 +1570,9 @@ public final class VoiceChatController: ViewController {
|
|||||||
private func updateButtons(transition: ContainedViewLayoutTransition) {
|
private func updateButtons(transition: ContainedViewLayoutTransition) {
|
||||||
let audioButtonAppearance: CallControllerButtonItemNode.Content.Appearance
|
let audioButtonAppearance: CallControllerButtonItemNode.Content.Appearance
|
||||||
if let color = self.currentAudioButtonColor {
|
if let color = self.currentAudioButtonColor {
|
||||||
audioButtonAppearance = .color(.custom(color.rgb))
|
audioButtonAppearance = .color(.custom(color.rgb, 1.0))
|
||||||
} else {
|
} else {
|
||||||
audioButtonAppearance = .color(.custom(self.isFullscreen ? 0x1c1c1e : 0x2c2c2e))
|
audioButtonAppearance = .color(.custom(self.isFullscreen ? 0x1c1c1e : 0x2c2c2e, 1.0))
|
||||||
}
|
}
|
||||||
|
|
||||||
var audioMode: CallControllerButtonsSpeakerMode = .none
|
var audioMode: CallControllerButtonsSpeakerMode = .none
|
||||||
@ -1628,7 +1628,7 @@ public final class VoiceChatController: ViewController {
|
|||||||
let sideButtonSize = CGSize(width: 60.0, height: 60.0)
|
let sideButtonSize = CGSize(width: 60.0, height: 60.0)
|
||||||
self.audioOutputNode.update(size: sideButtonSize, content: CallControllerButtonItemNode.Content(appearance: soundAppearance, image: soundImage), text: soundTitle, transition: .animated(duration: 0.3, curve: .linear))
|
self.audioOutputNode.update(size: sideButtonSize, content: CallControllerButtonItemNode.Content(appearance: soundAppearance, image: soundImage), text: soundTitle, transition: .animated(duration: 0.3, curve: .linear))
|
||||||
|
|
||||||
self.leaveNode.update(size: sideButtonSize, content: CallControllerButtonItemNode.Content(appearance: .color(.custom(0x602522)), image: .end), text: self.presentationData.strings.VoiceChat_Leave, transition: .immediate)
|
self.leaveNode.update(size: sideButtonSize, content: CallControllerButtonItemNode.Content(appearance: .color(.custom(0xff3b30, 0.3)), image: .end), text: self.presentationData.strings.VoiceChat_Leave, transition: .immediate)
|
||||||
}
|
}
|
||||||
|
|
||||||
func containerLayoutUpdated(_ layout: ContainerViewLayout, navigationHeight: CGFloat, transition: ContainedViewLayoutTransition) {
|
func containerLayoutUpdated(_ layout: ContainerViewLayout, navigationHeight: CGFloat, transition: ContainedViewLayoutTransition) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user