mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-05 22:47:03 +00:00
Make loading StyleSheets work for AppImages and if installed via make install
This commit is contained in:
parent
da9baac842
commit
8c19ff4fb9
2 changed files with 24 additions and 9 deletions
|
|
@ -375,6 +375,20 @@ void rpcs3_app::OnChangeStyleSheetRequest(const QString& sheetFilePath)
|
|||
setStyleSheet(file.readAll());
|
||||
file.close();
|
||||
}
|
||||
#if !defined(_WIN32) && !defined(__APPLE__)
|
||||
else
|
||||
{
|
||||
// If we can't open the file, try the /share folder
|
||||
QString shareDir = QCoreApplication::applicationDirPath() + "/../share/rpcs3/";
|
||||
QDir::setCurrent(shareDir);
|
||||
QFile newFile(shareDir + "GuiConfigs/" + QFileInfo(file.fileName()).fileName());
|
||||
if (newFile.open(QIODevice::ReadOnly | QIODevice::Text))
|
||||
{
|
||||
setStyleSheet(newFile.readAll());
|
||||
newFile.close();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
gui::stylesheet = styleSheet();
|
||||
RPCS3MainWin->RepaintGui();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue