Fix Relative URL in QSS files.

As qss files are read and added as plaintext, url() cannot find relative
path.
Using "url(%THISPATH%/" will be replaced by current file path.
This commit is contained in:
Phenom 2019-04-14 13:55:27 +02:00
parent a4d7b0299b
commit bdce8e6d31
13 changed files with 121 additions and 136 deletions

View file

@ -755,6 +755,9 @@ void Rshare::loadStyleSheet(const QString &sheetName)
styleSheet += QLatin1String(file.readAll()) + "\n";
file.close();
}
/* replace %THISPATH% by file path so url can get relative files */
styleSheet = styleSheet.replace("url(%THISPATH%",QString("url(%1").arg(fileInfo.absolutePath()));
}
}
}