IDE: High-dpi logo in splash and about forms, by Roland Hahn.

git-svn-id: trunk@63774 -
This commit is contained in:
wp 2020-08-17 21:50:59 +00:00
parent 8386c71041
commit ddd10328bd
5 changed files with 8 additions and 28 deletions

View File

@ -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

View File

@ -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;

View File

@ -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.