From 4e2114e2fe73b794d6cc1cd8b86aa4bd56682191 Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Mon, 29 Dec 2025 19:03:17 +0300 Subject: [PATCH] Improved loading state of transcribe button. --- .../history/view/history_view_transcribe_button.cpp | 4 ++-- Telegram/SourceFiles/ui/chat/chat.style | 8 ++++++++ Telegram/lib_ui | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Telegram/SourceFiles/history/view/history_view_transcribe_button.cpp b/Telegram/SourceFiles/history/view/history_view_transcribe_button.cpp index 1ff278947b..aeb4605e35 100644 --- a/Telegram/SourceFiles/history/view/history_view_transcribe_button.cpp +++ b/Telegram/SourceFiles/history/view/history_view_transcribe_button.cpp @@ -79,10 +79,10 @@ void TranscribeButton::setLoading(bool loading, Fn update) { if (_loading) { _animation = std::make_unique( update, - st::defaultInfiniteRadialAnimation); + st::historyTranscribeRadialAnimation); _animation->start(); } else if (_animation) { - _animation->stop(); + _animation->stopWithFade(); } } diff --git a/Telegram/SourceFiles/ui/chat/chat.style b/Telegram/SourceFiles/ui/chat/chat.style index 8b13683746..7c0f7218d7 100644 --- a/Telegram/SourceFiles/ui/chat/chat.style +++ b/Telegram/SourceFiles/ui/chat/chat.style @@ -544,6 +544,14 @@ historyTranscribeOutLockSelected: icon {{ "chat/mini_lock", msgFileOutBgSelected historyTranscribeLockPos: point(17px, 9px); historyTranscribeLockOverlayPos: point(19px, 11px); historyTranscribeLockOverlaySize: size(5px, 10px); +historyTranscribeRadialAnimation: InfiniteRadialAnimation(defaultInfiniteRadialAnimation) { + linearPeriod: 700; + sinePeriod: 2400; + sineDuration: 700; + sineShift: 1100; + arcMin: 0.0625; + arcMax: 0.35; +} historyVideoMessageMute: icon {{ "volume_mute", historyFileThumbIconFg }}; historyVideoMessageMuteSelected: icon {{ "volume_mute", historyFileThumbIconFgSelected }}; diff --git a/Telegram/lib_ui b/Telegram/lib_ui index b5b21bbcc5..22fe65cc24 160000 --- a/Telegram/lib_ui +++ b/Telegram/lib_ui @@ -1 +1 @@ -Subproject commit b5b21bbcc5a7c702b74f9450615fe350824f5fa7 +Subproject commit 22fe65cc24f5a8bc92641f0850059c0ac6e4aec2