Skip to content

Commit

Permalink
Fixed previous commit, ScaledPixels() is only availbale within a tree…
Browse files Browse the repository at this point in the history
… control.
  • Loading branch information
joachimmarder committed Oct 7, 2019
1 parent 86038d4 commit 19b92b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/VirtualTrees.pas
Original file line number Diff line number Diff line change
Expand Up @@ -4349,8 +4349,8 @@ function CreateSystemImageSet(pControl: TWinControl): TImageList;
Res := StyleServices.GetElementSize(BM.Canvas.Handle, StyleServices.GetElementDetails(tbCheckBoxUncheckedNormal), TElementSize.esActual, lSize);
if not Res then begin
lSize := TSize.Create(GetSystemMetrics(SM_CXMENUCHECK), GetSystemMetrics(SM_CYMENUCHECK));
if lSize.cx = 0 then begin
lSize.cx := ScaledPixels(cDefaultCheckboxSize);
if lSize.cx = 0 then begin // error? (Should happen rarely only)
lSize.cx := MulDiv(cDefaultCheckboxSize, Screen.PixelsPerInch, USER_DEFAULT_SCREEN_DPI);
lSize.cy := lSize.cx;
end;// if
end;//if
Expand Down

0 comments on commit 19b92b2

Please sign in to comment.