mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-15 21:57:10 +02:00
parent
a94c42411b
commit
2d651050ad
2 changed files with 15 additions and 6 deletions
|
@ -654,9 +654,13 @@ void PeerListRow::invalidatePixmapsCache() {
|
|||
}
|
||||
|
||||
int PeerListRow::nameIconWidth() const {
|
||||
return (special() || !_peer->isVerified())
|
||||
return special()
|
||||
? 0
|
||||
: st::dialogsVerifiedIcon.width();
|
||||
: _peer->isVerified()
|
||||
? st::dialogsVerifiedIcon.width()
|
||||
: _peer->isPremium()
|
||||
? st::dialogsPremiumIcon.width()
|
||||
: 0;
|
||||
}
|
||||
|
||||
void PeerListRow::paintNameIcon(
|
||||
|
@ -665,7 +669,11 @@ void PeerListRow::paintNameIcon(
|
|||
int y,
|
||||
int outerWidth,
|
||||
bool selected) {
|
||||
st::dialogsVerifiedIcon.paint(p, x, y, outerWidth);
|
||||
if (_peer->isVerified()) {
|
||||
st::dialogsVerifiedIcon.paint(p, x, y, outerWidth);
|
||||
} else if (_peer->isPremium()) {
|
||||
st::dialogsPremiumIcon.paint(p, x, y, outerWidth);
|
||||
}
|
||||
}
|
||||
|
||||
void PeerListRow::paintStatusText(
|
||||
|
|
|
@ -513,9 +513,10 @@ void TopBarWidget::paintTopBar(Painter &p) {
|
|||
const auto peer = history->peer;
|
||||
const auto &text = peer->topBarNameText();
|
||||
const auto badgeStyle = Ui::PeerBadgeStyle{
|
||||
&st::dialogsVerifiedIcon, // verified
|
||||
&st::dialogsPremiumIcon, // premium
|
||||
&st::attentionButtonFg };
|
||||
&st::dialogsVerifiedIcon,
|
||||
&st::dialogsPremiumIcon,
|
||||
&st::attentionButtonFg,
|
||||
};
|
||||
const auto badgeWidth = Ui::DrawPeerBadgeGetWidth(
|
||||
peer,
|
||||
p,
|
||||
|
|
Loading…
Add table
Reference in a new issue