lcl: treeview: High-DPI: fix scaling of non-themed node icons. Issue #31829

git-svn-id: trunk@55020 -
This commit is contained in:
ondrej 2017-05-20 05:56:43 +00:00
parent 57a8731482
commit da1e03941c

View File

@ -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: