support for delphi 11.1
This commit is contained in:
@@ -1,10 +1,57 @@
|
||||
{$IF (CompilerVersion <= 25)}
|
||||
type
|
||||
//other name of constants in XE4
|
||||
TStyledSettingHelper = record helper for TStyledSetting
|
||||
const Family = TStyledSetting.ssFamily;
|
||||
const Size = TStyledSetting.ssSize;
|
||||
const Style = TStyledSetting.ssStyle;
|
||||
const FontColor = TStyledSetting.ssFontColor;
|
||||
const Other = TStyledSetting.ssOther;
|
||||
end;
|
||||
|
||||
TTextAlignHelper = record helper for TTextAlign
|
||||
const Center = TTextAlign.taCenter;
|
||||
const Leading = TTextAlign.taLeading;
|
||||
const Trailing = TTextAlign.taTrailing;
|
||||
end;
|
||||
|
||||
TFmxFormBorderStyleHelper = record helper for TFmxFormBorderStyle
|
||||
const None = TFmxFormBorderStyle.bsNone;
|
||||
const Single = TFmxFormBorderStyle.bsSingle;
|
||||
const Sizeable = TFmxFormBorderStyle.bsSizeable;
|
||||
const ToolWindow = TFmxFormBorderStyle.bsToolWindow;
|
||||
const SizeToolWin = TFmxFormBorderStyle.bsSizeToolWin;
|
||||
end;
|
||||
|
||||
TFormPositionHelper = record helper for TFormPosition
|
||||
//(poDesigned, poDefault, poDefaultPosOnly, poDefaultSizeOnly,
|
||||
//poScreenCenter, poDesktopCenter, poMainFormCenter, poOwnerFormCenter);
|
||||
const OwnerFormCenter = TFormPosition.poOwnerFormCenter;
|
||||
const ScreenCenter = TFormPosition.poScreenCenter;
|
||||
end;
|
||||
|
||||
TBrushKindHelper = record helper for TBrushKind
|
||||
//(bkNone, bkSolid, bkGradient, bkBitmap, bkResource);
|
||||
const None = TBrushKind.bkNone;
|
||||
end;
|
||||
|
||||
TAlignLayoutHelper = record helper for TAlignLayout
|
||||
//(alNone, alTop, alLeft, alRight, alBottom, alMostTop, alMostBottom, alMostLeft, alMostRight, alClient,
|
||||
//alContents, alCenter, alVertCenter, alHorzCenter, alHorizontal, alVertical, alScale, alFit, alFitLeft, alFitRight);
|
||||
const Top = TAlignLayout.alTop;
|
||||
end;
|
||||
|
||||
{$IFEND}
|
||||
|
||||
var
|
||||
_ScreenDPI_X : Single = 0;
|
||||
|
||||
function ScalingByScreenDPI_N( F:TForm = NIL ):Single;
|
||||
var
|
||||
p : TPointF;
|
||||
{$IF (CompilerVersion >= 28)}
|
||||
M : TDeviceDisplayMetrics;
|
||||
{$IFEND}
|
||||
i : integer;
|
||||
h : THandle;
|
||||
begin
|
||||
@@ -29,6 +76,7 @@ begin
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
||||
{$IF (CompilerVersion >= 28)} //TDeviceDisplayMetrics is available since XE8
|
||||
if TPlatformServices.Current.SupportsPlatformService( IFMXDeviceMetricsService ) then
|
||||
begin
|
||||
M := (TPlatformServices.Current.GetPlatformService(
|
||||
@@ -38,6 +86,7 @@ begin
|
||||
{$IFDEF MSWINDOWS}96{$ENDIF}
|
||||
;
|
||||
end;
|
||||
{$IFEND}
|
||||
end;
|
||||
|
||||
function ScalingByScreenDPI( F:TForm = NIL ):TPointF;
|
||||
|
Reference in New Issue
Block a user