mirror of https://github.com/RPCS3/rpcs3.git
add dpi scaling for windows
fix welcome screen for all platforms (looks slightly different)
This commit is contained in:
parent
01ea3def54
commit
bda945218d
|
@ -8,6 +8,10 @@
|
||||||
|
|
||||||
int main(int argc, char** argv)
|
int main(int argc, char** argv)
|
||||||
{
|
{
|
||||||
|
#ifdef Q_OS_WIN
|
||||||
|
SetProcessDPIAware();
|
||||||
|
#endif
|
||||||
|
|
||||||
rpcs3_app app(argc, argv);
|
rpcs3_app app(argc, argv);
|
||||||
app.Init();
|
app.Init();
|
||||||
return app.exec();
|
return app.exec();
|
||||||
|
|
|
@ -35,7 +35,7 @@ welcome_dialog::welcome_dialog(QWidget* parent) : QDialog(parent)
|
||||||
QIcon rpcs3_icon = QIcon(":/rpcs3.ico");
|
QIcon rpcs3_icon = QIcon(":/rpcs3.ico");
|
||||||
QLabel* icon = new QLabel(this);
|
QLabel* icon = new QLabel(this);
|
||||||
icon->setPixmap(rpcs3_icon.pixmap(120, 120));
|
icon->setPixmap(rpcs3_icon.pixmap(120, 120));
|
||||||
icon->setAlignment(Qt::AlignLeft);
|
icon->setAlignment(Qt::AlignRight);
|
||||||
|
|
||||||
QLabel* header_1 = new QLabel(tr(
|
QLabel* header_1 = new QLabel(tr(
|
||||||
"<h1>Welcome to RPCS3</h1>"
|
"<h1>Welcome to RPCS3</h1>"
|
||||||
|
@ -45,14 +45,14 @@ welcome_dialog::welcome_dialog(QWidget* parent) : QDialog(parent)
|
||||||
header_font.setPointSize(12);
|
header_font.setPointSize(12);
|
||||||
|
|
||||||
header_1->setFont(header_font);
|
header_1->setFont(header_font);
|
||||||
header_1->setFixedWidth(400);
|
header_1->setFixedWidth(header_1->sizeHint().width());
|
||||||
header_1->setWordWrap(true);
|
header_1->setWordWrap(true);
|
||||||
|
|
||||||
QLabel* header_2 = new QLabel(tr(
|
QLabel* header_2 = new QLabel(tr(
|
||||||
"<h2>An open-source PlayStation 3 emulator for Windows and Linux funded with <a href =\"https://www.patreon.com/Nekotekina\">Patreon</a>!</h2>"
|
"<h2>An open-source PlayStation 3 emulator for Windows and Linux funded with <a href =\"https://www.patreon.com/Nekotekina\">Patreon</a>!</h2>"
|
||||||
));
|
));
|
||||||
|
|
||||||
header_2->setFixedWidth(400);
|
header_2->setFixedWidth(header_1->sizeHint().width() * 1.2);
|
||||||
header_2->setWordWrap(true);
|
header_2->setWordWrap(true);
|
||||||
|
|
||||||
QLabel* caption = new QLabel(tr(
|
QLabel* caption = new QLabel(tr(
|
||||||
|
@ -68,7 +68,7 @@ welcome_dialog::welcome_dialog(QWidget* parent) : QDialog(parent)
|
||||||
caption_font.setWeight(QFont::Medium);
|
caption_font.setWeight(QFont::Medium);
|
||||||
|
|
||||||
caption->setFont(caption_font);
|
caption->setFont(caption_font);
|
||||||
caption->setFixedWidth(550);
|
caption->setFixedWidth(caption->sizeHint().width());
|
||||||
caption->setWordWrap(true);
|
caption->setWordWrap(true);
|
||||||
caption->setOpenExternalLinks(true);
|
caption->setOpenExternalLinks(true);
|
||||||
caption->setAlignment(Qt::AlignLeft);
|
caption->setAlignment(Qt::AlignLeft);
|
||||||
|
@ -95,7 +95,7 @@ welcome_dialog::welcome_dialog(QWidget* parent) : QDialog(parent)
|
||||||
top_layout->setAlignment(Qt::AlignCenter);
|
top_layout->setAlignment(Qt::AlignCenter);
|
||||||
top_layout->addStretch();
|
top_layout->addStretch();
|
||||||
top_layout->addWidget(icon);
|
top_layout->addWidget(icon);
|
||||||
top_layout->addStretch();
|
top_layout->addSpacing(icon->sizeHint().width() / 10);
|
||||||
top_layout->addLayout(header_layout);
|
top_layout->addLayout(header_layout);
|
||||||
top_layout->addStretch();
|
top_layout->addStretch();
|
||||||
|
|
||||||
|
@ -114,16 +114,16 @@ welcome_dialog::welcome_dialog(QWidget* parent) : QDialog(parent)
|
||||||
|
|
||||||
// Main Layout
|
// Main Layout
|
||||||
QVBoxLayout* layout = new QVBoxLayout();
|
QVBoxLayout* layout = new QVBoxLayout();
|
||||||
top_layout->addStretch();
|
|
||||||
layout->addLayout(top_layout);
|
layout->addLayout(top_layout);
|
||||||
|
layout->addSpacing(25);
|
||||||
layout->addLayout(bottom_layout);
|
layout->addLayout(bottom_layout);
|
||||||
layout->addSpacing(25);
|
layout->addSpacing(25);
|
||||||
layout->addLayout(button_layout);
|
layout->addLayout(button_layout);
|
||||||
|
|
||||||
setFixedSize(600, 350);
|
|
||||||
|
|
||||||
setWindowIcon(rpcs3_icon);
|
setWindowIcon(rpcs3_icon);
|
||||||
setWindowTitle(tr("Welcome to RPCS3"));
|
setWindowTitle(tr("Welcome to RPCS3"));
|
||||||
setWindowFlags(Qt::WindowTitleHint);
|
setWindowFlags(Qt::WindowTitleHint);
|
||||||
setLayout(layout);
|
setLayout(layout);
|
||||||
|
|
||||||
|
setFixedSize(sizeHint());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue