mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Improve premium / emoji status badge styles.
This commit is contained in:
parent
bd089f20a8
commit
e22bb40dd1
3 changed files with 10 additions and 7 deletions
|
@ -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());
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue