mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 06:56:10 +02:00
IDE: High-dpi logo in splash and about forms, by Roland Hahn.
git-svn-id: trunk@63774 -
This commit is contained in:
parent
8386c71041
commit
ddd10328bd
@ -243,8 +243,8 @@ object AboutForm: TAboutForm
|
||||
AnchorSideBottom.Control = CloseButton
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 29
|
||||
Top = 11
|
||||
Height = 26
|
||||
Top = 12
|
||||
Width = 30
|
||||
Anchors = [akTop, akLeft, akBottom]
|
||||
BorderSpacing.Left = 6
|
||||
@ -252,8 +252,8 @@ object AboutForm: TAboutForm
|
||||
end
|
||||
end
|
||||
object PopupMenu1: TPopupMenu
|
||||
left = 76
|
||||
top = 278
|
||||
Left = 76
|
||||
Top = 278
|
||||
object miVerToClipboard: TMenuItem
|
||||
Caption = 'Copy version information to clipboard'
|
||||
OnClick = miVerToClipboardClick
|
||||
|
@ -307,20 +307,9 @@ begin
|
||||
end;
|
||||
|
||||
procedure TAboutForm.LoadLogo;
|
||||
var
|
||||
pic: TPicture;
|
||||
W, H: Integer;
|
||||
begin
|
||||
pic := TPicture.Create;
|
||||
try
|
||||
pic.LoadFromResourceName(hInstance, 'splash_logo', TPortableNetworkGraphic);
|
||||
W := LogoImage.Width;
|
||||
H := LogoImage.Height;
|
||||
LogoImage.Picture.Bitmap.SetSize(W, H);
|
||||
AntiAliasedStretchDrawBitmap(pic.Bitmap, LogoImage.Picture.Bitmap, W, H);
|
||||
finally
|
||||
pic.Free;
|
||||
end;
|
||||
LogoImage.Picture.LoadFromResourceName(HInstance, 'splash_logo', TPortableNetworkGraphic);
|
||||
ScaleImg(LogoImage.Picture.Bitmap, LogoImage.Width, LogoImage.Height)
|
||||
end;
|
||||
|
||||
|
||||
|
@ -124,18 +124,8 @@ begin
|
||||
end;
|
||||
|
||||
procedure TSplashForm.LoadSplash;
|
||||
var
|
||||
pic: TPicture;
|
||||
begin
|
||||
pic := TPicture.Create;
|
||||
try
|
||||
pic.LoadFromResourceName(hInstance, 'splash_logo', TPortableNetworkGraphic);
|
||||
Width := round(Height * pic.Width / pic.Height);
|
||||
Image.Picture.Bitmap.SetSize(Width, Height);
|
||||
AntiAliasedStretchDrawBitmap(pic.Bitmap, Image.Picture.Bitmap, Width, Height);
|
||||
finally
|
||||
pic.Free;
|
||||
end;
|
||||
Image.Picture.LoadFromResourceName(hInstance, 'splash_logo', TPortableNetworkGraphic);
|
||||
end;
|
||||
|
||||
procedure TSplashForm.Show;
|
||||
@ -143,6 +133,7 @@ begin
|
||||
inherited;
|
||||
|
||||
LoadSplash;
|
||||
ScaleImg(Image.Picture.Bitmap, Width, Height);
|
||||
end;
|
||||
|
||||
end.
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 90 KiB After Width: | Height: | Size: 252 KiB |
Binary file not shown.
Loading…
Reference in New Issue
Block a user