aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2018-02-13 12:32:55 -0500
committerKen Moore <ken@ixsystems.com>2018-02-13 12:32:55 -0500
commit68313cf92a0b00b2c8dc94ed6821102012e36d76 (patch)
tree64817625348bd976d69c877d011eaf13279dfa8a
parentMake sure the FreeBSD ports have OPTIONS_SUB=yes in the Makefile (diff)
downloadlumina-68313cf92a0b00b2c8dc94ed6821102012e36d76.tar.gz
lumina-68313cf92a0b00b2c8dc94ed6821102012e36d76.tar.bz2
lumina-68313cf92a0b00b2c8dc94ed6821102012e36d76.zip
Quick update for the icon finder routine.
Make sure that Qt does not blindly find a related icon before going through the default/pixmap routines. Qt does not seem to respect icon theme inheritance with a "hicolor" default theme.
-rw-r--r--src-qt5/core/libLumina/LuminaXDG.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src-qt5/core/libLumina/LuminaXDG.cpp b/src-qt5/core/libLumina/LuminaXDG.cpp
index e1c582d9..95585f1e 100644
--- a/src-qt5/core/libLumina/LuminaXDG.cpp
+++ b/src-qt5/core/libLumina/LuminaXDG.cpp
@@ -853,9 +853,12 @@ QIcon LXDG::findIcon(QString iconName, QString fallback){
QIcon tmp;
if(!iconName.contains("libreoffice")){ //libreoffice is stupid - their svg icons are un-renderable with Qt
tmp = QIcon::fromTheme(iconName);
+ /*if(iconName.contains("start-here")){
+ qDebug() << "[ICON]" << iconName << "found:" << !tmp.isNull() << tmp.name();
+ }*/
//if(tmp.isNull()){ tmp = QIcon::fromTheme(fallback); }
}
- if(!tmp.isNull()){ return tmp; } //found one in the theme
+ if(!tmp.isNull() && tmp.name()==iconName){ return tmp; } //found this in the theme
//NOTE: This was re-written on 11/10/15 to avoid using the QIcon::fromTheme() framework
@@ -964,6 +967,8 @@ QIcon LXDG::findIcon(QString iconName, QString 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", "");
+ }else if(iconName.contains("-")){
+ ico = LXDG::findIcon(iconName.section("-",0,-2), ""); //chop the last modifier off the end and try again
}
}
if(ico.isNull()){
bgstack15