Recent

Author Topic: Lazarus program is not shown how I want it to be  (Read 540 times)

Simi

  • Newbie
  • Posts: 4
Lazarus program is not shown how I want it to be
« on: December 18, 2019, 05:40:55 pm »
Hi, when i want to start my program it doesn't show the normal thing but a awfuly bugged/zoomed in version. Does anyone know how to fix it? Thanks for any help. (Can't add more pictures because the size max of 250 kb)
« Last Edit: December 18, 2019, 05:45:49 pm by Simi »

wp

  • Hero Member
  • *****
  • Posts: 7205
Re: Lazarus program is not shown how I want it to be
« Reply #1 on: December 18, 2019, 05:51:56 pm »
Looks like you played with LCL scaling, like begin a project at 96pp with LCL scaling turn on (default), move to a system with 192 pp, turn off LCL scaling, move back to 96ppi and, boom, everything is magnified by a factor 2.
« Last Edit: December 18, 2019, 11:53:25 pm by wp »
Lazarus trunk / fpc 3.0.4 / all 32-bit on Win-10

Simi

  • Newbie
  • Posts: 4
Re: Lazarus program is not shown how I want it to be
« Reply #2 on: December 18, 2019, 06:05:46 pm »
Okay, thank you very much. How exactly do i fix it now? xD

wp

  • Hero Member
  • *****
  • Posts: 7205
Re: Lazarus program is not shown how I want it to be
« Reply #3 on: December 19, 2019, 12:13:18 am »
What exactly is the status now? When you load the project on the 96ppi machine which one of the two screenshots posted do you get?

If it looks like 1.png at 96 ppi (blown up extremely) open the project on the 192ppi machine and and check "Use LCL scaling (Hi-DPI)" - this adds a line "Application.Scaled := true" to the project's lpr file, do not delete this! You will also have to increase the form's font size to have the normal size again. Then save. When you now open the project on the 92 ppi machine you should have a form like in screenshot 2.png.

If the form is like 2.png at 96 ppi then you only must check "Use LCL scaling" in the project options. When after saving and copying to the 192 ppi machine you open the project on the 192 ppi machine the form should be consistently scaled (all widths and heights should be increased by a factor 2 relative to the 96 ppi form).

Since you are on Windows you should also check "Use manifest resource (and enable themes)" in the project options (in addition to "Use LCL scaling") and set "DPI awareness" to "on".
Lazarus trunk / fpc 3.0.4 / all 32-bit on Win-10

 

TinyPortal © 2005-2018