mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
fix: use default icon for service notifications
This commit is contained in:
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 |
|
@ -382,7 +382,7 @@ QImage *PeerData::userpicCloudImage(Ui::PeerUserpicView &view) const {
|
||||||
_userpicEmpty = nullptr;
|
_userpicEmpty = nullptr;
|
||||||
return image;
|
return image;
|
||||||
} else if (isNotificationsUser()) {
|
} else if (isNotificationsUser()) {
|
||||||
static auto result = Window::LogoNoMargin().scaledToWidth(
|
static auto result = Window::LogoTelegramDefault().scaledToWidth(
|
||||||
kUserpicSize,
|
kUserpicSize,
|
||||||
Qt::SmoothTransformation);
|
Qt::SmoothTransformation);
|
||||||
return &result;
|
return &result;
|
||||||
|
|
|
@ -104,6 +104,11 @@ QImage LogoNoMargin() {
|
||||||
return AyuAssets::currentAppLogoNoMargin();
|
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) {
|
void ConvertIconToBlack(QImage &image) {
|
||||||
if (image.format() != QImage::Format_ARGB32_Premultiplied) {
|
if (image.format() != QImage::Format_ARGB32_Premultiplied) {
|
||||||
image = std::move(image).convertToFormat(
|
image = std::move(image).convertToFormat(
|
||||||
|
|
|
@ -37,6 +37,7 @@ struct SeparateId;
|
||||||
|
|
||||||
[[nodiscard]] QImage Logo();
|
[[nodiscard]] QImage Logo();
|
||||||
[[nodiscard]] QImage LogoNoMargin();
|
[[nodiscard]] QImage LogoNoMargin();
|
||||||
|
[[nodiscard]] const QImage &LogoTelegramDefault();
|
||||||
void OverrideApplicationIcon(QImage image);
|
void OverrideApplicationIcon(QImage image);
|
||||||
[[nodiscard]] QIcon CreateIcon(
|
[[nodiscard]] QIcon CreateIcon(
|
||||||
Main::Session *session = nullptr,
|
Main::Session *session = nullptr,
|
||||||
|
|
Loading…
Add table
Reference in a new issue