2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 22:46:10 +00:00

Added ability to provide custom gradient to star in premium top bar.

This commit is contained in:
23rd
2024-05-16 21:34:07 +03:00
committed by John Preston
parent 53d97b4146
commit 4a0bffe618
3 changed files with 12 additions and 7 deletions

View File

@@ -30,6 +30,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "core/application.h"
#include "core/core_settings.h"
#include "ui/chat/chat_style.h"
#include "ui/effects/premium_graphics.h"
#include "ui/effects/premium_top_bar.h"
#include "ui/text/format_values.h"
#include "ui/text/text_utilities.h"
@@ -79,7 +80,8 @@ using Privacy = Api::UserPrivacy;
image.fill(Qt::transparent);
{
auto p = QPainter(&image);
auto star = QSvgRenderer(Ui::Premium::ColorizedSvg());
auto star = QSvgRenderer(
Ui::Premium::ColorizedSvg(Ui::Premium::ButtonGradientStops()));
star.render(&p, Rect(size));
}
return image;