49 "/usr/share/pixmaps/",
50 "/usr/local/share/pixmaps/" 53 const auto sizes = {
"192",
"128",
"96",
"72",
"64",
"48",
"36",
"32" };
54 const QStringList themes
56 "/usr/local/share/icons/hicolor/",
57 "/usr/share/icons/hicolor/" 60 for (
auto ext : {
".png",
".svg",
".xpm",
".jpg",
"" })
62 for (
auto prefix : prefixes)
63 if (QFile::exists (prefix + name + ext))
64 return { prefix + name + ext };
66 for (
auto themeDir : themes)
67 for (
const auto& size : sizes)
69 const auto& str = themeDir + size +
'x' + size +
"/apps/" + name + ext;
70 if (QFile::exists (str))
QPixmap GetAppPixmap(const QString &name)
QIcon GetAppIcon(const QString &name)