* * *

Author Topic: Laz 1.8 and high DPI  (Read 1075 times)

snorkel

  • Hero Member
  • *****
  • Posts: 776
Laz 1.8 and high DPI
« 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?
***Snorkel***
If I forget, I always use the latest stable 32bit version of Lazarus and FPC. At the time of this signature that is Laz 1.8 and FPC 3.0.4
OS: Windows 10 64 bit

lainz

  • Hero Member
  • *****
  • Posts: 2882
    • Home
Re: Laz 1.8 and high DPI
« Reply #1 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);

wp

  • Hero Member
  • *****
  • Posts: 5055
Re: Laz 1.8 and high DPI
« Reply #2 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)").
Lazarus trunk / fpc 3.0.4 / all 32-bit on Win-10

snorkel

  • Hero Member
  • *****
  • Posts: 776
Re: Laz 1.8 and high DPI
« Reply #3 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...
***Snorkel***
If I forget, I always use the latest stable 32bit version of Lazarus and FPC. At the time of this signature that is Laz 1.8 and FPC 3.0.4
OS: Windows 10 64 bit

snorkel

  • Hero Member
  • *****
  • Posts: 776
Re: Laz 1.8 and high DPI
« Reply #4 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.

***Snorkel***
If I forget, I always use the latest stable 32bit version of Lazarus and FPC. At the time of this signature that is Laz 1.8 and FPC 3.0.4
OS: Windows 10 64 bit

wp

  • Hero Member
  • *****
  • Posts: 5055
Re: Laz 1.8 and high DPI
« Reply #5 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
Lazarus trunk / fpc 3.0.4 / all 32-bit on Win-10

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus