mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 07:55:58 +02:00
lcl: forms: allow changing TCustomForm.DesignTimeDPI in runtime.
git-svn-id: trunk@53510 -
This commit is contained in:
parent
beafafc9a0
commit
2612f8b61e
@ -355,10 +355,11 @@ end;
|
|||||||
|
|
||||||
procedure TCustomForm.SetDesignTimeDPI(const aDesignTimeDPI: Integer);
|
procedure TCustomForm.SetDesignTimeDPI(const aDesignTimeDPI: Integer);
|
||||||
begin
|
begin
|
||||||
if not (csLoading in ComponentState) then
|
if (csLoading in ComponentState) // allow setting only when loading
|
||||||
|
or not (csDesigning in ComponentState)) then // or in runtime (the programmer has to know why he is doing that)
|
||||||
|
FDesignTimeDPI := aDesignTimeDPI
|
||||||
|
else
|
||||||
raise EInvalidOperation.Create(sCannotSetDesignTimeDPI);
|
raise EInvalidOperation.Create(sCannotSetDesignTimeDPI);
|
||||||
|
|
||||||
FDesignTimeDPI := aDesignTimeDPI;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user