mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-29 16:58:07 +00:00
Always use app ID based icon name
This allows to unify it between flatpak and non-flatpak builds and corresponds to what most other GUI apps on Linux do
This commit is contained in:
@@ -488,6 +488,7 @@ void InstallLauncher() {
|
||||
|
||||
const auto icon = icons + ApplicationIconName() + u".png"_q;
|
||||
QFile::remove(icon);
|
||||
QFile::remove(icons + u"telegram.png"_q);
|
||||
if (QFile::copy(u":/gui/art/logo_256.png"_q, icon)) {
|
||||
DEBUG_LOG(("App Info: Icon copied to '%1'").arg(icon));
|
||||
}
|
||||
@@ -758,9 +759,8 @@ QImage DefaultApplicationIcon() {
|
||||
}
|
||||
|
||||
QString ApplicationIconName() {
|
||||
static const auto Result = KSandbox::isFlatpak()
|
||||
? qEnvironmentVariable("FLATPAK_ID")
|
||||
: u"telegram"_q;
|
||||
static const auto Result = QGuiApplication::desktopFileName().remove(
|
||||
u"._"_q + Core::Launcher::Instance().instanceHash());
|
||||
return Result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user