From 7df2240cd758cd66d8de66a44663b807249f2753 Mon Sep 17 00:00:00 2001 From: Ali <> Date: Fri, 17 Jan 2020 19:58:11 +0400 Subject: [PATCH] Fix day theme --- Telegram-iOS/en.lproj/Localizable.strings | 2 +- .../Sources/DefaultDayPresentationTheme.swift | 2 +- .../TelegramUI/ChatMessagePollBubbleContentNode.swift | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Telegram-iOS/en.lproj/Localizable.strings b/Telegram-iOS/en.lproj/Localizable.strings index 806fb7d6ab..0fdd4b8f34 100644 --- a/Telegram-iOS/en.lproj/Localizable.strings +++ b/Telegram-iOS/en.lproj/Localizable.strings @@ -5252,7 +5252,7 @@ Any member of this group will be able to see messages in the channel."; "CreatePoll.MultipleChoice" = "Multiple Choice"; "CreatePoll.MultipleChoiceQuizAlert" = "A quiz has one correct answer."; "CreatePoll.Quiz" = "Quiz Mode"; -"CreatePoll.QuizInfo" = "A quiz has one correct answer. Users can't revoke their answers."; +"CreatePoll.QuizInfo" = "Polls in Quiz Mode have one correct answer. Users can't revoke their answers."; "CreatePoll.QuizTip" = "Tap to choose the correct answer"; "MessagePoll.LabelPoll" = "Public Poll"; diff --git a/submodules/TelegramPresentationData/Sources/DefaultDayPresentationTheme.swift b/submodules/TelegramPresentationData/Sources/DefaultDayPresentationTheme.swift index b44e4626d5..ce28633511 100644 --- a/submodules/TelegramPresentationData/Sources/DefaultDayPresentationTheme.swift +++ b/submodules/TelegramPresentationData/Sources/DefaultDayPresentationTheme.swift @@ -593,7 +593,7 @@ public func makeDefaultDayPresentationTheme(extendingThemeReference: Presentatio fileDescriptionColor: UIColor(rgb: 0xffffff, alpha: 0.65), fileDurationColor: UIColor(rgb: 0xffffff, alpha: 0.65), mediaPlaceholderColor: UIColor(rgb: 0x0077d9), - polls: PresentationThemeChatBubblePolls(radioButton: UIColor(rgb: 0xffffff, alpha: 0.65), radioProgress: UIColor(rgb: 0xffffff), highlight: UIColor(rgb: 0xffffff, alpha: 0.12), separator: UIColor(rgb: 0xffffff, alpha: 0.65), bar: UIColor(rgb: 0xffffff), barIconForeground: .white, barPositive: UIColor(rgb: 0xffffff), barNegative: UIColor(rgb: 0xffffff)), + polls: PresentationThemeChatBubblePolls(radioButton: UIColor(rgb: 0xffffff, alpha: 0.65), radioProgress: UIColor(rgb: 0xffffff), highlight: UIColor(rgb: 0xffffff, alpha: 0.12), separator: UIColor(rgb: 0xffffff, alpha: 0.65), bar: UIColor(rgb: 0xffffff), barIconForeground: .clear, barPositive: UIColor(rgb: 0xffffff), barNegative: UIColor(rgb: 0xffffff)), actionButtonsFillColor: PresentationThemeVariableColor(withWallpaper: serviceBackgroundColor, withoutWallpaper: UIColor(rgb: 0xffffff, alpha: 0.8)), actionButtonsStrokeColor: PresentationThemeVariableColor(withWallpaper: .clear, withoutWallpaper: UIColor(rgb: 0x007ee5)), actionButtonsTextColor: PresentationThemeVariableColor(withWallpaper: UIColor(rgb: 0xffffff), withoutWallpaper: UIColor(rgb: 0x007ee5)), diff --git a/submodules/TelegramUI/TelegramUI/ChatMessagePollBubbleContentNode.swift b/submodules/TelegramUI/TelegramUI/ChatMessagePollBubbleContentNode.swift index f5dcb2ab0c..174ca9909a 100644 --- a/submodules/TelegramUI/TelegramUI/ChatMessagePollBubbleContentNode.swift +++ b/submodules/TelegramUI/TelegramUI/ChatMessagePollBubbleContentNode.swift @@ -383,7 +383,8 @@ private final class ChatMessagePollOptionRadioNode: ASDisplayNode { let centerPoint = CGPoint(x: 9.28, y: 15.37) let endPoint = CGPoint(x: 16.0, y: 8.0) - let pathT = alpha + let pathStartT: CGFloat = 0.15 + let pathT = max(0.0, (alpha - pathStartT) / (1.0 - pathStartT)) let pathMiddleT: CGFloat = 0.4 context.move(to: startPoint)