mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-05 13:18:08 +02:00
AboutBox/SplashScreen: Fix blurring on mac Retina displays, part 2. issue #41205
This commit is contained in:
parent
7cfcb81528
commit
4f007f3d82
@ -40,6 +40,8 @@ object AboutForm: TAboutForm
|
|||||||
Height = 300
|
Height = 300
|
||||||
Top = 6
|
Top = 6
|
||||||
Width = 450
|
Width = 450
|
||||||
|
Proportional = True
|
||||||
|
Stretch = True
|
||||||
end
|
end
|
||||||
object VersionLabel: TLabel
|
object VersionLabel: TLabel
|
||||||
AnchorSideLeft.Control = LogoImage
|
AnchorSideLeft.Control = LogoImage
|
||||||
|
@ -9,7 +9,7 @@ object SplashForm: TSplashForm
|
|||||||
ClientWidth = 450
|
ClientWidth = 450
|
||||||
FormStyle = fsSplash
|
FormStyle = fsSplash
|
||||||
Position = poScreenCenter
|
Position = poScreenCenter
|
||||||
LCLVersion = '2.1.0.0'
|
LCLVersion = '4.99.0.0'
|
||||||
object Image: TImage
|
object Image: TImage
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 300
|
Height = 300
|
||||||
|
@ -135,11 +135,17 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TSplashForm.DoFirstShow;
|
procedure TSplashForm.DoFirstShow;
|
||||||
|
var
|
||||||
|
W, H: Integer;
|
||||||
|
ScaleFactor: Double;
|
||||||
begin
|
begin
|
||||||
inherited DoFirstShow;
|
inherited DoFirstShow;
|
||||||
|
|
||||||
LoadSplash;
|
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;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
Loading…
Reference in New Issue
Block a user