mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-27 19:20:17 +02:00
LCL: Minor improvement for scaling in Grids and ImageList. Issue #35648, patch from Alexey Tor.
git-svn-id: trunk@62090 -
This commit is contained in:
parent
167df5e84a
commit
6e36102baf
@ -9803,9 +9803,9 @@ begin
|
|||||||
FSpecialCursors[gcsRowHeightChanging] := crVSplit;
|
FSpecialCursors[gcsRowHeightChanging] := crVSplit;
|
||||||
FSpecialCursors[gcsDragging] := crMultiDrag;
|
FSpecialCursors[gcsDragging] := crMultiDrag;
|
||||||
|
|
||||||
varRubberSpace := MulDiv(constRubberSpace, Screen.PixelsPerInch, 96);
|
varRubberSpace := Scale96ToScreen(constRubberSpace);
|
||||||
varCellPadding := MulDiv(constCellPadding, Screen.PixelsPerInch, 96);
|
varCellPadding := Scale96ToScreen(constCellPadding);
|
||||||
varColRowBorderTolerance := MulDiv(constColRowBorderTolerance, Screen.PixelsPerInch, 96);
|
varColRowBorderTolerance := Scale96ToScreen(constColRowBorderTolerance);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
destructor TCustomGrid.Destroy;
|
destructor TCustomGrid.Destroy;
|
||||||
|
@ -1880,7 +1880,7 @@ begin
|
|||||||
if not FScaled then
|
if not FScaled then
|
||||||
Result := AImageWidth
|
Result := AImageWidth
|
||||||
else begin
|
else begin
|
||||||
Result := round(AImageWidth * APPI / 96);
|
Result := AImageWidth * APPI div 96;
|
||||||
if not FData.Find(Result, idx) then begin
|
if not FData.Find(Result, idx) then begin
|
||||||
if APPI <= 120 then
|
if APPI <= 120 then
|
||||||
Factor := 100 // 100-125% (96-120 DPI): no scaling
|
Factor := 100 // 100-125% (96-120 DPI): no scaling
|
||||||
|
Loading…
Reference in New Issue
Block a user