aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2017-04-27 23:56:12 -0400
committerKen Moore <ken@ixsystems.com>2017-04-27 23:56:12 -0400
commite30ad4a940afc68c13f284a3f038bb67764a6e5c (patch)
tree79393016dbdf35bb8504d56b8793200e6e89ba60 /src-qt5/core
parentMove the unfinished utilities in Lumina over to an "experimental" directory. (diff)
downloadlumina-e30ad4a940afc68c13f284a3f038bb67764a6e5c.tar.gz
lumina-e30ad4a940afc68c13f284a3f038bb67764a6e5c.tar.bz2
lumina-e30ad4a940afc68c13f284a3f038bb67764a6e5c.zip
Speed up the SVG icon loading routine.
Get rid of the special SVG loading/parsing checks now that we have our own, guaranteed-working, SVG icon theme. The only special check which was kept in place was to skip any SVG icon with "libreoffice" in the name (known bad icons - results in distorted images).
Diffstat (limited to 'src-qt5/core')
-rw-r--r--src-qt5/core/libLumina/LuminaXDG.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src-qt5/core/libLumina/LuminaXDG.cpp b/src-qt5/core/libLumina/LuminaXDG.cpp
index 3e31c3fc..8da39564 100644
--- a/src-qt5/core/libLumina/LuminaXDG.cpp
+++ b/src-qt5/core/libLumina/LuminaXDG.cpp
@@ -800,24 +800,24 @@ QIcon LXDG::findIcon(QString iconName, QString fallback){
QStringList srch; srch << "icontheme" << "default" << "fallback";
for(int i=0; i<srch.length() && ico.isNull(); i++){
//Look for a svg first
- if(QFile::exists(srch[i]+":"+iconName+".svg") ){
+ if(QFile::exists(srch[i]+":"+iconName+".svg") && !iconName.contains("libreoffice") ){
//Be careful about how an SVG is loaded - needs to render the image onto a paint device
- QSvgRenderer svg;
+ /*QSvgRenderer svg;
if( svg.load(srch[i]+":"+iconName+".svg") ){
//Could be loaded - now check that it is version 1.1+ (Qt has issues with 1.0? (LibreOffice Icons) )
float version = 1.1; //only downgrade files that explicitly set the version as older
QString svginfo = LUtils::readFile(srch[i]+":"+iconName+".svg").join("\n").section("<svg",1,1).section(">",0,0);
svginfo.replace("\t"," "); svginfo.replace("\n"," ");
if(svginfo.contains(" version=")){ version = svginfo.section(" version=\"",1,1).section("\"",0,0).toFloat(); }
- if(version>=1.1){
+ if(version>=1.1){*/
ico.addFile(srch[i]+":"+iconName+".svg"); //could be loaded/parsed successfully
- }else{
+ /*}else{
//qDebug() << "Old SVG Version file:" << iconName+".svg Theme:" << srch[i];
//qDebug() << "SVGInfo:" << svginfo;
}
}else{
qDebug() << "Found bad SVG file:" << iconName+".svg Theme:" << srch[i];
- }
+ }*/
}
if(QFile::exists(srch[i]+":"+iconName+".png")){
//simple PNG image - load directly into the QIcon structure
bgstack15