diff --git a/Telegram/SourceFiles/calls/calls.style b/Telegram/SourceFiles/calls/calls.style index 3368a28f1..b2201c1f9 100644 --- a/Telegram/SourceFiles/calls/calls.style +++ b/Telegram/SourceFiles/calls/calls.style @@ -208,6 +208,55 @@ callRemoteAudioMute: FlatLabel(callStatus) { } callRemoteAudioMuteSkip: 12px; +callMuteMainBlobMinRadius: 57px; +callMuteMainBlobMaxRadius: 63px; +callMuteMinorBlobMinRadius: 64px; +callMuteMinorBlobMaxRadius: 74px; +callMuteMajorBlobMinRadius: 67px; +callMuteMajorBlobMaxRadius: 77px; + +callMuteButtonActiveInner: IconButton { + width: 136px; + height: 165px; +} +callMuteButtonLabel: FlatLabel(defaultFlatLabel) { + textFg: groupCallMembersFg; + style: TextStyle(defaultTextStyle) { + font: font(14px); + linkFont: font(14px); + linkFontOver: font(14px underline); + } +} +callMuteButtonSublabel: FlatLabel(defaultFlatLabel) { + textFg: groupCallMemberNotJoinedStatus; +} +callMuteButtonLabelsSkip: 5px; +callMuteButtonSublabelSkip: 19px; +callMuteButtonActive: CallButton { + button: callMuteButtonActiveInner; + bg: groupCallLive1; + bgSize: 100px; + bgPosition: point(18px, 18px); + outerRadius: 18px; + outerBg: callAnswerBgOuter; + label: callMuteButtonLabel; +} +callMuteButtonMuted: CallButton(callMuteButtonActive) { + bg: groupCallMuted1; + label: callMuteButtonLabel; +} +callMuteButtonConnecting: CallButton(callMuteButtonMuted) { + bg: callIconBg; + label: callMuteButtonLabel; +} +callMuteButtonLabelAdditional: 5px; + +callConnectingRadial: InfiniteRadialAnimation(defaultInfiniteRadialAnimation) { + color: lightButtonFg; + thickness: 4px; + size: size(100px, 100px); +} + callBarHeight: 38px; callBarMuteToggle: IconButton { width: 41px; diff --git a/Telegram/SourceFiles/core/ui_integration.cpp b/Telegram/SourceFiles/core/ui_integration.cpp index 884f8fb44..a7a54fa5c 100644 --- a/Telegram/SourceFiles/core/ui_integration.cpp +++ b/Telegram/SourceFiles/core/ui_integration.cpp @@ -21,6 +21,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "main/main_session.h" #include "main/main_app_config.h" #include "mainwindow.h" +#include "facades.h" // Global::ScreenIsLocked. namespace Core { namespace { @@ -112,6 +113,10 @@ void UiIntegration::activationFromTopPanel() { Platform::IgnoreApplicationActivationRightNow(); } +bool UiIntegration::screenIsLocked() { + return Global::ScreenIsLocked(); +} + QString UiIntegration::timeFormat() { return cTimeFormat(); } diff --git a/Telegram/SourceFiles/core/ui_integration.h b/Telegram/SourceFiles/core/ui_integration.h index 2bcf54fda..2f9cfc618 100644 --- a/Telegram/SourceFiles/core/ui_integration.h +++ b/Telegram/SourceFiles/core/ui_integration.h @@ -41,6 +41,7 @@ public: void textActionsUpdated() override; void activationFromTopPanel() override; + bool screenIsLocked() override; QString timeFormat() override; std::shared_ptr createLinkHandler( diff --git a/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp b/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp index cf5a07099..6286841c6 100644 --- a/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp +++ b/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp @@ -727,6 +727,10 @@ bool SkipFlashBounce() { return Inhibited(); } +bool HideDetails() { + return false; +} + bool Supported() { return ServiceRegistered; } diff --git a/Telegram/SourceFiles/platform/mac/notifications_manager_mac.mm b/Telegram/SourceFiles/platform/mac/notifications_manager_mac.mm index 8affa37cb..993783a63 100644 --- a/Telegram/SourceFiles/platform/mac/notifications_manager_mac.mm +++ b/Telegram/SourceFiles/platform/mac/notifications_manager_mac.mm @@ -159,6 +159,10 @@ bool SkipFlashBounce() { return SkipAudio(); } +bool HideDetails() { + return Global::ScreenIsLocked(); +} + bool Supported() { return Platform::IsMac10_8OrGreater(); } diff --git a/Telegram/SourceFiles/platform/platform_notifications_manager.h b/Telegram/SourceFiles/platform/platform_notifications_manager.h index eb3efbddb..1a7bc9591 100644 --- a/Telegram/SourceFiles/platform/platform_notifications_manager.h +++ b/Telegram/SourceFiles/platform/platform_notifications_manager.h @@ -15,6 +15,7 @@ namespace Notifications { [[nodiscard]] bool SkipAudio(); [[nodiscard]] bool SkipToast(); [[nodiscard]] bool SkipFlashBounce(); +[[nodiscard]] bool HideDetails(); [[nodiscard]] bool Supported(); [[nodiscard]] bool Enforced(); diff --git a/Telegram/SourceFiles/platform/win/notifications_manager_win.cpp b/Telegram/SourceFiles/platform/win/notifications_manager_win.cpp index 217a930e1..21b692cd0 100644 --- a/Telegram/SourceFiles/platform/win/notifications_manager_win.cpp +++ b/Telegram/SourceFiles/platform/win/notifications_manager_win.cpp @@ -19,6 +19,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "core/core_settings.h" #include "main/main_session.h" #include "mainwindow.h" +#include "facades.h" // Global::ScreenIsLocked. #include "windows_quiethours_h.h" #include @@ -798,14 +799,10 @@ bool SkipAudio() { if (UserNotificationState == QUNS_NOT_PRESENT || UserNotificationState == QUNS_PRESENTATION_MODE || QuietHoursEnabled - || FocusAssistBlocks) { + || FocusAssistBlocks + || Global::ScreenIsLocked()) { return true; } - if (const auto filter = EventFilter::GetInstance()) { - if (filter->sessionLoggedOff()) { - return true; - } - } return false; } @@ -826,5 +823,9 @@ bool SkipFlashBounce() { return SkipToast(); } +bool HideDetails() { + return false; +} + } // namespace Notifications } // namespace Platform diff --git a/Telegram/SourceFiles/platform/win/windows_event_filter.cpp b/Telegram/SourceFiles/platform/win/windows_event_filter.cpp index ce89b6620..29affd3ff 100644 --- a/Telegram/SourceFiles/platform/win/windows_event_filter.cpp +++ b/Telegram/SourceFiles/platform/win/windows_event_filter.cpp @@ -93,10 +93,6 @@ EventFilter *EventFilter::CreateInstance(not_null window) { return (instance = new EventFilter(window)); } -EventFilter *EventFilter::GetInstance() { - return instance; -} - void EventFilter::Destroy() { Expects(instance != nullptr); @@ -240,9 +236,9 @@ bool EventFilter::mainWindowEvent( case WM_WTSSESSION_CHANGE: { if (wParam == WTS_SESSION_LOGOFF || wParam == WTS_SESSION_LOCK) { - setSessionLoggedOff(true); + Global::SetScreenIsLocked(true); } else if (wParam == WTS_SESSION_LOGON || wParam == WTS_SESSION_UNLOCK) { - setSessionLoggedOff(false); + Global::SetScreenIsLocked(false); } } return false; diff --git a/Telegram/SourceFiles/platform/win/windows_event_filter.h b/Telegram/SourceFiles/platform/win/windows_event_filter.h index a0dbd9d1e..de48509ff 100644 --- a/Telegram/SourceFiles/platform/win/windows_event_filter.h +++ b/Telegram/SourceFiles/platform/win/windows_event_filter.h @@ -20,15 +20,7 @@ public: bool nativeEventFilter(const QByteArray &eventType, void *message, long *result); bool mainWindowEvent(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam, LRESULT *result); - bool sessionLoggedOff() const { - return _sessionLoggedOff; - } - void setSessionLoggedOff(bool loggedOff) { - _sessionLoggedOff = loggedOff; - } - static EventFilter *CreateInstance(not_null window); - static EventFilter *GetInstance(); static void Destroy(); private: @@ -42,7 +34,6 @@ private: LRESULT *result); not_null _window; - bool _sessionLoggedOff = false; }; diff --git a/Telegram/SourceFiles/ui/controls/call_mute_button.h b/Telegram/SourceFiles/ui/controls/call_mute_button.h index eb9f604dc..924489acc 100644 --- a/Telegram/SourceFiles/ui/controls/call_mute_button.h +++ b/Telegram/SourceFiles/ui/controls/call_mute_button.h @@ -13,6 +13,10 @@ #include "ui/effects/radial_animation.h" #include "lottie/lottie_icon.h" +namespace st { +extern const style::InfiniteRadialAnimation &callConnectingRadial; +} // namespace st + namespace Ui { class BlobsWidget; diff --git a/Telegram/SourceFiles/window/notifications_manager.cpp b/Telegram/SourceFiles/window/notifications_manager.cpp index a29649f1c..700659106 100644 --- a/Telegram/SourceFiles/window/notifications_manager.cpp +++ b/Telegram/SourceFiles/window/notifications_manager.cpp @@ -578,7 +578,7 @@ void System::updateAll() { Manager::DisplayOptions Manager::GetNotificationOptions(HistoryItem *item) { const auto hideEverything = Core::App().passcodeLocked() - || Global::ScreenIsLocked(); + || Platform::Notifications::HideDetails(); const auto view = Core::App().settings().notifyView(); DisplayOptions result; diff --git a/Telegram/lib_ui b/Telegram/lib_ui index eb768c8c4..14c67cf72 160000 --- a/Telegram/lib_ui +++ b/Telegram/lib_ui @@ -1 +1 @@ -Subproject commit eb768c8c4b5bf09e6b6598728333fb99d65486e7 +Subproject commit 14c67cf724a572186455a8c0639f037ae26cc762