From da1e03941cbaaa285e1ba67a05681984bb3b402c Mon Sep 17 00:00:00 2001 From: ondrej Date: Sat, 20 May 2017 05:56:43 +0000 Subject: [PATCH] lcl: treeview: High-DPI: fix scaling of non-themed node icons. Issue #31829 git-svn-id: trunk@55020 - --- lcl/include/treeview.inc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lcl/include/treeview.inc b/lcl/include/treeview.inc index 302843119d..69f13b44f3 100644 --- a/lcl/include/treeview.inc +++ b/lcl/include/treeview.inc @@ -4542,7 +4542,7 @@ begin if ExpandSignType = tvestTheme then Result := MulDiv(FThemeExpandSignSize, Font.PixelsPerInch, Screen.PixelsPerInch) else - Result := DefaultTreeNodeExpandSignSize; + Result := MulDiv(DefaultTreeNodeExpandSignSize, Font.PixelsPerInch, 96); end; function TCustomTreeView.GetRealIndent: Integer; @@ -4978,13 +4978,13 @@ var // draw a plus or a minus sign R := Rect(ALeft, ATop, ARight+1, ABottom+1); //+1 for centering of line in square Rectangle(R); - MoveTo(R.Left + 2, MidY); - LineTo(R.Right - 2, MidY); + MoveTo(R.Left + MulDiv(2, Font.PixelsPerInch, 96), MidY); + LineTo(R.Right - MulDiv(2, Font.PixelsPerInch, 96), MidY); if not CollapseSign then begin - MoveTo(MidX, R.Top + 2); - LineTo(MidX, R.Bottom - 2); - end; + MoveTo(MidX, R.Top + MulDiv(2, Font.PixelsPerInch, 96)); + LineTo(MidX, R.Bottom - MulDiv(2, Font.PixelsPerInch, 96)); + end; end; tvestArrow, tvestArrowFill: