Hans♫ 75 Posted December 12, 2018 I use ScreenService.GetScreenScale to get the Screen scaling. It was partly broken in 10.2.3, but in 10.3 it seems to be completely broken. In 10.3: No matter what scaling is set in Windows: 150%, 175% or 200%, the return value of ScreenService.GetScreenScale is 1.0. In 10.2.3 it did return the value 1.5 with 150% scaling, but with 175% and 200% scaling it also returned 1.5 I post it here before I post it as a bug in QP, in case I missed something...? This is the function where I use it (and yes it does actually call GetScreenScale): function tScreenScale.GetScreenScale: Single; var ScreenService: IFMXScreenService; begin Result := 1; if TPlatformServices.Current.SupportsPlatformService (IFMXScreenService, IInterface(ScreenService)) then Result := ScreenService.GetScreenScale; end; Share this post Link to post
Der schöne Günther 316 Posted December 12, 2018 This is just an idea, maybe it matters whether the executable is being debugged, started from IDE or started from explorer? Maybe it inherits some settings from its parent process (the IDE). Share this post Link to post
Hans♫ 75 Posted December 12, 2018 It is the same when running outside the IDE. Share this post Link to post
Kryvich 165 Posted December 12, 2018 I've checked this function in 10.2.3 and 10.3, and it works identically in both cases. When I set a text size = 125%, the app shows 1.25. Windows 7 64 bit. Demo app is attached. TestGetScreenScale.zip Share this post Link to post
Hans♫ 75 Posted December 12, 2018 Thanks for the demo app. Compiled with 10.3 it gave the same result as previously - until I logged out of Windows and in again, then it worked. Apparently in Windows 10 GetScreenScale returns only the value present at login time, that's why my first experiments did not work. Later I turned on the "Fix blurred apps" setting in Windows 10 and then it returns the correct value immediately even without logging in again. That's great, so Rio 10.3 works! However, when compiled with 10.2.3 it now always returns 1.0, even if I reboot after having changed the scaling in Windows. I am going to figure out why that happens... Share this post Link to post