[Lazarus] Mac users: High-DPI
Ondrej Pokorny
lazarus at kluug.net
Thu Mar 9 14:01:39 CET 2017
Hello,
there is an open issue in Mantis:
http://mantis.freepascal.org/view.php?id=31037
Mac OSX widgetsets (Carbon, Cocoa) used 72 DPI as default. This brought
problems with the new LCL-scaling that depends on default 96 DPI.
Therefore I decided to change the default DPI on these widgetsets to 96.
This unfortunately made the fonts bigger.
The only solution I can think of is to create a relative DPI scaling to
the default widgetset value - every DPI/PPI value will be compared to
the WS DefaultPPI. So instead of DPI/PPI we'll have "ScaleFactor". E.g.
it means that the property DesignTimePPI will be deleted and changed to
DesignTimeScaleFactor. Also PixelsPerInch will have the ScaleFactor
equivalent (I'll keep PixelsPerInch). Probably more changes will be needed.
On Windows: DesignTimePPI=96 -> DesignTimeScaleFactor=100 <- On Mac:
DesignTimePPI=72. The same goes for PixelsPerInch/ScaleFactor.
---
Or do you have another idea how to make it work? Is it possible to
change the DPI settings to 96 without font scaling problem (so that
ScaleFactor is not needed)? Does anybody of you run a Mac? It looks that
the count of Mac users running Lazarus trunk is very limited - we
usually get feedback from them when a stable version is released :(
Testing on Mac is very hard for me because I don't have one. I have only
a VM which is a pain to use.
Ondrej
More information about the Lazarus
mailing list