Load userChrome.css Qt style sheet from profile directory

Allows to fine-tune interface without directly modifying themes.
remotes/origin/Falkon/3.0
David Rosca 8 years ago
parent 95921692be
commit bfc3b0bf4a
  1. 2
      src/lib/app/mainapplication.cpp

@ -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);

Loading…
Cancel
Save