Fix preferences dialog on hidpi using FromDIP

This commit is contained in:
Marek Roszko 2024-01-16 15:33:07 -05:00
parent 918327efb3
commit f6401b0903
2 changed files with 4 additions and 3 deletions

View File

@ -1053,7 +1053,8 @@ void EDA_BASE_FRAME::ShowPreferences( wxString aStartPage, wxString aStartParent
{
WX_BUSY_INDICATOR busy_cursor;
PAGED_DIALOG dlg( this, _( "Preferences" ), true, true, wxEmptyString, wxSize( 980, 560 ) );
PAGED_DIALOG dlg( this, _( "Preferences" ), true, true, wxEmptyString,
wxWindow::FromDIP( wxSize( 980, 560 ), NULL ) );
dlg.SetEvtHandlerEnabled( false );

View File

@ -408,8 +408,8 @@ void PAGED_DIALOG::onPageChanged( wxBookCtrlEvent& event )
SetMinSize( wxDefaultSize );
wxSize minSize = GetBestSize();
minSize.IncTo( wxSize( 600, 500 ) );
minSize.DecTo( wxSize( 1500, 900 ) ); // Failsafe
minSize.IncTo( FromDIP( wxSize( 600, 500 ) ) );
minSize.DecTo( FromDIP( wxSize( 1500, 900 ) ) ); // Failsafe
SetMinSize( minSize );
wxSize currentSize = GetSize();