1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 10:46:35 +01:00

Load userChrome.css Qt style sheet from profile directory

Allows to fine-tune interface without directly modifying themes.
This commit is contained in:
David Rosca 2018-01-08 21:04:32 +01:00
parent 95921692be
commit bfc3b0bf4a

View File

@ -1006,6 +1006,8 @@ void MainApplication::loadTheme(const QString &name)
qss.append(QzTools::readAllFileContents(activeThemePath + QLatin1String("/rtl.css")));
}
qss.append(QzTools::readAllFileContents(DataPaths::currentProfilePath() + QL1S("/userChrome.css")));
QString relativePath = QDir::current().relativeFilePath(activeThemePath);
qss.replace(QzRegExp(QSL("url\\s*\\(\\s*([^\\*:\\);]+)\\s*\\)"), Qt::CaseSensitive), QString("url(%1/\\1)").arg(relativePath));
setStyleSheet(qss);