IDE: about dlg: added new logo, add new page for the fans to explore the logo, changed date to an international format, copying the version on destroy idea from Graeme

git-svn-id: trunk@13220 -
This commit is contained in:
mattias 2007-12-08 13:29:32 +00:00
parent c6316907b3
commit c3df5e3632
3 changed files with 110 additions and 79 deletions

View File

@ -5,7 +5,7 @@ object AboutForm: TAboutForm
Width = 608 Width = 608
HorzScrollBar.Page = 607 HorzScrollBar.Page = 607
VertScrollBar.Page = 269 VertScrollBar.Page = 269
ActiveControl = AboutMemo ActiveControl = Notebook1
Caption = 'About Lazarus' Caption = 'About Lazarus'
ClientHeight = 270 ClientHeight = 270
ClientWidth = 608 ClientWidth = 608
@ -13,47 +13,58 @@ object AboutForm: TAboutForm
Position = poScreenCenter Position = poScreenCenter
object VersionLabel: TLabel object VersionLabel: TLabel
Left = 14 Left = 14
Height = 14 Height = 20
Top = 6 Top = 6
Width = 51 Width = 67
Alignment = taCenter Alignment = taCenter
Caption = 'Version #:' Caption = 'Version #:'
Color = clNone
ParentColor = False ParentColor = False
end end
object BuildDateLabel: TLabel object BuildDateLabel: TLabel
Left = 14 Left = 14
Height = 14 Height = 20
Top = 23 Top = 23
Width = 28 Width = 36
Alignment = taCenter Alignment = taCenter
Caption = 'Date:' Caption = 'Date:'
Color = clNone
ParentColor = False ParentColor = False
end end
object RevisionLabel: TLabel object RevisionLabel: TLabel
Left = 14 Left = 14
Height = 14 Height = 20
Top = 40 Top = 40
Width = 66 Width = 86
Caption = 'RevisionLabel' Caption = 'RevisionLabel'
Color = clNone
ParentColor = False ParentColor = False
end end
object PlatformLabel: TLabel object PlatformLabel: TLabel
Left = 14 Left = 14
Height = 14 Height = 20
Top = 61 Top = 61
Width = 66 Width = 89
Caption = 'PlatformLabel' Caption = 'PlatformLabel'
Color = clNone
ParentColor = False ParentColor = False
end end
object Image1: TImage
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = PlatformLabel
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Notebook1
Left = 6
Height = 113
Top = 87
Width = 203
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Around = 6
Center = True
Proportional = True
Transparent = False
end
object CloseButton: TBitBtn object CloseButton: TBitBtn
Left = 70 Left = 70
Height = 36 Height = 36
Top = 225 Top = 225
Width = 81 Width = 74
AutoSize = True AutoSize = True
Cancel = True Cancel = True
Caption = 'Close' Caption = 'Close'
@ -93,14 +104,15 @@ object AboutForm: TAboutForm
Top = 6 Top = 6
Width = 389 Width = 389
Anchors = [akTop, akLeft, akRight, akBottom] Anchors = [akTop, akLeft, akRight, akBottom]
PageIndex = 0 PageIndex = 3
TabOrder = 0
object AboutPage: TPage object AboutPage: TPage
Caption = 'About' Caption = 'About'
ClientWidth = 381 ClientWidth = 385
ClientHeight = 235 ClientHeight = 230
object AboutMemo: TMemo object AboutMemo: TMemo
Height = 235 Height = 230
Width = 381 Width = 385
Align = alClient Align = alClient
ReadOnly = True ReadOnly = True
ScrollBars = ssAutoBoth ScrollBars = ssAutoBoth
@ -109,10 +121,10 @@ object AboutForm: TAboutForm
end end
object ContributorsPage: TPage object ContributorsPage: TPage
Caption = 'Contributors' Caption = 'Contributors'
ClientWidth = 381 ClientWidth = 385
ClientHeight = 235 ClientHeight = 230
object ContributorsMemo: TMemo object ContributorsMemo: TMemo
Height = 231 Height = 230
Width = 385 Width = 385
Align = alClient Align = alClient
ReadOnly = True ReadOnly = True
@ -122,16 +134,27 @@ object AboutForm: TAboutForm
end end
object AcknowledgementsPage: TPage object AcknowledgementsPage: TPage
Caption = 'Acknowledgements' Caption = 'Acknowledgements'
ClientWidth = 381 ClientWidth = 385
ClientHeight = 235 ClientHeight = 230
object AcknowledgementsMemo: TMemo object AcknowledgementsMemo: TMemo
Height = 235 Height = 230
Width = 381 Width = 385
Align = alClient Align = alClient
ReadOnly = True ReadOnly = True
ScrollBars = ssAutoBoth ScrollBars = ssAutoBoth
TabOrder = 0 TabOrder = 0
end end
end end
object LogoPage: TPage
Caption = 'LogoPage'
ClientWidth = 385
ClientHeight = 230
object LogoImage: TImage
Height = 230
Width = 385
Align = alClient
Transparent = False
end
end
end end
end end

View File

@ -1,43 +1,52 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TAboutForm','FORMDATA',[ LazarusResources.Add('TAboutForm','FORMDATA',[
'TPF0'#10'TAboutForm'#9'AboutForm'#4'Left'#3'_'#1#6'Height'#3#14#1#3'Top'#3 'TPF0'#10'TAboutForm'#9'AboutForm'#4'Left'#3'_'#1#6'Height'#3#14#1#3'Top'#3
+#133#1#5'Width'#3'`'#2#18'HorzScrollBar.Page'#3'_'#2#18'VertScrollBar.Page'#3 +#133#1#5'Width'#3'`'#2#18'HorzScrollBar.Page'#3'_'#2#18'VertScrollBar.Page'#3
+#13#1#13'ActiveControl'#7#9'AboutMemo'#7'Caption'#6#13'About Lazarus'#12'Cli' +#13#1#13'ActiveControl'#7#9'Notebook1'#7'Caption'#6#13'About Lazarus'#12'Cli'
+'entHeight'#3#14#1#11'ClientWidth'#3'`'#2#8'OnCreate'#7#15'AboutFormCreate'#8 +'entHeight'#3#14#1#11'ClientWidth'#3'`'#2#8'OnCreate'#7#15'AboutFormCreate'#8
+'Position'#7#14'poScreenCenter'#0#6'TLabel'#12'VersionLabel'#4'Left'#2#14#6 +'Position'#7#14'poScreenCenter'#0#6'TLabel'#12'VersionLabel'#4'Left'#2#14#6
+'Height'#2#14#3'Top'#2#6#5'Width'#2'3'#9'Alignment'#7#8'taCenter'#7'Caption' +'Height'#2#20#3'Top'#2#6#5'Width'#2'C'#9'Alignment'#7#8'taCenter'#7'Caption'
+#6#10'Version #:'#5'Color'#7#6'clNone'#11'ParentColor'#8#0#0#6'TLabel'#14'Bu' +#6#10'Version #:'#11'ParentColor'#8#0#0#6'TLabel'#14'BuildDateLabel'#4'Left'
+'ildDateLabel'#4'Left'#2#14#6'Height'#2#14#3'Top'#2#23#5'Width'#2#28#9'Align' +#2#14#6'Height'#2#20#3'Top'#2#23#5'Width'#2'$'#9'Alignment'#7#8'taCenter'#7
+'ment'#7#8'taCenter'#7'Caption'#6#5'Date:'#5'Color'#7#6'clNone'#11'ParentCol' +'Caption'#6#5'Date:'#11'ParentColor'#8#0#0#6'TLabel'#13'RevisionLabel'#4'Lef'
+'or'#8#0#0#6'TLabel'#13'RevisionLabel'#4'Left'#2#14#6'Height'#2#14#3'Top'#2 +'t'#2#14#6'Height'#2#20#3'Top'#2'('#5'Width'#2'V'#7'Caption'#6#13'RevisionLa'
+'('#5'Width'#2'B'#7'Caption'#6#13'RevisionLabel'#5'Color'#7#6'clNone'#11'Par' +'bel'#11'ParentColor'#8#0#0#6'TLabel'#13'PlatformLabel'#4'Left'#2#14#6'Heigh'
+'entColor'#8#0#0#6'TLabel'#13'PlatformLabel'#4'Left'#2#14#6'Height'#2#14#3'T' +'t'#2#20#3'Top'#2'='#5'Width'#2'Y'#7'Caption'#6#13'PlatformLabel'#11'ParentC'
+'op'#2'='#5'Width'#2'B'#7'Caption'#6#13'PlatformLabel'#5'Color'#7#6'clNone' +'olor'#8#0#0#6'TImage'#6'Image1'#22'AnchorSideLeft.Control'#7#5'Owner'#21'An'
+#11'ParentColor'#8#0#0#7'TBitBtn'#11'CloseButton'#4'Left'#2'F'#6'Height'#2'$' +'chorSideTop.Control'#7#13'PlatformLabel'#18'AnchorSideTop.Side'#7#9'asrBott'
+#3'Top'#3#225#0#5'Width'#2'Q'#8'AutoSize'#9#6'Cancel'#9#7'Caption'#6#5'Close' +'om'#23'AnchorSideRight.Control'#7#9'Notebook1'#4'Left'#2#6#6'Height'#2'q'#3
+#10'Glyph.Data'#10#251#2#0#0#247#2#0#0'/* XPM */'#10'static char * botaoFech' +'Top'#2'W'#5'Width'#3#203#0#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#20
+'ar_xpm[] = {'#10'"24 24 2 1",'#10'" '#9'c None",'#10'".'#9'c #000000",'#10 +'BorderSpacing.Around'#2#6#6'Center'#9#12'Proportional'#9#11'Transparent'#8#0
+'" ",'#10'" ",'#10'" ' +#0#7'TBitBtn'#11'CloseButton'#4'Left'#2'F'#6'Height'#2'$'#3'Top'#3#225#0#5'W'
+' ",'#10'" ",'#10'" ' +'idth'#2'J'#8'AutoSize'#9#6'Cancel'#9#7'Caption'#6#5'Close'#10'Glyph.Data'#10
+' ",'#10'" ",'#10'" . . ",'#10'"' +#251#2#0#0#247#2#0#0'/* XPM */'#10'static char * botaoFechar_xpm[] = {'#10'"'
+' . ... ",'#10'" .. .... ",'#10'" ..' +'24 24 2 1",'#10'" '#9'c None",'#10'".'#9'c #000000",'#10'" '
+' ... ",'#10'" ..... ",'#10'" ... ' +' ",'#10'" ",'#10'" ",'
+' ",'#10'" ..... ",'#10'" ....... ",'#10'" ' +#10'" ",'#10'" ",'#10'" '
+' ... .... ",'#10'" ... .... ",'#10'" ... ' +' ",'#10'" . . ",'#10'" . ... '
+' .. ",'#10'" ",'#10'" ' +' ",'#10'" .. .... ",'#10'" .. ... ",'#10
+' ",'#10'" ",'#10'" ",'#10'" ' +'" ..... ",'#10'" ... ",'#10'" .'
+' ",'#10'" ",'#10'" ' +'.... ",'#10'" ....... ",'#10'" ... .... '
+' "};'#10#11'ModalResult'#2#1#9'NumGlyphs'#2#0#8'TabOrder'#2#1#0#0 +' ",'#10'" ... .... ",'#10'" ... .. ",'#10'"'
+#9'TNotebook'#9'Notebook1'#4'Left'#3#215#0#6'Height'#3#5#1#3'Top'#2#6#5'Widt' +' ",'#10'" ",'#10'" '
+'h'#3#133#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#9'Page' +' ",'#10'" ",'#10'" '
+'Index'#2#0#0#5'TPage'#9'AboutPage'#7'Caption'#6#5'About'#11'ClientWidth'#3 +' ",'#10'" ",'#10'" "};'#10#11
+'}'#1#12'ClientHeight'#3#235#0#0#5'TMemo'#9'AboutMemo'#6'Height'#3#235#0#5'W' +'ModalResult'#2#1#9'NumGlyphs'#2#0#8'TabOrder'#2#1#0#0#9'TNotebook'#9'Notebo'
+'idth'#3'}'#1#5'Align'#7#8'alClient'#8'ReadOnly'#9#10'ScrollBars'#7#10'ssAut' +'ok1'#4'Left'#3#215#0#6'Height'#3#5#1#3'Top'#2#6#5'Width'#3#133#1#7'Anchors'
+'oBoth'#8'TabOrder'#2#0#0#0#0#5'TPage'#16'ContributorsPage'#7'Caption'#6#12 +#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#9'PageIndex'#2#3#8'TabOrder'
+'Contributors'#11'ClientWidth'#3'}'#1#12'ClientHeight'#3#235#0#0#5'TMemo'#16 +#2#0#0#5'TPage'#9'AboutPage'#7'Caption'#6#5'About'#11'ClientWidth'#3#129#1#12
+'ContributorsMemo'#6'Height'#3#231#0#5'Width'#3#129#1#5'Align'#7#8'alClient' +'ClientHeight'#3#230#0#0#5'TMemo'#9'AboutMemo'#6'Height'#3#230#0#5'Width'#3
+#8'ReadOnly'#9#10'ScrollBars'#7#10'ssAutoBoth'#8'TabOrder'#2#0#0#0#0#5'TPage' +#129#1#5'Align'#7#8'alClient'#8'ReadOnly'#9#10'ScrollBars'#7#10'ssAutoBoth'#8
+#20'AcknowledgementsPage'#7'Caption'#6#16'Acknowledgements'#11'ClientWidth'#3 +'TabOrder'#2#0#0#0#0#5'TPage'#16'ContributorsPage'#7'Caption'#6#12'Contribut'
+'}'#1#12'ClientHeight'#3#235#0#0#5'TMemo'#20'AcknowledgementsMemo'#6'Height' +'ors'#11'ClientWidth'#3#129#1#12'ClientHeight'#3#230#0#0#5'TMemo'#16'Contrib'
+#3#235#0#5'Width'#3'}'#1#5'Align'#7#8'alClient'#8'ReadOnly'#9#10'ScrollBars' +'utorsMemo'#6'Height'#3#230#0#5'Width'#3#129#1#5'Align'#7#8'alClient'#8'Read'
+#7#10'ssAutoBoth'#8'TabOrder'#2#0#0#0#0#0#0 +'Only'#9#10'ScrollBars'#7#10'ssAutoBoth'#8'TabOrder'#2#0#0#0#0#5'TPage'#20'A'
+'cknowledgementsPage'#7'Caption'#6#16'Acknowledgements'#11'ClientWidth'#3#129
+#1#12'ClientHeight'#3#230#0#0#5'TMemo'#20'AcknowledgementsMemo'#6'Height'#3
+#230#0#5'Width'#3#129#1#5'Align'#7#8'alClient'#8'ReadOnly'#9#10'ScrollBars'#7
+#10'ssAutoBoth'#8'TabOrder'#2#0#0#0#0#5'TPage'#8'LogoPage'#7'Caption'#6#8'Lo'
+'goPage'#11'ClientWidth'#3#129#1#12'ClientHeight'#3#230#0#0#6'TImage'#9'Logo'
+'Image'#6'Height'#3#230#0#5'Width'#3#129#1#5'Align'#7#8'alClient'#11'Transpa'
+'rent'#8#0#0#0#0#0
]); ]);

