Recent

Author Topic: forms in design mode and same form in application have diffrent sizes  (Read 864 times)

syalyshev

  • New Member
  • *
  • Posts: 29
the form in design mode and the same form in application have diffrent sizes. Why?
I designed the application using Lazarus 1.1. When tried to slightly modify the application using lazarus >2 I have found that the form after compilatiion and being run haz diffrent sizes increased ~30% with fonts having increased size too.
What could be wrong?
« Last Edit: December 18, 2023, 10:26:30 am by syalyshev »

ginoo

  • Full Member
  • ***
  • Posts: 111
Re: forms in design mode and same form in application have diffrent sizes
« Reply #1 on: December 18, 2023, 10:53:46 am »
it seems to me that in the old versions of lazarus there was no dpi, lcl scaling

paweld

  • Hero Member
  • *****
  • Posts: 1357
Re: forms in design mode and same form in application have diffrent sizes
« Reply #2 on: December 18, 2023, 11:04:15 am »
Check the DesignTimePPi property. Its value at DPI 100% should be 96. If it is different then set it according to the DPI values on the computer where you are designing the form, i.e. 144 for DPI 150%, 192 for DPI 200%, etc.
Lazarus has only had HighDPI support since version 1.8, so a form designed in version 1.1 may behave like this.
Best regards / Pozdrawiam
paweld

Thaddy

  • Hero Member
  • *****
  • Posts: 16808
  • Ceterum censeo Trump esse delendam
Re: forms in design mode and same form in application have diffrent sizes
« Reply #3 on: December 18, 2023, 11:36:07 am »
If the Tform.scaled property is set to true that will likely fix most of your issues as long the application uses the same font and not an automatically provided default OS font.
« Last Edit: December 18, 2023, 11:39:51 am by Thaddy »
Changing servers. thaddy.com may be temporary unreachable but restored when the domain name transfer is done.

 

TinyPortal © 2005-2018