Changeset View
Changeset View
Standalone View
Standalone View
kcms/style/gtkthemesmodel.cpp
Show First 20 Lines • Show All 54 Lines • ▼ Show 20 Line(s) | |||||
55 | { | 55 | { | ||
56 | QMap<QString, QString> gtk3ThemesNames; | 56 | QMap<QString, QString> gtk3ThemesNames; | ||
57 | 57 | | |||
58 | static const QStringList gtk3SubdirPattern(QStringLiteral("gtk-3.*")); | 58 | static const QStringList gtk3SubdirPattern(QStringLiteral("gtk-3.*")); | ||
59 | for (const QString &possibleThemePath : possiblePathsToThemes()) { | 59 | for (const QString &possibleThemePath : possiblePathsToThemes()) { | ||
60 | // If the directory contains any of gtk-3.X folders, it is the GTK3 theme for sure | 60 | // If the directory contains any of gtk-3.X folders, it is the GTK3 theme for sure | ||
61 | QDir possibleThemeDirectory(possibleThemePath); | 61 | QDir possibleThemeDirectory(possibleThemePath); | ||
62 | if (!possibleThemeDirectory.entryList(gtk3SubdirPattern, QDir::Dirs).isEmpty()) { | 62 | if (!possibleThemeDirectory.entryList(gtk3SubdirPattern, QDir::Dirs).isEmpty()) { | ||
63 | | ||||
64 | // Do not show dark Breeze GTK variant, since the colors of it | ||||
65 | // are coming from the color scheme and selecting them here | ||||
66 | // is redundant and does not work | ||||
67 | if (possibleThemeDirectory.dirName() == QStringLiteral("Breeze-Dark")) { | ||||
68 | continue; | ||||
69 | } | ||||
70 | | ||||
63 | gtk3ThemesNames.insert(possibleThemeDirectory.dirName(), possibleThemeDirectory.path()); | 71 | gtk3ThemesNames.insert(possibleThemeDirectory.dirName(), possibleThemeDirectory.path()); | ||
64 | } | 72 | } | ||
65 | } | 73 | } | ||
66 | 74 | | |||
67 | setThemesList(gtk3ThemesNames); | 75 | setThemesList(gtk3ThemesNames); | ||
68 | } | 76 | } | ||
69 | 77 | | |||
70 | QString GtkThemesModel::themePath(const QString &themeName) { | 78 | QString GtkThemesModel::themePath(const QString &themeName) { | ||
▲ Show 20 Lines • Show All 107 Lines • Show Last 20 Lines |