aboutsummaryrefslogtreecommitdiff
path: root/src-qt5
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2017-04-13 08:16:34 -0400
committerKen Moore <ken@ixsystems.com>2017-04-13 08:16:34 -0400
commitd640f04afdb6e134be2d5ffe02ce0933f77821c4 (patch)
treed429419802fe01bd26ba0bd80a21f4b979a6a3b1 /src-qt5
parentCommit some small changes I still had on my main workstation: (diff)
parentTurn on the new icon theme for Lumina, and use it by default as the fallback ... (diff)
downloadlumina-d640f04afdb6e134be2d5ffe02ce0933f77821c4.tar.gz
lumina-d640f04afdb6e134be2d5ffe02ce0933f77821c4.tar.bz2
lumina-d640f04afdb6e134be2d5ffe02ce0933f77821c4.zip
Merge branch 'master' of github.com:trueos/lumina
Diffstat (limited to 'src-qt5')
-rw-r--r--src-qt5/core/core.pro3
-rw-r--r--src-qt5/core/libLumina/LuminaXDG.cpp22
2 files changed, 15 insertions, 10 deletions
diff --git a/src-qt5/core/core.pro b/src-qt5/core/core.pro
index 27aff3a2..4878b1f3 100644
--- a/src-qt5/core/core.pro
+++ b/src-qt5/core/core.pro
@@ -7,7 +7,8 @@ CONFIG += recursive
SUBDIRS+= lumina-desktop \
lumina-session \
lumina-open \
- lumina-info
+ lumina-info \
+ $${PWD}/../../icon-theme
# lumina-wm-INCOMPLETE \
# lumina-checkpass
diff --git a/src-qt5/core/libLumina/LuminaXDG.cpp b/src-qt5/core/libLumina/LuminaXDG.cpp
index 4a095e33..db1f5a97 100644
--- a/src-qt5/core/libLumina/LuminaXDG.cpp
+++ b/src-qt5/core/libLumina/LuminaXDG.cpp
@@ -764,12 +764,12 @@ QIcon LXDG::findIcon(QString iconName, QString fallback){
//Get the currently-set theme
QString cTheme = QIcon::themeName();
if(cTheme.isEmpty()){
- QIcon::setThemeName("oxygen");
- cTheme = "oxygen";
+ QIcon::setThemeName("material-design-light");
+ cTheme = "material-design-light";
}
//Make sure the current search paths correspond to this theme
if( QDir::searchPaths("icontheme").filter("/"+cTheme+"/").isEmpty() ){
- //Need to reset search paths: setup the "icontheme" "oxygen" and "fallback" sets
+ //Need to reset search paths: setup the "icontheme" "material-design-light" and "fallback" sets
// - Get all the base icon directories
QStringList paths;
paths << QDir::homePath()+"/.icons/"; //ordered by priority - local user dirs first
@@ -784,20 +784,20 @@ QIcon LXDG::findIcon(QString iconName, QString fallback){
for(int i=0; i<paths.length(); i++){
theme << getChildIconDirs( paths[i]+cTheme);
for(int j=0; j<themedeps.length(); j++){ theme << getChildIconDirs(paths[i]+themedeps[j]); }
- oxy << getChildIconDirs(paths[i]+"oxygen"); //Lumina base icon set
+ oxy << getChildIconDirs(paths[i]+"material-design-light"); //Lumina base icon set
fall << getChildIconDirs(paths[i]+"hicolor"); //XDG fallback (apps add to this)
}
//Now load all the icon theme dependencies in order (Theme1 -> Theme2 -> Theme3 -> Fallback)
//fall << LOS::AppPrefix()+"share/pixmaps"; //always use this as well as a final fallback
QDir::setSearchPaths("icontheme", theme);
- QDir::setSearchPaths("oxygen", oxy);
+ QDir::setSearchPaths("material-design-light", oxy);
QDir::setSearchPaths("fallback", fall);
- //qDebug() << "Setting Icon Search Paths:" << "\nicontheme:" << theme << "\noxygen:" << oxy << "\nfallback:" << fall;
+ //qDebug() << "Setting Icon Search Paths:" << "\nicontheme:" << theme << "\nmaterial-design-light:" << oxy << "\nfallback:" << fall;
}
//Find the icon in the search paths
QIcon ico;
- QStringList srch; srch << "icontheme" << "oxygen" << "fallback";
+ QStringList srch; srch << "icontheme" << "material-design-light" << "fallback";
for(int i=0; i<srch.length() && ico.isNull(); i++){
//Look for a svg first
if(QFile::exists(srch[i]+":"+iconName+".svg") ){
@@ -847,8 +847,12 @@ QIcon LXDG::findIcon(QString iconName, QString fallback){
}
}
//Use the fallback icon if necessary
- if(ico.isNull() && !fallback.isEmpty()){
- ico = LXDG::findIcon(fallback,"");
+ if(ico.isNull() ){
+ if(!fallback.isEmpty()){ ico = LXDG::findIcon(fallback,""); }
+ else if(iconName.contains("-x-") && !iconName.endsWith("-x-generic")){
+ //mimetype - try to use the generic type icon
+ ico = LXDG::findIcon(iconName.section("-x-",0,0)+"-x-generic", "");
+ }
}
if(ico.isNull()){
qDebug() << "Could not find icon:" << iconName << fallback;
bgstack15