From a7f5fc45e711400b09032fdcd5abb631132a6450 Mon Sep 17 00:00:00 2001 From: Mark Roszko <mark.roszko@gmail.com> Date: Fri, 31 Jan 2025 11:14:40 -0500 Subject: [PATCH] Widths in WX_GRID_AUTOSIZER should account for dpi scaling --- common/widgets/wx_grid_autosizer.cpp | 6 ++++-- vcpkg.json | 1 - 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/common/widgets/wx_grid_autosizer.cpp b/common/widgets/wx_grid_autosizer.cpp index 91248f980f..ca09be16bd 100644 --- a/common/widgets/wx_grid_autosizer.cpp +++ b/common/widgets/wx_grid_autosizer.cpp @@ -78,11 +78,13 @@ void WX_GRID_AUTOSIZER::recomputeGridWidths() { m_grid.AutoSizeColumn( colIndex ); const int colSize = m_grid.GetColSize( colIndex ); - m_grid.SetColSize( colIndex, std::max( minWidth, colSize ) ); + + int minWidthScaled = m_grid.FromDIP( minWidth ); + m_grid.SetColSize( colIndex, std::max( minWidthScaled, colSize ) ); if( colIndex == m_flexibleCol ) { - flexibleMinWidth = minWidth; + flexibleMinWidth = minWidthScaled; } } diff --git a/vcpkg.json b/vcpkg.json index 1496197af3..c75c7d7c67 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -41,7 +41,6 @@ }, "icu", "ngspice", - "wxpython", "libgit2", "nng", "protobuf",