Switch tray to symbolic icons

This allows to rely on GTK recoloring rather than requiring the user to have an icon theme
This commit is contained in:
Ilya Fedin
2025-03-11 06:07:56 +00:00
committed by John Preston
parent a6a8e32be7
commit 31cb2f1999
6 changed files with 38 additions and 1 deletions
@@ -494,6 +494,25 @@ void InstallLauncher() {
DEBUG_LOG(("App Info: Icon copied to '%1'").arg(icon));
}
const auto symbolicIcons = icons + u"/hicolor/symbolic/apps/"_q;
if (!QDir().exists(symbolicIcons)) QDir().mkpath(symbolicIcons);
const auto monochromeIcons = {
QString(),
u"attention"_q,
u"mute"_q,
};
for (const auto &icon : monochromeIcons) {
QFile::copy(
u":/gui/icons/tray/monochrome%1.svg"_q.arg(
!icon.isEmpty() ? u"_"_q + icon : QString()),
symbolicIcons
+ ApplicationIconName()
+ (!icon.isEmpty() ? u"-"_q + icon : QString())
+ u"-symbolic.svg"_q);
}
QProcess::execute("update-desktop-database", {
applicationsPath
});