Really properly be per-monitor DPI aware

This is so hard...
This commit is contained in:
Pengfei
2021-08-17 00:30:08 +08:00
parent d78c1cb734
commit 0cf7e8a84a
21 changed files with 656 additions and 621 deletions
+2 -5
View File
@@ -20,14 +20,11 @@
TitleInfoDialog::TitleInfoDialog(QWidget* parent, Core::SDMCImporter& importer_,
Core::ContentSpecifier specifier_)
: QDialog(parent), ui(std::make_unique<Ui::TitleInfoDialog>()), importer(importer_),
specifier(std::move(specifier_)) {
: DPIAwareDialog(parent, 500, 360), ui(std::make_unique<Ui::TitleInfoDialog>()),
importer(importer_), specifier(std::move(specifier_)) {
ui->setupUi(this);
setWindowFlags(windowFlags() & (~Qt::WindowContextHelpButtonHint));
const double scale = qApp->desktop()->logicalDpiX() / 96.0;
resize(static_cast<int>(width() * scale), static_cast<int>(height() * scale));
LoadInfo();