mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 23:39:08 +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.Control = CloseButton
|
||||||
AnchorSideBottom.Side = asrBottom
|
AnchorSideBottom.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 29
|
Height = 26
|
||||||
Top = 11
|
Top = 12
|
||||||
Width = 30
|
Width = 30
|
||||||
Anchors = [akTop, akLeft, akBottom]
|
Anchors = [akTop, akLeft, akBottom]
|
||||||
BorderSpacing.Left = 6
|
BorderSpacing.Left = 6
|
||||||
@ -252,8 +252,8 @@ object AboutForm: TAboutForm
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
object PopupMenu1: TPopupMenu
|
object PopupMenu1: TPopupMenu
|
||||||
left = 76
|
Left = 76
|
||||||
top = 278
|
Top = 278
|
||||||
object miVerToClipboard: TMenuItem
|
object miVerToClipboard: TMenuItem
|
||||||
Caption = 'Copy version information to clipboard'
|
Caption = 'Copy version information to clipboard'
|
||||||
OnClick = miVerToClipboardClick
|
OnClick = miVerToClipboardClick
|
||||||
|
@ -307,20 +307,9 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TAboutForm.LoadLogo;
|
procedure TAboutForm.LoadLogo;
|
||||||
var
|
|
||||||
pic: TPicture;
|
|
||||||
W, H: Integer;
|
|
||||||
begin
|
begin
|
||||||
pic := TPicture.Create;
|
LogoImage.Picture.LoadFromResourceName(HInstance, 'splash_logo', TPortableNetworkGraphic);
|
||||||
try
|
ScaleImg(LogoImage.Picture.Bitmap, LogoImage.Width, LogoImage.Height)
|
||||||
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;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
@ -124,18 +124,8 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TSplashForm.LoadSplash;
|
procedure TSplashForm.LoadSplash;
|
||||||
var
|
|
||||||
pic: TPicture;
|
|
||||||
begin
|
begin
|
||||||
pic := TPicture.Create;
|
Image.Picture.LoadFromResourceName(hInstance, 'splash_logo', TPortableNetworkGraphic);
|
||||||
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;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TSplashForm.Show;
|
procedure TSplashForm.Show;
|
||||||
@ -143,6 +133,7 @@ begin
|
|||||||
inherited;
|
inherited;
|
||||||
|
|
||||||
LoadSplash;
|
LoadSplash;
|
||||||
|
ScaleImg(Image.Picture.Bitmap, Width, Height);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
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