mirror of https://github.com/PCSX2/pcsx2.git
gui:windows: Scale confirmation dialogs at high DPI
This should scale all the other dialogs that don't have specifics widths set.
This commit is contained in:
parent
31b1e34ae8
commit
5f2e60d751
|
@ -16,6 +16,7 @@
|
|||
#include "PrecompiledHeader.h"
|
||||
#include "System.h"
|
||||
#include "App.h"
|
||||
#include "MSWstuff.h"
|
||||
|
||||
#include "ModalPopups.h"
|
||||
#include "Utilities/StringHelpers.h"
|
||||
|
@ -143,7 +144,7 @@ void MsgButtons::SetBestFocus( wxWindow* dialog ) const
|
|||
|
||||
wxWindowID pxIssueConfirmation( wxDialogWithHelpers& confirmDlg, const MsgButtons& buttons )
|
||||
{
|
||||
if( confirmDlg.GetMinWidth() <= 0 ) confirmDlg.SetMinWidth( 400 );
|
||||
if( confirmDlg.GetMinWidth() <= 0 ) confirmDlg.SetMinWidth( 400 * MSW_GetDPIScale());
|
||||
|
||||
confirmDlg += new ModalButtonPanel( &confirmDlg, buttons ) | pxCenter.Border( wxTOP, 8 );
|
||||
buttons.SetBestFocus( confirmDlg );
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
|
||||
#include "PrecompiledHeader.h"
|
||||
#include "App.h"
|
||||
#include "MSWstuff.h"
|
||||
#include "Dialogs/ModalPopups.h"
|
||||
|
||||
using namespace Threading;
|
||||
|
@ -36,7 +37,7 @@ static int pxMessageDialog( const wxString& caption, const wxString& content, co
|
|||
// And in either case the emulation should be paused/suspended for the user.
|
||||
|
||||
wxDialogWithHelpers dialog( NULL, caption );
|
||||
dialog.SetMinWidth( (content.Length() > 256) ? 525 : 460 );
|
||||
dialog.SetMinWidth( ((content.Length() > 256) ? 525 : 460) * MSW_GetDPIScale() );
|
||||
dialog += dialog.Heading( content ) | StdExpand();
|
||||
return pxIssueConfirmation( dialog, buttons );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue