From 4f007f3d82d0ccdb478731a2e85c72657ef8db74 Mon Sep 17 00:00:00 2001 From: wp_xyz Date: Wed, 6 Nov 2024 15:36:33 +0100 Subject: [PATCH] AboutBox/SplashScreen: Fix blurring on mac Retina displays, part 2. issue #41205 --- ide/aboutfrm.lfm | 2 ++ ide/splash.lfm | 2 +- ide/splash.pp | 8 +++++++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ide/aboutfrm.lfm b/ide/aboutfrm.lfm index 43939c44f2..5bf823dcb7 100644 --- a/ide/aboutfrm.lfm +++ b/ide/aboutfrm.lfm @@ -40,6 +40,8 @@ object AboutForm: TAboutForm Height = 300 Top = 6 Width = 450 + Proportional = True + Stretch = True end object VersionLabel: TLabel AnchorSideLeft.Control = LogoImage diff --git a/ide/splash.lfm b/ide/splash.lfm index 013b954bf3..676b2e3ff1 100644 --- a/ide/splash.lfm +++ b/ide/splash.lfm @@ -9,7 +9,7 @@ object SplashForm: TSplashForm ClientWidth = 450 FormStyle = fsSplash Position = poScreenCenter - LCLVersion = '2.1.0.0' + LCLVersion = '4.99.0.0' object Image: TImage Left = 0 Height = 300 diff --git a/ide/splash.pp b/ide/splash.pp index 0ba201db2c..965b63c043 100644 --- a/ide/splash.pp +++ b/ide/splash.pp @@ -135,11 +135,17 @@ begin end; procedure TSplashForm.DoFirstShow; +var + W, H: Integer; + ScaleFactor: Double; begin inherited DoFirstShow; LoadSplash; - ScaleImg(Image.Picture.Bitmap, Width, Height); + ScaleFactor := GetCanvasScaleFactor; // Usually 1.0, but on macOS = 2.0 + W := round(Image.Width * ScaleFactor); + H := round(Image.Height * ScaleFactor); + ScaleImg(Image.Picture.Bitmap, W, H); end; end.