Skip to content

Commit c749c8e

Browse files
committed
Don't check for sfHeight when scaling, issue #1198
1 parent ccfb61c commit c749c8e

File tree

1 file changed

+14
-16
lines changed

1 file changed

+14
-16
lines changed

Source/VirtualTrees.pas

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18583,22 +18583,20 @@ procedure TBaseVirtualTree.ChangeScale(M, D: Integer{$if CompilerVersion >= 31};
1858318583
Flags := ScalingFlags
1858418584
else
1858518585
Flags := DefaultScalingFlags; // Important for #677
18586-
if (sfHeight in Flags) then begin
18587-
FHeader.ChangeScale(M, D, {$if CompilerVersion >= 31}isDpiChange{$ELSE} M <> D{$ifend});
18588-
SetDefaultNodeHeight(MulDiv(FDefaultNodeHeight, M, D));
18589-
Indent := MulDiv(Indent, M, D);
18590-
FTextMargin := MulDiv(FTextMargin, M, D);
18591-
FMargin := MulDiv(FMargin, M, D);
18592-
FImagesMargin := MulDiv(FImagesMargin, M, D);
18593-
// Scale utility images, #796
18594-
if FCheckImageKind = ckSystemDefault then begin
18595-
FreeAndNil(FCheckImages);
18596-
if HandleAllocated then
18597-
FCheckImages := CreateSystemImageSet(Self);
18598-
end;
18599-
UpdateHeaderRect();
18600-
ScaleNodeHeights(M, D);
18601-
end;//if sfHeight
18586+
FHeader.ChangeScale(M, D, {$if CompilerVersion >= 31}isDpiChange{$ELSE} M <> D{$ifend});
18587+
SetDefaultNodeHeight(MulDiv(FDefaultNodeHeight, M, D));
18588+
Indent := MulDiv(Indent, M, D);
18589+
FTextMargin := MulDiv(FTextMargin, M, D);
18590+
FMargin := MulDiv(FMargin, M, D);
18591+
FImagesMargin := MulDiv(FImagesMargin, M, D);
18592+
// Scale utility images, #796
18593+
if FCheckImageKind = ckSystemDefault then begin
18594+
FreeAndNil(FCheckImages);
18595+
if HandleAllocated then
18596+
FCheckImages := CreateSystemImageSet(Self);
18597+
end;
18598+
UpdateHeaderRect();
18599+
ScaleNodeHeights(M, D);
1860218600
end;// if M<>D
1860318601
end;//if toAutoChangeScale
1860418602
inherited ChangeScale(M, D{$if CompilerVersion >= 31}, isDpiChange{$ifend});

0 commit comments

Comments
 (0)