Skip to content

Commit

Permalink
Don't check for sfHeight when scaling, issue #1198
Browse files Browse the repository at this point in the history
  • Loading branch information
joachimmarder committed Jul 23, 2023
1 parent 49d4b3b commit 5b7eeea
Showing 1 changed file with 14 additions and 16 deletions.
30 changes: 14 additions & 16 deletions Source/VirtualTrees.BaseTree.pas
Original file line number Diff line number Diff line change
Expand Up @@ -9014,22 +9014,20 @@ procedure TBaseVirtualTree.ChangeScale(M, D: Integer{$if CompilerVersion >= 31};
Flags := ScalingFlags
else
Flags := DefaultScalingFlags; // Important for #677
if (sfHeight in Flags) then begin
TVTHeaderCracker(FHeader).ChangeScale(M, D, {$if CompilerVersion >= 31}isDpiChange{$ELSE} M <> D{$ifend});
SetDefaultNodeHeight(MulDiv(FDefaultNodeHeight, M, D));
Indent := MulDiv(Indent, M, D);
FTextMargin := MulDiv(FTextMargin, M, D);
FMargin := MulDiv(FMargin, M, D);
FImagesMargin := MulDiv(FImagesMargin, M, D);
// Scale utility images, #796
if FCheckImageKind = ckSystemDefault then begin
FreeAndNil(FCheckImages);
if HandleAllocated then
FCheckImages := CreateSystemImageSet(Self);
end;
UpdateHeaderRect();
ScaleNodeHeights(M, D);
end;//if sfHeight
TVTHeaderCracker(FHeader).ChangeScale(M, D, {$if CompilerVersion >= 31}isDpiChange{$ELSE} M <> D{$ifend});
SetDefaultNodeHeight(MulDiv(FDefaultNodeHeight, M, D));
Indent := MulDiv(Indent, M, D);
FTextMargin := MulDiv(FTextMargin, M, D);
FMargin := MulDiv(FMargin, M, D);
FImagesMargin := MulDiv(FImagesMargin, M, D);
// Scale utility images, #796
if FCheckImageKind = ckSystemDefault then begin
FreeAndNil(FCheckImages);
if HandleAllocated then
FCheckImages := CreateSystemImageSet(Self);
end;
UpdateHeaderRect();
ScaleNodeHeights(M, D);
finally
EndUpdate();
end;//try..finally
Expand Down

0 comments on commit 5b7eeea

Please sign in to comment.