<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-text-html" lang="x-unicode">
<div class="moz-cite-prefix">On 11.03.2017 17:58, zeljko wrote:<br>
</div>
<blockquote
cite="mid:3d256aa4-8fbe-a83b-4ac1-1713f917b583@holobit.net"
type="cite">Qt4 - MacOSX 10.8.6 32 bit (qt4 library uses carbon
for it's widgets) <br>
Qt5 - MacOSX 10.11 64 bit (qt5 library uses cocoa for it's
widgets). <br>
<br>
When Application.Scaled = False fonts of some controls are
resized to smaller fonts (DesignTimePPI on both macs says 72 ) -
so my question are here: <br>
1. is 96dpi hardcoded somewhere, so it underscales some fonts in
case when dpi is 72 - even with Application.Scaled := False. ? <br>
<br>
2. Some forms eg. About lazarus is shown too small, seem that
it's scaled to the smaller size because of dpi 72. (ide have
application.scaled := True by default), also Find Dialog is
reduced but all child controls of FindDialog haven't scaled
fonts ,so dialog isn't sized well. <br>
<br>
Note that both cases were fine before HiDPI changes, also please
keep in mind that Lazarus OSX isn't carbon or cocoa only, but
qt4 and qt5 too. <br>
<br>
On linux and windows everything works pretty nice
(Application.Scaled := true and Application.Scaled := false)
with qt4 and qt5 widgetsets.<br>
</blockquote>
<br>
The LCL expects 100% scaling at 96 PPI. This is hard-coded now.<br>
<br>
We have 2 possible solutions:<br>
<br>
A.) Force Qt4 and Qt5 on Mac OSX to return 96 PPI instead of 72
PPI (the same to what I changed Carbon and Cocoa in <a
class="moz-txt-link-freetext"
href="http://mantis.freepascal.org/view.php?id=31037">http://mantis.freepascal.org/view.php?id=31037</a>
).<br>
<br>
B.) Make the 100% scaling value OS-dependent. On Windows and Linux
it would be 96 PPI and on Mac OSX 72 PPI. (This is what I
suggested in the first email of the "Mac users: High-DPI" thread):<br>
<br>
<i>[...] 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. </i><i><br>
</i><i>On Windows: DesignTimePPI=96 ->
DesignTimeScaleFactor=100 <- On Mac: DesignTimePPI=72. The
same goes for PixelsPerInch/ScaleFactor. </i><i><br>
</i><br>
(A) is easier to implement so maybe we could test it first.
Zeljko, could you please try with the attached patch (I am not
sure about the DARWIN define - maybe you need another one for
MacOSX).<br>
<br>
Ondrej</div>
</body>
</html>