Recent

Author Topic: High-DPI display and Windows  (Read 12162 times)

guest60499

  • Guest
Re: High-DPI display and Windows
« Reply #15 on: July 07, 2017, 01:59:50 am »
This problem would be solved if the LCL had a Metrics option..
It looks like Lazarus 1.8 does solve the last remaining issues by readjusting values given in pixels. Unfortunately, the blurriness that lainz mentioned can only be solved by higher resolution artwork. This is why Android icons are actually bundles of a bunch of different resolutions.

jamie

  • Hero Member
  • *****
  • Posts: 7702
Re: High-DPI display and Windows
« Reply #16 on: July 07, 2017, 02:21:52 am »
your screen is measured to match printer output originally..

 72 DPI was the original, Windows took 96 as the default but 120 DPI is
common for many..
  your Fonts are done in Points which war base from the original 72 DPI calculation.
Your screen is layed out in Dots Per inch.

 The idea is to adjust your DPI in the OS to help get your monitor to closely match the printer
scaling.

 All that code you see on the net is the results of coders fighting with the scaling problem. A lot of it is
done off screen and then simply rendered afterwards to make it perfect looking..

 If you were to optionally use metric like MM or inches in thousands , the translation of the required
pixel plots would be calculated properly for each user.
   
 Now I remember Delphi havenig a scaling property once, and that actually worked very nicely, but it
does not seem to work in Laz as well.
The only true wisdom is knowing you know nothing

ps

  • Full Member
  • ***
  • Posts: 136
    • CSS
Re: High-DPI display and Windows
« Reply #17 on: July 07, 2017, 08:22:59 am »
Any website is scaled (zoomed) properly when HighDPI is on, at least by default on Chrome.
This is true only only for Landscape monitor orientation and full width of browser window. When you change this , websites and webapps thinks that I"m on mobile (and responsive hell starts).

With latest Lazarus I have no issues with UI scalling on windows an 100% works as I expected, even multiple monitor with multiple scalling. On other side I was problems with bitmaps on High DPI on macOS. And there is no macOS 64bit COCOA for LCL so this is next problem for lazarus.
Small simple CSS/box model implementation: https://github.com/pst2d/csscontrols/tree/dev

lainz

  • Hero Member
  • *****
  • Posts: 4742
  • Web, Desktop & Android developer
    • https://lainz.github.io/
Re: High-DPI display and Windows
« Reply #18 on: July 07, 2017, 10:52:57 pm »
Any website is scaled (zoomed) properly when HighDPI is on, at least by default on Chrome.
This is true only only for Landscape monitor orientation and full width of browser window. When you change this , websites and webapps thinks that I"m on mobile (and responsive hell starts).
Well maybe only for well designed websites  :) Edit: and "normal" usage of monitors  :D
« Last Edit: July 07, 2017, 11:11:36 pm by lainz »

 

TinyPortal © 2005-2018