mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-09 20:15:58 +02:00
LCL: forms: highDPI: set DesignTimeDPI automatically by the IDE, don't allow to change it manually.
git-svn-id: trunk@53497 -
This commit is contained in:
parent
fae72cb0a7
commit
4bccf7cae5
@ -471,6 +471,7 @@ type
|
||||
procedure SetAlphaBlend(const AValue: Boolean);
|
||||
procedure SetAlphaBlendValue(const AValue: Byte);
|
||||
procedure SetBorderIcons(NewIcons: TBorderIcons);
|
||||
procedure SetDesignTimeDPI(const aDesignTimeDPI: Integer);
|
||||
procedure SetFormBorderStyle(NewStyle: TFormBorderStyle);
|
||||
procedure SetCancelControl(NewControl: TControl);
|
||||
procedure SetDefaultControl(NewControl: TControl);
|
||||
@ -659,7 +660,7 @@ type
|
||||
property DefaultMonitor: TDefaultMonitor read FDefaultMonitor
|
||||
write FDefaultMonitor default dmActiveForm;
|
||||
property Designer: TIDesigner read FDesigner write FDesigner;
|
||||
property DesignTimeDPI: Integer read FDesignTimeDPI write FDesignTimeDPI;
|
||||
property DesignTimeDPI: Integer read FDesignTimeDPI write SetDesignTimeDPI;
|
||||
property EffectiveShowInTaskBar: TShowInTaskBar read GetEffectiveShowInTaskBar;
|
||||
property FormState: TFormState read FFormState;
|
||||
property FormStyle: TFormStyle read FFormStyle write SetFormStyle
|
||||
@ -753,6 +754,7 @@ type
|
||||
property Color;
|
||||
property Constraints;
|
||||
property DefaultMonitor;
|
||||
property DesignTimeDPI;
|
||||
property DockSite;
|
||||
property DragKind;
|
||||
property DragMode;
|
||||
|
@ -347,6 +347,14 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCustomForm.SetDesignTimeDPI(const aDesignTimeDPI: Integer);
|
||||
begin
|
||||
if not (csLoading in ComponentState) then
|
||||
raise EInvalidOperation.Create(sCannotSetDesignTimeDPI);
|
||||
|
||||
FDesignTimeDPI := aDesignTimeDPI;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
Method: TCustomForm.SetIcon
|
||||
Params: the new icon
|
||||
@ -2680,6 +2688,8 @@ begin
|
||||
//DebugLn('TCustomForm.Loaded ',Name,':',ClassName,' ',FormUpdating,' ',fsCreating in FFormState,' ',Visible,' ',fsVisible in FormState);
|
||||
if fsVisible in FormState then
|
||||
Visible := True;
|
||||
if csDesigning in ComponentState then
|
||||
FDesignTimeDPI := Screen.PixelsPerInch;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
|
@ -217,6 +217,7 @@ resourceString
|
||||
sInvalidImageSize = 'Invalid image size';
|
||||
sDuplicateMenus = 'Duplicate menus';
|
||||
sCannotFocus = 'Cannot focus a disabled or invisible window';
|
||||
sCannotSetDesignTimeDPI = 'Cannot set design time DPI.';
|
||||
sParentRequired = 'Control "%s" has no parent window.';
|
||||
sInvalidCharSet = 'The char set in mask "%s" is not valid!';
|
||||
SMaskEditNoMatch = 'The current text does not match the specified mask.';
|
||||
|
Loading…
Reference in New Issue
Block a user