mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-13 04:29:11 +02:00
AboutBox/Splashscreen: Fix blurring on Mac Retina displays. Patch by @Slidescape, issue #41205,
(cherry picked from commit 0b7d81bd37
)
This commit is contained in:
parent
2fee3db2b4
commit
300b16b917
@ -10,13 +10,13 @@ object AboutForm: TAboutForm
|
|||||||
ClientWidth = 470
|
ClientWidth = 470
|
||||||
Constraints.MinHeight = 390
|
Constraints.MinHeight = 390
|
||||||
Constraints.MinWidth = 470
|
Constraints.MinWidth = 470
|
||||||
OnClose = FormClose
|
|
||||||
OnCreate = AboutFormCreate
|
|
||||||
OnShow = FormShow
|
|
||||||
PopupMenu = PopupMenu1
|
PopupMenu = PopupMenu1
|
||||||
Position = poScreenCenter
|
Position = poScreenCenter
|
||||||
ShowHint = True
|
ShowHint = True
|
||||||
LCLVersion = '2.1.0.0'
|
LCLVersion = '4.99.0.0'
|
||||||
|
OnClose = FormClose
|
||||||
|
OnCreate = AboutFormCreate
|
||||||
|
OnShow = FormShow
|
||||||
object Notebook: TPageControl
|
object Notebook: TPageControl
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 340
|
Height = 340
|
||||||
|
@ -274,9 +274,15 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TAboutForm.LoadLogo;
|
procedure TAboutForm.LoadLogo;
|
||||||
|
var
|
||||||
|
W, H: Integer;
|
||||||
|
ScaleFactor: Double;
|
||||||
begin
|
begin
|
||||||
LogoImage.Picture.LoadFromResourceName(HInstance, 'splash_logo', TPortableNetworkGraphic);
|
LogoImage.Picture.LoadFromResourceName(HInstance, 'splash_logo', TPortableNetworkGraphic);
|
||||||
ScaleImg(LogoImage.Picture.Bitmap, LogoImage.Width, LogoImage.Height)
|
ScaleFactor := GetCanvasScaleFactor; // Usually 1.0, but on macOS = 2.0
|
||||||
|
W := round(LogoImage.Width * ScaleFactor);
|
||||||
|
H := round(LogoImage.Height * ScaleFactor);
|
||||||
|
ScaleImg(LogoImage.Picture.Bitmap, W, H);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user