|
|
|
@ -27,25 +27,6 @@ using namespace Process;
|
|
|
|
|
Launcher::MainDialog::MainDialog(QWidget *parent)
|
|
|
|
|
: mGameSettings(mCfgMgr), QMainWindow (parent)
|
|
|
|
|
{
|
|
|
|
|
// Install the stylesheet font
|
|
|
|
|
QFile file;
|
|
|
|
|
QFontDatabase fontDatabase;
|
|
|
|
|
|
|
|
|
|
const QStringList fonts = fontDatabase.families();
|
|
|
|
|
|
|
|
|
|
// Check if the font is installed
|
|
|
|
|
if (!fonts.contains("EB Garamond")) {
|
|
|
|
|
|
|
|
|
|
QString font = QString::fromUtf8(mCfgMgr.getGlobalDataPath().string().c_str()) + QString("resources/mygui/EBGaramond-Regular.ttf");
|
|
|
|
|
file.setFileName(font);
|
|
|
|
|
|
|
|
|
|
if (!file.exists()) {
|
|
|
|
|
font = QString::fromUtf8(mCfgMgr.getLocalPath().string().c_str()) + QString("resources/mygui/EBGaramond-Regular.ttf");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fontDatabase.addApplicationFont(font);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
setupUi(this);
|
|
|
|
|
|
|
|
|
|
mGameInvoker = new ProcessInvoker();
|
|
|
|
|