mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-30 22:25:12 +00:00
Improve premium / emoji status badge styles.
This commit is contained in:
@@ -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,
|
||||
|
Reference in New Issue
Block a user