TvPlanIt: Fix compilation after Laz/main commit 74446557f6825c4ddadd9f6321a80147798dbf99. Less hints and warnings.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8836 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2023-06-15 10:20:49 +00:00
parent 875a3a826d
commit b84bdf27e1
10 changed files with 45 additions and 58 deletions

View File

@ -5,7 +5,7 @@ unit VpImportPreview;
interface
uses
Classes, SysUtils, Graphics, Types,
LCLIntf, LCLType, LCLVersion, Classes, SysUtils, Graphics, Types,
Forms, Controls, Dialogs, Grids, ExtCtrls, StdCtrls, VpBaseDS;
type
@ -67,7 +67,7 @@ implementation
{$R *.lfm}
uses
LCLIntf, LCLType, Themes,
Themes,
VpSR;
{ TVpImportGrid }
@ -97,7 +97,11 @@ begin
begin
R := CellRect(cell.X, cell.Y);
details := ThemeServices.GetElementDetails(tbCheckBoxCheckedNormal);
{$IF LCL_FullVersion >= 2030000}
lSize := ThemeServices.GetDetailSizeForPPI(Details, Font.PixelsPerInch);
{$ELSE}
lSize := ThemeServices.GetDetailSize(Details);
{$ENDIF}
lSize.cx := MulDiv(lSize.cx, Font.PixelsPerInch, Screen.PixelsPerInch);
lSize.cy := MulDiv(lSize.cy, Font.PixelsPerInch, Screen.PixelsPerInch);
OffsetRect(R, (R.Left+R.Right-lSize.CX) div 2, (R.Top+R.Bottom-lSize.CY) div 2);