Lazarus

Programming => LCL => Topic started by: snorkel on January 26, 2018, 07:50:08 pm

Title: Laz 1.8 and high DPI
Post by: snorkel on January 26, 2018, 07:50:08 pm
Hi,
I updated to 1.8 a couple of weeks ago and one of my projects is scaling automatically on my high DPI monitor( I think I have it at 125%)  when I run it the logon form is bigger etc and it looks great, the other project however does not scale at all and they both have it enabled in the project options.  I can't find any difference in the IDE settings between the two.

Anyone have any ideas on why the one project looks fine on the high DPI monitor and the other not?
Title: Re: Laz 1.8 and high DPI
Post by: lainz on January 26, 2018, 07:57:28 pm
Each form has an Scaled property that should be enabled.

Some things you create by code should be scaled manually. Like SomeWidth := ScaleX(1234,96), SomeHeight := ScaleY(1234,96);
Title: Re: Laz 1.8 and high DPI
Post by: wp on January 26, 2018, 07:59:43 pm
Laz 1.8 comes with a tiny checkbox "Use LCL scaling" in the project options. This must be on for scaling to become active ("master switch"). And the combobox "DPI awareness" must be set to "on (true)" (or any other value except for "off (false)").
Title: Re: Laz 1.8 and high DPI
Post by: snorkel on January 26, 2018, 08:10:02 pm
In the project that scales it does not have The Use LCL Scaling check box set, but it does have the DPI awareness set to on(true)

Both projects where simply recompiled with 1.8 and I did not mess with any of the DPI settings at all, one works and one does not.

The scaled property is set as well on all forms in both projects...
Title: Re: Laz 1.8 and high DPI
Post by: snorkel on January 26, 2018, 08:37:28 pm
ok, found the deal with the one that looked ok on the high dpi monitor....it was compiled with 1.6.x, when I rebuilt it instead of just compiling it now looks bad on the high DPI as well.
So I don't know whats going on.

Title: Re: Laz 1.8 and high DPI
Post by: wp on January 26, 2018, 10:21:14 pm
So, you are saying that the projects do not scale properly even if all settings for scaling are turned on ("LCLScaling" and "DPI awareness" on - both in project options, and Form.Scaled = true for each form)? Strange...

No idea if this means anything, but are you sure that the exe file is not set to any compatiblity mode? Right-click on exe in Windows Explorer > Properties > Sheet compatibility: The checkbox "compatibility mode" should be off
TinyPortal © 2005-2018