Re: [Lazarus] Mac Hi-DPI 2
On 11.03.2017 23:37, Ondrej Pokorny via Lazarus wrote: We have 2 possible solutions: The solition 3) don't scale the app down, from 96 LCL to 72, to any lower value than 96. -- Regards, Alexey -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Mac Hi-DPI 2
On 03/10/2017 12:54 PM, Ondrej Pokorny via Lazarus wrote: To me it looks like Carbon applications are scaled automatically by the OS. Something similar to what also Windows uses if you switch High-DPI awarness off. That means the regardless of your screen (retina, non-retina) the DPI is always 96. So there shouldn't be any LCL-scaling involved. hm...just tested Qt4 and Qt5 on MacOSX. Qt4 - MacOSX 10.8.6 32 bit (qt4 library uses carbon for it's widgets) Qt5 - MacOSX 10.11 64 bit (qt5 library uses cocoa for it's widgets). When Application.Scaled = False fonts of some controls are resized to smaller fonts (DesignTimePPI on both macs says 72 ) - so my question are here: 1. is 96dpi hardcoded somewhere, so it underscales some fonts in case when dpi is 72 - even with Application.Scaled := False. ? 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. 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. On linux and windows everything works pretty nice (Application.Scaled := true and Application.Scaled := false) with qt4 and qt5 widgetsets. My app is designed on linux (96 dpi) and then just rebuilded on mac (if that matters), also Mac 10.8.6 is iMac with resolution 1440x900 72dpi, Mac 10.11 have resolution 1920x1200 72dpi (this one is running inside vmware). Any hints ? zeljko -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Mac Hi-DPI 2
On 10.03.2017 6:38, Alexey via Lazarus wrote: seems I cannot see how scaling works on Mac. Reason: MacOS don't scale coords of controls, and don't have event "scale changed". It scales using Retina thing when i call video mode "nnn x nnn hi-dpi". It means: only DPI changes, coords dont change (controls must draw in high dpi, but on same x,y-x2,y2) To me it looks like Carbon applications are scaled automatically by the OS. Something similar to what also Windows uses if you switch High-DPI awarness off. That means the regardless of your screen (retina, non-retina) the DPI is always 96. So there shouldn't be any LCL-scaling involved. It's only what I see from the pictures and the code, I cannot test it myself because I don't have a retina screen to check. Ondrej -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Mac Hi-DPI 2
>To me it looks like Carbon applications are scaled automatically by the OS. Something similar to what also Windows yes, it is what I see too. Scaled automatically by OS >That means the regardless of your screen (retina, non-retina) the DPI is always 96. So there shouldn't be any LCL-scaling involved. yes. right. But i tested only 10.8, and not sure about new OSes, 10.11, 10.12... -- Regards, Alexey -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Mac Hi-DPI 2
This picture is OS opts: here you see, max NNxNN dont change, but only hi-dpi "added to video mode". Alex -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus