Gui: Register overlay search path from preference packs
This commit adds "<mod>/overlay" path to search paths of "overlay" prefix. This allows preference packs to register custom overlay stylesheets. Fixes: #11023
This commit is contained in:
committed by
Chris Hennes
parent
b4186745c4
commit
147cd7cc53
@@ -58,12 +58,15 @@ PreferencePack::PreferencePack(const fs::path& path, const App::Metadata& metada
|
||||
|
||||
auto qssPaths = QDir::searchPaths(QString::fromUtf8("qss"));
|
||||
auto cssPaths = QDir::searchPaths(QString::fromUtf8("css"));
|
||||
auto overlayPaths = QDir::searchPaths(QString::fromUtf8("overlay"));
|
||||
|
||||
qssPaths.append(QString::fromStdString(_path.string()));
|
||||
cssPaths.append(QString::fromStdString(_path.string()));
|
||||
overlayPaths.append(QString::fromStdString(_path.string() + "/overlay"));
|
||||
|
||||
QDir::setSearchPaths(QString::fromUtf8("qss"), qssPaths);
|
||||
QDir::setSearchPaths(QString::fromUtf8("css"), cssPaths);
|
||||
QDir::setSearchPaths(QString::fromUtf8("overlay"), overlayPaths);
|
||||
}
|
||||
|
||||
std::string PreferencePack::name() const
|
||||
|
||||
Reference in New Issue
Block a user