From e55d7c1dc354ab8f2cb1a27c0c4ab4aede6a40ad Mon Sep 17 00:00:00 2001 From: DjPasco Date: Thu, 2 Feb 2023 17:23:36 +0200 Subject: [PATCH] Scroll by entire rows in wxGrid when they have uniform heights Set vertical scroll line size to the default row height. See #23032. --- src/generic/grid.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index 36bd8dbdc8..44b476ec0a 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -2789,6 +2789,10 @@ void wxGrid::InitPixelFields() m_defaultRowHeight += 4; #endif + // Scroll by row height to avoid showing partial rows when all heights are + // the same. + m_yScrollPixelsPerLine = m_defaultRowHeight; + // Don't change the value when called from OnDPIChanged() later if the // corresponding label window is hidden, these values should remain zeroes // then.