Improve premium / emoji status badge styles.

This commit is contained in:
John Preston 2022-08-11 20:56:07 +03:00
parent bd089f20a8
commit e22bb40dd1
3 changed files with 10 additions and 7 deletions

View file

@ -225,7 +225,7 @@ void BadgeView::move(int left, int top, int bottom) {
const auto badgeLeft = left + skip;
const auto badgeTop = top
+ (star
? st::infoVerifiedCheckPosition.y()
? _st.position.y()
: (bottom - top - _view->height()) / 2);
_view->moveToLeft(badgeLeft, badgeTop);
}
@ -236,11 +236,11 @@ void EmojiStatusPanel::show(
if (!_panel) {
create(controller);
using namespace rpl::mappers;
const auto weak = Ui::MakeWeak(button.get());
_panel->shownValue(
) | rpl::filter(
!_1
) | rpl::start_with_next([=] {
) | rpl::filter([=](bool shown) {
return !shown && weak;
}) | rpl::start_with_next([=] {
button->removeEventFilter(_panel.get());
}, _panel->lifetime());
}

View file

@ -185,7 +185,7 @@ settingsInfoPhotoSkip: 7px;
settingsInfoNameSkip: -1px;
settingsInfoUploadLeft: 6px;
settingsInfoPeerBadge: InfoPeerBadge {
verified: icon {{ "dialogs/dialogs_premium", dialogsVerifiedIconBg }};
premium: icon {{ "dialogs/dialogs_premium", dialogsVerifiedIconBg }};
sizeTag: 0; // Normal
}

View file

@ -156,7 +156,10 @@ ComposedBadge::ComposedBadge(
buttonSize.width() - st.padding.right() - finalTextRight,
buttonSize.height());
_badge.move(0, 0, buttonSize.height());
_badge.move(
0,
st.padding.top(),
buttonSize.height() - st.padding.top());
if (_unread) {
_unread->moveToRight(
0,