Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions Src/Common/Controls/XMLViews/XmlBrowseViewBaseVc.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ public class XmlBrowseViewBaseVc : XmlVc
protected int m_dxmpCheckWidth;
/// <summary>Roughly 1-pixel border.</summary>
protected int m_dxmpCheckBorderWidth = 72000 / 96;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this also be private const? Should we set kdmpRowBorder = m_dxmpCheckBorderWidth?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question, I looked and then decided to keep them separate: m_dxmpCheckBorderWidth is the border drawn around the check-box picture (lines 791, 1324-1333) and kdmpRowBorder is the rule between rows. Both are 1 px today, but changing one should not move the other, and a const can't be initialised from an instance field anyway. m_dxmpCheckBorderWidth is never reassigned, so it could become const, but it is protected on a public class and unrelated to this fix, so I left it.

/// <summary>
/// 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).
/// </summary>
private const int kdmpRowBorder = 72000 / 96;
/// <summary></summary>
protected XmlBrowseViewBase m_xbv;

Expand Down Expand Up @@ -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)));
Expand Down Expand Up @@ -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,
Expand Down
Loading