22 static const auto prefixes =
24 "/usr/share/pixmaps/",
25 "/usr/local/share/pixmaps/" 28 static const auto sizes = {
"192",
"128",
"96",
"72",
"64",
"48",
"36",
"32" };
29 static const QStringList themes
31 QStringLiteral (
"/usr/local/share/icons/hicolor/"),
32 QStringLiteral (
"/usr/share/icons/hicolor/")
35 for (
auto ext : {
".png",
".svg",
".xpm",
".jpg",
"" })
37 for (
auto prefix : prefixes)
38 if (
const auto& str = prefix + name + ext;
42 for (
const auto& themeDir : themes)
43 for (
const auto& size : sizes)
44 if (
const auto& str = themeDir + size +
'x' + size +
"/apps/" + name + ext;
QIcon GetAppIcon(const QString &name)
QPixmap GetAppPixmap(const QString &name)