From 29c64c0c1e693ede7feb0948138cfaa533681d24 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 31 Oct 2023 03:58:50 +0100 Subject: [PATCH] Parse "virtualwidth" as dimension, not a simple number This allows to scale it properly depending on DPI and also to express it in dialog units. --- src/xrc/xh_propgrid.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/xrc/xh_propgrid.cpp b/src/xrc/xh_propgrid.cpp index 1ff962c291..42346978cd 100644 --- a/src/xrc/xh_propgrid.cpp +++ b/src/xrc/xh_propgrid.cpp @@ -102,8 +102,7 @@ void wxPropertyGridXmlHandler::HandlePropertyGridParams() wxString sVW(wxT("virtualwidth")); if ( HasParam(sVW) ) { - int vw = GetLong(sVW); - m_pg->SetVirtualWidth(vw); + m_pg->SetVirtualWidth(GetDimension(sVW)); } }