[Lazarus] DesignPPI property in TDataModule

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[Lazarus] DesignPPI property in TDataModule

Free Pascal - Lazarus mailing list
What sense in PPI for non-visual design-time component?

If it used by child DPI-aware components like TImageList, then IMHO better get PPI from TApplication.

TDataModule.DesignPPI property cause error popups in Lazarus/Delphi multiplatform project.

--
Bodrov Sergey
software development, IT consulting
Phone (Belarus): +375(25)794-21-58
Skype: sergey.bodrov1


--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] DesignPPI property in TDataModule

Free Pascal - Lazarus mailing list
On 15.04.2019 13:07, Sergey Bodrov via lazarus wrote:
> What sense in PPI for non-visual design-time component?

What do you mean? There is no PPI property in non-visual design-time
components.


> If it used by child DPI-aware components like TImageList, then IMHO
> better get PPI from TApplication.


Again, there is no PPI property in TImageList.


> TDataModule.DesignPPI property cause error popups in Lazarus/Delphi
> multiplatform project.


Yes, there is TDataModule.DesignPPI that makes sure the positions
(Left/Top properties) of the non-visual components are scaled correctly.

Ondrej

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] DesignPPI property in TDataModule

Free Pascal - Lazarus mailing list
On 15.04.2019 13:24, Ondrej Pokorny via lazarus wrote:
> On 15.04.2019 13:07, Sergey Bodrov via lazarus wrote:
>> TDataModule.DesignPPI property cause error popups in Lazarus/Delphi
>> multiplatform project.
>
> Yes, there is TDataModule.DesignPPI that makes sure the positions
> (Left/Top properties) of the non-visual components are scaled correctly.


By the way, the default value of 96 should not be written to LFM/DFM. So
you should not get any warnings if you develop at 96 DPI / 100% scaling.

Ondrej

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] DesignPPI property in TDataModule

Free Pascal - Lazarus mailing list
пн, 15 апр. 2019 г. в 14:42, Ondrej Pokorny via lazarus <[hidden email]>:

> Yes, there is TDataModule.DesignPPI that makes sure the positions
> (Left/Top properties) of the non-visual components are scaled correctly.


By the way, the default value of 96 should not be written to LFM/DFM. So
you should not get any warnings if you develop at 96 DPI / 100% scaling.

content of some Delphi .DFM after Lazarus 2.0.0 win64 release:
===
object DMBaseClient: TDMBaseClient
  OnCreate = DataModuleCreate
  OnDestroy = DataModuleDestroy
  OldCreateOrder = False
  Height = 269
  HorizontalOffset = 0
  VerticalOffset = 0
  Width = 441
  PPI = 96
  object tmrCheckActivity: TTimer
    OnTimer = tmrCheckActivityTimer
    left = 104
    top = 104
  end
  object tmrProcessPackets: TTimer
    Interval = 1
    OnTimer = tmrProcessPacketsTimer
    left = 104
    top = 148
  end
end
---

 
--
Bodrov Sergey
software development, IT consulting
Phone (Belarus): +375(25)794-21-58
Skype: sergey.bodrov1


--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] DesignPPI property in TDataModule

Free Pascal - Lazarus mailing list
On 15.04.2019 14:35, Sergey Bodrov via lazarus wrote:
пн, 15 апр. 2019 г. в 14:42, Ondrej Pokorny via lazarus <[hidden email]>:

> Yes, there is TDataModule.DesignPPI that makes sure the positions
> (Left/Top properties) of the non-visual components are scaled correctly.


By the way, the default value of 96 should not be written to LFM/DFM. So
you should not get any warnings if you develop at 96 DPI / 100% scaling.

content of some Delphi .DFM after Lazarus 2.0.0 win64 release:
===
object DMBaseClient: TDMBaseClient
  OnCreate = DataModuleCreate
  OnDestroy = DataModuleDestroy
  OldCreateOrder = False
  Height = 269
  HorizontalOffset = 0
  VerticalOffset = 0
  Width = 441
  PPI = 96
  object tmrCheckActivity: TTimer
    OnTimer = tmrCheckActivityTimer
    left = 104
    top = 104
  end
  object tmrProcessPackets: TTimer
    Interval = 1
    OnTimer = tmrProcessPacketsTimer
    left = 104
    top = 148
  end
end


https://bugs.freepascal.org/view.php?id=32163

Ondrej


--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus