From 1dc5d076968ecc13ccb0f5a953a4af799652da05 Mon Sep 17 00:00:00 2001 From: lightningterror Date: Sat, 23 Nov 2019 20:27:42 +0100 Subject: [PATCH] pcsx2-gui: Fix dpi scaling for some windows. About, first time wizard, import settings, assertion dialog. --- pcsx2/gui/Dialogs/AboutBoxDialog.cpp | 7 +++---- pcsx2/gui/Dialogs/AssertionDialog.cpp | 3 ++- pcsx2/gui/Dialogs/FirstTimeWizard.cpp | 3 ++- pcsx2/gui/Dialogs/ImportSettingsDialog.cpp | 3 ++- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/pcsx2/gui/Dialogs/AboutBoxDialog.cpp b/pcsx2/gui/Dialogs/AboutBoxDialog.cpp index 4c9d8e6007..3d380be8f9 100644 --- a/pcsx2/gui/Dialogs/AboutBoxDialog.cpp +++ b/pcsx2/gui/Dialogs/AboutBoxDialog.cpp @@ -16,6 +16,7 @@ #include "PrecompiledHeader.h" #include "App.h" #include "AppCommon.h" +#include "MSWstuff.h" #include "Dialogs/ModalPopups.h" @@ -34,12 +35,10 @@ using namespace pxSizerFlags; Dialogs::AboutBoxDialog::AboutBoxDialog(wxWindow* parent) : wxDialogWithHelpers(parent, AddAppName(_("About %s")), pxDialogFlags()) , m_bitmap_logo(this, wxID_ANY, wxBitmap(EmbeddedImage().Get()), - wxDefaultPosition, wxDefaultSize - ) + wxDefaultPosition, wxDefaultSize) { // Main layout - - SetMinWidth(460); + SetMinWidth(MSW_GetDPIScale() * 460); *this += m_bitmap_logo | StdCenter(); diff --git a/pcsx2/gui/Dialogs/AssertionDialog.cpp b/pcsx2/gui/Dialogs/AssertionDialog.cpp index 1fb8f3b86b..2b45d2a399 100644 --- a/pcsx2/gui/Dialogs/AssertionDialog.cpp +++ b/pcsx2/gui/Dialogs/AssertionDialog.cpp @@ -16,13 +16,14 @@ #include "PrecompiledHeader.h" #include "App.h" #include "ModalPopups.h" +#include "MSWstuff.h" using namespace pxSizerFlags; Dialogs::AssertionDialog::AssertionDialog( const wxString& text, const wxString& stacktrace ) : wxDialogWithHelpers( NULL, _("Assertion Failure - ") + pxGetAppName(), pxDialogFlags().Resize(!stacktrace.IsEmpty()) ) { - SetMinWidth( 720 ); + SetMinWidth( MSW_GetDPIScale() * 720 ); wxFlexGridSizer* flexgrid = new wxFlexGridSizer( 1 ); flexgrid->AddGrowableCol( 0 ); diff --git a/pcsx2/gui/Dialogs/FirstTimeWizard.cpp b/pcsx2/gui/Dialogs/FirstTimeWizard.cpp index 0990c08034..31a42947c6 100644 --- a/pcsx2/gui/Dialogs/FirstTimeWizard.cpp +++ b/pcsx2/gui/Dialogs/FirstTimeWizard.cpp @@ -16,6 +16,7 @@ #include "PrecompiledHeader.h" #include "System.h" #include "Plugins.h" +#include "MSWstuff.h" #include "ModalPopups.h" #include "Panels/ConfigurationPanels.h" @@ -67,7 +68,7 @@ namespace Panels Panels::FirstTimeIntroPanel::FirstTimeIntroPanel( wxWindow* parent ) : wxPanelWithHelpers( parent, wxVERTICAL ) { - SetMinWidth( 600 ); + SetMinWidth( MSW_GetDPIScale() * 600 ); FastFormatUnicode faqFile; #ifndef DOC_DIR_COMPILATION diff --git a/pcsx2/gui/Dialogs/ImportSettingsDialog.cpp b/pcsx2/gui/Dialogs/ImportSettingsDialog.cpp index c7aeae04a6..fca88f99aa 100644 --- a/pcsx2/gui/Dialogs/ImportSettingsDialog.cpp +++ b/pcsx2/gui/Dialogs/ImportSettingsDialog.cpp @@ -15,6 +15,7 @@ #include "PrecompiledHeader.h" #include "System.h" +#include "MSWstuff.h" #include "ModalPopups.h" @@ -23,7 +24,7 @@ using namespace pxSizerFlags; Dialogs::ImportSettingsDialog::ImportSettingsDialog( wxWindow* parent ) : wxDialogWithHelpers( parent, _("Import Existing Settings?") ) { - SetMinWidth( 440 ); + SetMinWidth( MSW_GetDPIScale() * 440 ); pxStaticText& heading( Text( pxsFmt(