mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-14 05:07:10 +02:00
Show right icon in top reactors.
This commit is contained in:
parent
49e6c4f552
commit
d1313f38eb
5 changed files with 10 additions and 4 deletions
BIN
Telegram/Resources/icons/chat/mini_stars.png
Normal file
BIN
Telegram/Resources/icons/chat/mini_stars.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 349 B |
BIN
Telegram/Resources/icons/chat/mini_stars@2x.png
Normal file
BIN
Telegram/Resources/icons/chat/mini_stars@2x.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 565 B |
BIN
Telegram/Resources/icons/chat/mini_stars@3x.png
Normal file
BIN
Telegram/Resources/icons/chat/mini_stars@3x.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 740 B |
|
@ -128,8 +128,10 @@ void PaidReactionSlider(
|
|||
[[nodiscard]] QImage GenerateBadgeImage(int count) {
|
||||
const auto text = Lang::FormatCountDecimal(count);
|
||||
const auto length = st::chatSimilarBadgeFont->width(text);
|
||||
const auto contents = length
|
||||
+ st::chatSimilarLockedIcon.width();
|
||||
const auto contents = st::chatSimilarLockedIconPosition.x()
|
||||
+ st::paidReactTopStarIcon.width()
|
||||
+ st::paidReactTopStarSkip
|
||||
+ length;
|
||||
const auto badge = QRect(
|
||||
st::chatSimilarBadgePadding.left(),
|
||||
st::chatSimilarBadgePadding.top(),
|
||||
|
@ -146,7 +148,7 @@ void PaidReactionSlider(
|
|||
|
||||
const auto &font = st::chatSimilarBadgeFont;
|
||||
const auto textTop = badge.y() + font->ascent;
|
||||
const auto icon = &st::chatSimilarLockedIcon;
|
||||
const auto icon = &st::paidReactTopStarIcon;
|
||||
const auto position = st::chatSimilarLockedIconPosition;
|
||||
|
||||
auto hq = PainterHighQualityEnabler(q);
|
||||
|
@ -162,7 +164,7 @@ void PaidReactionSlider(
|
|||
badge.x() + position.x(),
|
||||
badge.y() + position.y(),
|
||||
rect.width());
|
||||
textLeft += position.x() + icon->width();
|
||||
textLeft += position.x() + icon->width() + st::paidReactTopStarSkip;
|
||||
}
|
||||
|
||||
q.setFont(font);
|
||||
|
|
|
@ -398,6 +398,10 @@ paidReactToastLabel: FlatLabel(defaultFlatLabel) {
|
|||
textFg: toastFg;
|
||||
palette: defaultToastPalette;
|
||||
}
|
||||
paidReactTopStarIcon: icon{{ "chat/mini_stars", premiumButtonFg }};
|
||||
paidReactTopStarIconPosition: point(0px, 1px);
|
||||
paidReactTopStarSkip: 4px;
|
||||
|
||||
toastUndoStroke: 2px;
|
||||
toastUndoSpace: 8px;
|
||||
toastUndoDiameter: 20px;
|
||||
|
|
Loading…
Add table
Reference in a new issue