From bfc3b0bf4a28b21ff01de5ebf7120e443351920b Mon Sep 17 00:00:00 2001 From: David Rosca Date: Mon, 8 Jan 2018 21:04:32 +0100 Subject: [PATCH] Load userChrome.css Qt style sheet from profile directory Allows to fine-tune interface without directly modifying themes. --- src/lib/app/mainapplication.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/app/mainapplication.cpp b/src/lib/app/mainapplication.cpp index 647c480df..80b1dc22e 100644 --- a/src/lib/app/mainapplication.cpp +++ b/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);