mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +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 {
|
int PeerListRow::nameIconWidth() const {
|
||||||
return (special() || !_peer->isVerified())
|
return special()
|
||||||
? 0
|
? 0
|
||||||
: st::dialogsVerifiedIcon.width();
|
: _peer->isVerified()
|
||||||
|
? st::dialogsVerifiedIcon.width()
|
||||||
|
: _peer->isPremium()
|
||||||
|
? st::dialogsPremiumIcon.width()
|
||||||
|
: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PeerListRow::paintNameIcon(
|
void PeerListRow::paintNameIcon(
|
||||||
|
@ -665,7 +669,11 @@ void PeerListRow::paintNameIcon(
|
||||||
int y,
|
int y,
|
||||||
int outerWidth,
|
int outerWidth,
|
||||||
bool selected) {
|
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(
|
void PeerListRow::paintStatusText(
|
||||||
|
|
|
@ -513,9 +513,10 @@ void TopBarWidget::paintTopBar(Painter &p) {
|
||||||
const auto peer = history->peer;
|
const auto peer = history->peer;
|
||||||
const auto &text = peer->topBarNameText();
|
const auto &text = peer->topBarNameText();
|
||||||
const auto badgeStyle = Ui::PeerBadgeStyle{
|
const auto badgeStyle = Ui::PeerBadgeStyle{
|
||||||
&st::dialogsVerifiedIcon, // verified
|
&st::dialogsVerifiedIcon,
|
||||||
&st::dialogsPremiumIcon, // premium
|
&st::dialogsPremiumIcon,
|
||||||
&st::attentionButtonFg };
|
&st::attentionButtonFg,
|
||||||
|
};
|
||||||
const auto badgeWidth = Ui::DrawPeerBadgeGetWidth(
|
const auto badgeWidth = Ui::DrawPeerBadgeGetWidth(
|
||||||
peer,
|
peer,
|
||||||
p,
|
p,
|
||||||
|
|
Loading…
Add table
Reference in a new issue