From 4d86ced1e6419abd74c70b8658f11e1c364a1f13 Mon Sep 17 00:00:00 2001 From: John Preston Date: Thu, 11 Jan 2024 11:02:12 +0400 Subject: [PATCH] Improve "show" last seen button design. --- Telegram/SourceFiles/info/info.style | 13 +++++++++---- .../SourceFiles/info/profile/info_profile_cover.cpp | 4 ++++ 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/Telegram/SourceFiles/info/info.style b/Telegram/SourceFiles/info/info.style index fbd6157e38..de5e2f9ace 100644 --- a/Telegram/SourceFiles/info/info.style +++ b/Telegram/SourceFiles/info/info.style @@ -338,12 +338,17 @@ infoProfileCover: InfoProfileCover { statusLeft: 109px; statusTop: 58px; showLastSeen: RoundButton(defaultActiveButton) { + textFg: windowSubTextFg; + textFgOver: windowSubTextFg; + textBg: windowBgOver; + textBgOver: windowBgOver; width: -12px; - height: 20px; - textTop: 2px; - font: font(11px semibold); + height: 18px; + textTop: 0px; + font: font(12px); + ripple: defaultRippleAnimation; } - showLastSeenPosition: point(4px, 56px); + showLastSeenPosition: point(3px, 58px); showLastSeenVisible: true; rightSkip: 20px; } diff --git a/Telegram/SourceFiles/info/profile/info_profile_cover.cpp b/Telegram/SourceFiles/info/profile/info_profile_cover.cpp index f430c03d7c..7968c48d5b 100644 --- a/Telegram/SourceFiles/info/profile/info_profile_cover.cpp +++ b/Telegram/SourceFiles/info/profile/info_profile_cover.cpp @@ -413,6 +413,10 @@ void Cover::setupShowLastSeen() { _showLastSeen->hide(); } + using TextTransform = Ui::RoundButton::TextTransform; + _showLastSeen->setTextTransform(TextTransform::NoTransform); + _showLastSeen->setFullRadius(true); + _showLastSeen->setClickedCallback([=] { const auto type = Ui::ShowOrPremium::LastSeen; auto box = Box(Ui::ShowOrPremiumBox, type, user->shortName(), [=] {