View File

@ -27,7 +27,7 @@ interface
uses uses
Classes, SysUtils, FPCAdds, Forms, Controls, Graphics, Dialogs, LResources, Classes, SysUtils, FPCAdds, Forms, Controls, Graphics, Dialogs, LResources,
StdCtrls, Buttons, LazConf, LazarusIDEStrConsts, ExtCtrls, EnvironmentOpts, StdCtrls, Buttons, LazConf, LazarusIDEStrConsts, ExtCtrls, EnvironmentOpts,
FileUtil; Clipbrd, FileUtil;
type type
@ -37,6 +37,9 @@ type
CloseButton: TBitBtn; CloseButton: TBitBtn;
BuildDateLabel: TLABEL; BuildDateLabel: TLABEL;
AboutMemo: TMEMO; AboutMemo: TMEMO;
Image1: TImage;
LogoImage: TImage;
LogoPage: TPage;
PlatformLabel: TLabel; PlatformLabel: TLabel;
VersionLabel: TLABEL; VersionLabel: TLABEL;
ContributorsMemo:TMemo; ContributorsMemo:TMemo;
@ -48,11 +51,9 @@ type
AcknowledgementsPage:TPage; AcknowledgementsPage:TPage;
procedure AboutFormCreate(Sender:TObject); procedure AboutFormCreate(Sender:TObject);
private private
FPixmap : TPixmap;
procedure LoadContributors; procedure LoadContributors;
procedure LoadAcknowledgements; procedure LoadAcknowledgements;
public public
procedure Paint; override;
constructor Create(TheOwner: TComponent); override; constructor Create(TheOwner: TComponent); override;
destructor Destroy; override; destructor Destroy; override;
end; end;
@ -93,8 +94,9 @@ end;
destructor TAboutForm.Destroy; destructor TAboutForm.Destroy;
begin begin
FPixmap.Free; // easter egg: copy the version to clipboard
FPixmap:=nil; Clipboard.AsText := LazarusVersionStr + ' r' + LazarusRevisionStr
+ ' ' + PlatformLabel.Caption;
inherited Destroy; inherited Destroy;
end; end;
@ -119,12 +121,17 @@ const
Date := EncodeDate(StrToWord(Copy(BuildDate,1,SlashPos1-1)), Date := EncodeDate(StrToWord(Copy(BuildDate,1,SlashPos1-1)),
StrToWord(Copy(BuildDate,SlashPos1+1,SlashPos2-SlashPos1-1)), StrToWord(Copy(BuildDate,SlashPos1+1,SlashPos2-SlashPos1-1)),
StrToWord(Copy(BuildDate,SlashPos2+1,Length(BuildDate)-SlashPos2))); StrToWord(Copy(BuildDate,SlashPos2+1,Length(BuildDate)-SlashPos2)));
Result := DateTimeToStr(Date); Result := FormatDateTime('yyyy-mm-dd', Date);
end; end;
var
FBitmap: TBitmap;
begin begin
FPixmap := TPixmap.Create; Notebook1.PageIndex:=0;
FPixmap.LoadFromLazarusResource('lazarus_about_logo'); FBitmap := LoadBitmapFromLazarusResource('splash_logo');
Image1.Picture.Graphic:=FBitmap;
LogoImage.Picture.Graphic:=FBitmap;
FBitmap.Free;
Caption:=lisAboutLazarus; Caption:=lisAboutLazarus;
VersionLabel.Caption := lisVersion+' #: '+ GetLazarusVersionString; VersionLabel.Caption := lisVersion+' #: '+ GetLazarusVersionString;
RevisionLabel.Caption := lisSVNRevision+LazarusRevisionStr; RevisionLabel.Caption := lisSVNRevision+LazarusRevisionStr;
@ -175,14 +182,6 @@ begin
AcknowledgementsMemo.Text:=lisAboutNoContributors; AcknowledgementsMemo.Text:=lisAboutNoContributors;
end; end;
procedure TAboutForm.Paint;
begin
inherited Paint;
if FPixmap <> nil then
Canvas.Draw(12, PlatformLabel.Top + PlatformLabel.Height + 6,
FPixmap);
end;
initialization initialization
{$I aboutfrm.lrs} {$I aboutfrm.lrs}
{$I lazarus_about_logo.lrs} {$I lazarus_about_logo.lrs}