fix: use default icon for service notifications

This commit is contained in:
AlexeyZavar 2025-01-31 01:34:56 +03:00
parent 9aa8f30e2b
commit 7fe66c07e4
4 changed files with 7 additions and 1 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.7 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View file

@ -382,7 +382,7 @@ QImage *PeerData::userpicCloudImage(Ui::PeerUserpicView &view) const {
_userpicEmpty = nullptr;
return image;
} else if (isNotificationsUser()) {
static auto result = Window::LogoNoMargin().scaledToWidth(
static auto result = Window::LogoTelegramDefault().scaledToWidth(
kUserpicSize,
Qt::SmoothTransformation);
return &result;

View file

@ -104,6 +104,11 @@ QImage LogoNoMargin() {
return AyuAssets::currentAppLogoNoMargin();
}
const QImage &LogoTelegramDefault() {
static const auto result = QImage(u":/gui/art/logo_256_no_margin.png"_q);
return result;
}
void ConvertIconToBlack(QImage &image) {
if (image.format() != QImage::Format_ARGB32_Premultiplied) {
image = std::move(image).convertToFormat(

View file

@ -37,6 +37,7 @@ struct SeparateId;
[[nodiscard]] QImage Logo();
[[nodiscard]] QImage LogoNoMargin();
[[nodiscard]] const QImage &LogoTelegramDefault();
void OverrideApplicationIcon(QImage image);
[[nodiscard]] QIcon CreateIcon(
Main::Session *session = nullptr,