2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Support icon themes in snap

This commit is contained in:
Ilya Fedin
2025-03-11 04:38:42 +00:00
committed by John Preston
parent 228bbc1e8e
commit 594bb8a76b
2 changed files with 13 additions and 3 deletions

View File

@@ -759,7 +759,9 @@ QImage DefaultApplicationIcon() {
}
QString ApplicationIconName() {
static const auto Result = QGuiApplication::desktopFileName().remove(
static const auto Result = (KSandbox::isSnap()
? u"snap.%1."_q.arg(qEnvironmentVariable("SNAP_INSTANCE_NAME"))
: QString()) + QGuiApplication::desktopFileName().remove(
u"._"_q + Core::Launcher::Instance().instanceHash());
return Result;
}