From 65014339c12ecc10d6f0a2db1c887b0cb250f89c Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Tue, 10 Nov 2015 15:07:30 -0500 Subject: Replace the libreoffice SVG icon skip with a generic rule that skips any SVG file which explicitly sets version 1.0 of the format. Only one other icon gets caught in this on my systems (ibus.svg), and that one always looked slightly off as well if I recall. --- libLumina/LuminaXDG.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'libLumina/LuminaXDG.cpp') diff --git a/libLumina/LuminaXDG.cpp b/libLumina/LuminaXDG.cpp index 7003c976..b3905aa9 100644 --- a/libLumina/LuminaXDG.cpp +++ b/libLumina/LuminaXDG.cpp @@ -615,16 +615,23 @@ QIcon LXDG::findIcon(QString iconName, QString fallback){ for(int i=0; i",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){ + ico.addFile(srch[i]+":"+iconName+".svg"); //could be loaded/parsed successfully + }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 -- cgit