From e1b6ef0b003984524de3cf97d79b9582cd768c0c Mon Sep 17 00:00:00 2001 From: Jason Naylor Date: Wed, 23 Sep 2026 11:44:35 -0700 Subject: [PATCH] LT-22489: Keep the selected browse row the same height as its neighbours Draw the selected row's highlight border at the same thickness as the rule between rows instead of 3 points. The thicker border made the selected row about three pixels taller, so moving the highlight to the row above pushed the insertion point down and the SelectedIndex setter then scrolled the view by that amount to put it back, which showed as a small jump on every arrow-up. Co-Authored-By: Claude Fable 5.1 --- Src/Common/Controls/XMLViews/XmlBrowseViewBaseVc.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Src/Common/Controls/XMLViews/XmlBrowseViewBaseVc.cs b/Src/Common/Controls/XMLViews/XmlBrowseViewBaseVc.cs index 613317e2a5..70c3a8ea12 100644 --- a/Src/Common/Controls/XMLViews/XmlBrowseViewBaseVc.cs +++ b/Src/Common/Controls/XMLViews/XmlBrowseViewBaseVc.cs @@ -67,6 +67,11 @@ public class XmlBrowseViewBaseVc : XmlVc protected int m_dxmpCheckWidth; /// Roughly 1-pixel border. protected int m_dxmpCheckBorderWidth = 72000 / 96; + /// + /// Thickness of the rule between rows. The selected row's highlight border uses the same + /// thickness so that selecting a row never changes its height (LT-22489). + /// + private const int kdmpRowBorder = 72000 / 96; /// protected XmlBrowseViewBase m_xbv; @@ -927,7 +932,7 @@ protected virtual void AddTableRow(IVwEnv vwenv, int hvo, int frag) { vwenv.set_IntProperty((int)FwTextPropType.ktptBorderTop, (int)FwTextPropVar.ktpvMilliPoint, - 3000); + kdmpRowBorder); vwenv.set_IntProperty((int)FwTextPropType.ktptBorderColor, (int)FwTextPropVar.ktpvDefault, (int)RGB(Color.FromKnownColor(KnownColor.Highlight))); @@ -970,7 +975,7 @@ protected virtual void AddTableRow(IVwEnv vwenv, int hvo, int frag) vwenv.OpenTable(colCount, // this many columns vl100, // using 100% of available space - 72000 / 96, //0, // no border + kdmpRowBorder, VwAlignment.kvaLeft, // cells by default left aligned // VwFramePosition.kvfpBelow, //.kvfpBox, //.kvfpVoid, // no frame VwFramePosition.kvfpBelow | VwFramePosition.kvfpRhs,