From 88a404580aecfcf1a60a611caffcaec57856b9dc Mon Sep 17 00:00:00 2001
From: Mark Roszko <mark.roszko@gmail.com>
Date: Fri, 31 Jan 2025 11:10:39 -0500
Subject: [PATCH] Fix DPI scaling on Configure Paths

---
 common/dialogs/dialog_configure_paths.cpp | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/common/dialogs/dialog_configure_paths.cpp b/common/dialogs/dialog_configure_paths.cpp
index 9cc11082e2..d6b23646c4 100644
--- a/common/dialogs/dialog_configure_paths.cpp
+++ b/common/dialogs/dialog_configure_paths.cpp
@@ -65,12 +65,14 @@ DIALOG_CONFIGURE_PATHS::DIALOG_CONFIGURE_PATHS( wxWindow* aParent ) :
     m_errorGrid( nullptr ),
     m_errorRow( -1 ),
     m_errorCol( -1 ),
-    m_helpBox( nullptr ),
-    m_heightBeforeHelp( 400 )
+    m_helpBox( nullptr )
 {
+    m_heightBeforeHelp = FromDIP ( 400 );
     m_btnAddEnvVar->SetBitmap( KiBitmapBundle( BITMAPS::small_plus ) );
     m_btnDeleteEnvVar->SetBitmap( KiBitmapBundle( BITMAPS::small_trash ) );
 
+    m_EnvVars->SetMinSize( FromDIP( m_EnvVars->GetMinSize() ) );
+
     m_EnvVars->ClearRows();
     m_EnvVars->AppendCols( 1 );     // for the isExternal flags
     m_EnvVars->HideCol( TV_FLAG_COL );
@@ -81,7 +83,7 @@ DIALOG_CONFIGURE_PATHS::DIALOG_CONFIGURE_PATHS( wxWindow* aParent ) :
     m_EnvVars->SetColAttr( TV_VALUE_COL, attr );
 
     // Give a bit more room for combobox editors
-    m_EnvVars->SetDefaultRowSize( m_EnvVars->GetDefaultRowSize() + 4 );
+    m_EnvVars->SetDefaultRowSize( m_EnvVars->GetDefaultRowSize() + FromDIP( 4 ) );
 
     m_EnvVars->PushEventHandler( new GRID_TRICKS( m_EnvVars,
                                                   [this]( wxCommandEvent& aEvent )