Improve "show" last seen button design.

This commit is contained in:
John Preston 2024-01-11 11:02:12 +04:00
parent ad03431b0a
commit 4d86ced1e6
2 changed files with 13 additions and 4 deletions

View File

@ -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;
}

View File

@ -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(), [=] {