mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-22 16:59:11 +02:00
add define SplashDrawVersion to draw lazarus version over splash image
git-svn-id: trunk@13049 -
This commit is contained in:
parent
ab4ffc3715
commit
4bbe8f5e49
@ -17,6 +17,7 @@ object SplashForm: TSplashForm
|
|||||||
Width = 429
|
Width = 429
|
||||||
Align = alClient
|
Align = alClient
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
|
OnPaint = ImagePaint
|
||||||
Transparent = False
|
Transparent = False
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -6,5 +6,6 @@ LazarusResources.Add('TSplashForm','FORMDATA',[
|
|||||||
+#3'T'#1#8'AutoSize'#9#11'BorderStyle'#7#6'bsNone'#7'Caption'#6#7'Lazarus'#12
|
+#3'T'#1#8'AutoSize'#9#11'BorderStyle'#7#6'bsNone'#7'Caption'#6#7'Lazarus'#12
|
||||||
+'ClientHeight'#3'U'#1#11'ClientWidth'#3#173#1#9'FormStyle'#7#11'fsStayOnTop'
|
+'ClientHeight'#3'U'#1#11'ClientWidth'#3#173#1#9'FormStyle'#7#11'fsStayOnTop'
|
||||||
+#8'Position'#7#14'poScreenCenter'#0#6'TImage'#5'Image'#6'Height'#3'U'#1#5'Wi'
|
+#8'Position'#7#14'poScreenCenter'#0#6'TImage'#5'Image'#6'Height'#3'U'#1#5'Wi'
|
||||||
+'dth'#3#173#1#5'Align'#7#8'alClient'#8'AutoSize'#9#11'Transparent'#8#0#0#0
|
+'dth'#3#173#1#5'Align'#7#8'alClient'#8'AutoSize'#9#7'OnPaint'#7#10'ImagePain'
|
||||||
|
+'t'#11'Transparent'#8#0#0#0
|
||||||
]);
|
]);
|
||||||
|
@ -40,7 +40,8 @@ uses
|
|||||||
Graphics,
|
Graphics,
|
||||||
LResources,
|
LResources,
|
||||||
StdCtrls,
|
StdCtrls,
|
||||||
SysUtils;
|
SysUtils,
|
||||||
|
AboutFrm;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
@ -49,6 +50,7 @@ type
|
|||||||
TSplashForm = class(TForm)
|
TSplashForm = class(TForm)
|
||||||
Image: TImage;
|
Image: TImage;
|
||||||
procedure ApplicationOnIdle(Sender: TObject; var Done: boolean);
|
procedure ApplicationOnIdle(Sender: TObject; var Done: boolean);
|
||||||
|
procedure ImagePaint(Sender: TObject);
|
||||||
private
|
private
|
||||||
protected
|
protected
|
||||||
public
|
public
|
||||||
@ -61,6 +63,28 @@ var
|
|||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
|
{.$define SplashDrawVersion}
|
||||||
|
|
||||||
|
{$ifdef SplashDrawVersion}
|
||||||
|
const
|
||||||
|
VersionPos: TPoint = (X:407; Y:281);
|
||||||
|
VersionStyle: TTextStyle =
|
||||||
|
(
|
||||||
|
Alignment : taCenter;
|
||||||
|
Layout : tlCenter;
|
||||||
|
SingleLine : True;
|
||||||
|
Clipping : True;
|
||||||
|
ExpandTabs : False;
|
||||||
|
ShowPrefix : False;
|
||||||
|
Wordbreak : False;
|
||||||
|
Opaque : False;
|
||||||
|
SystemFont : False;
|
||||||
|
RightToLeft: False
|
||||||
|
);
|
||||||
|
VersionFontStyle: TFontStyles = [fsBold];
|
||||||
|
VersionFontColor: TColor = clBlue;
|
||||||
|
{$endif}
|
||||||
|
|
||||||
constructor TSplashForm.Create(AOwner: TComponent);
|
constructor TSplashForm.Create(AOwner: TComponent);
|
||||||
var
|
var
|
||||||
B: TBitmap;
|
B: TBitmap;
|
||||||
@ -89,6 +113,26 @@ begin
|
|||||||
Hide;
|
Hide;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TSplashForm.ImagePaint(Sender: TObject);
|
||||||
|
|
||||||
|
{$ifdef SplashDrawVersion}
|
||||||
|
var
|
||||||
|
ATextRect: TRect;
|
||||||
|
{$endif}
|
||||||
|
|
||||||
|
begin
|
||||||
|
|
||||||
|
{$ifdef SplashDrawVersion}
|
||||||
|
// GetLazarusVersionString is too long => use LazarusVersionStr
|
||||||
|
ATextRect.TopLeft := VersionPos;
|
||||||
|
ATextRect.BottomRight := Point(Image.Picture.Width, Image.Picture.Height);
|
||||||
|
Image.Canvas.Font.Style := VersionFontStyle;
|
||||||
|
Image.Canvas.Font.Color := VersionFontColor;
|
||||||
|
Image.Canvas.TextRect(ATextRect, VersionPos.X, VersionPos.Y, LazarusVersionStr, VersionStyle);
|
||||||
|
{$endif}
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
initialization
|
initialization
|
||||||
{$I splash.lrs}
|
{$I splash.lrs}
|
||||||
{$I ../images/splash_logo.lrs}
|
{$I ../images/splash_logo.lrs}
|
||||||
|
Loading…
Reference in New Issue
Block a user