QT: Change Pathing

Formatted MainWindow.cpp code
This commit is contained in:
Daisouji 2022-07-20 01:40:53 -04:00 committed by lightningterror
parent 9ef582bd6f
commit dd729ec649
1 changed files with 12 additions and 12 deletions

View File

@ -632,7 +632,7 @@ void MainWindow::setStyleFromSettings()
const QColor gray(128, 128, 128);
const QColor black(25, 25, 25);
const QColor slate(18, 18, 18);
const QColor rubyish(172,21,31);
const QColor rubyish(172, 21, 31);
QPalette darkPalette;
@ -666,19 +666,19 @@ void MainWindow::setStyleFromSettings()
qApp->setStyle(QStyleFactory::create("Fusion"));
QString sheet_content;
QFile sheets("./custom.qss");
QFile sheets(QString::fromStdString(Path::Combine(EmuFolders::DataRoot, "custom.qss")));
if(sheets.open(QFile::ReadOnly)){
QString sheet_content = QString::fromUtf8(sheets.readAll().data());
qApp->setStyleSheet(sheet_content);
if (sheets.open(QFile::ReadOnly))
{
QString sheet_content = QString::fromUtf8(sheets.readAll().data());
qApp->setStyleSheet(sheet_content);
}
else
{
qApp->setStyle(QStyleFactory::create("Fusion"));
qApp->setStyle(QStyleFactory::create("Fusion"));
}
}
else
else
{
qApp->setPalette(QApplication::style()->standardPalette());
qApp->setStyleSheet(QString());