mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +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) {
|
[[nodiscard]] QImage GenerateBadgeImage(int count) {
|
||||||
const auto text = Lang::FormatCountDecimal(count);
|
const auto text = Lang::FormatCountDecimal(count);
|
||||||
const auto length = st::chatSimilarBadgeFont->width(text);
|
const auto length = st::chatSimilarBadgeFont->width(text);
|
||||||
const auto contents = length
|
const auto contents = st::chatSimilarLockedIconPosition.x()
|
||||||
+ st::chatSimilarLockedIcon.width();
|
+ st::paidReactTopStarIcon.width()
|
||||||
|
+ st::paidReactTopStarSkip
|
||||||
|
+ length;
|
||||||
const auto badge = QRect(
|
const auto badge = QRect(
|
||||||
st::chatSimilarBadgePadding.left(),
|
st::chatSimilarBadgePadding.left(),
|
||||||
st::chatSimilarBadgePadding.top(),
|
st::chatSimilarBadgePadding.top(),
|
||||||
|
@ -146,7 +148,7 @@ void PaidReactionSlider(
|
||||||
|
|
||||||
const auto &font = st::chatSimilarBadgeFont;
|
const auto &font = st::chatSimilarBadgeFont;
|
||||||
const auto textTop = badge.y() + font->ascent;
|
const auto textTop = badge.y() + font->ascent;
|
||||||
const auto icon = &st::chatSimilarLockedIcon;
|
const auto icon = &st::paidReactTopStarIcon;
|
||||||
const auto position = st::chatSimilarLockedIconPosition;
|
const auto position = st::chatSimilarLockedIconPosition;
|
||||||
|
|
||||||
auto hq = PainterHighQualityEnabler(q);
|
auto hq = PainterHighQualityEnabler(q);
|
||||||
|
@ -162,7 +164,7 @@ void PaidReactionSlider(
|
||||||
badge.x() + position.x(),
|
badge.x() + position.x(),
|
||||||
badge.y() + position.y(),
|
badge.y() + position.y(),
|
||||||
rect.width());
|
rect.width());
|
||||||
textLeft += position.x() + icon->width();
|
textLeft += position.x() + icon->width() + st::paidReactTopStarSkip;
|
||||||
}
|
}
|
||||||
|
|
||||||
q.setFont(font);
|
q.setFont(font);
|
||||||
|
|
|
@ -398,6 +398,10 @@ paidReactToastLabel: FlatLabel(defaultFlatLabel) {
|
||||||
textFg: toastFg;
|
textFg: toastFg;
|
||||||
palette: defaultToastPalette;
|
palette: defaultToastPalette;
|
||||||
}
|
}
|
||||||
|
paidReactTopStarIcon: icon{{ "chat/mini_stars", premiumButtonFg }};
|
||||||
|
paidReactTopStarIconPosition: point(0px, 1px);
|
||||||
|
paidReactTopStarSkip: 4px;
|
||||||
|
|
||||||
toastUndoStroke: 2px;
|
toastUndoStroke: 2px;
|
||||||
toastUndoSpace: 8px;
|
toastUndoSpace: 8px;
|
||||||
toastUndoDiameter: 20px;
|
toastUndoDiameter: 20px;
|
||||||
|
|
Loading…
Add table
Reference in a new issue