mirror of
https://github.com/Qz3rK/tdesktop.git
synced 2026-07-03 14:15:08 +02:00
Show right icon in top reactors.
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 349 B |
Binary file not shown.
|
After Width: | Height: | Size: 565 B |
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;
|
||||
|
||||
Reference in New Issue
Block a user