forked from doublecmd/doublecmd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fAbout.pas
221 lines (192 loc) · 7.38 KB
/
fAbout.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
{
Double Commander
-------------------------------------------------------------------------
About dialog
Copyright (C) 2006-2024 Alexander Koblov ([email protected])
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
}
unit fAbout;
{$mode objfpc}{$H+}
interface
uses
Graphics, Forms, Controls, StdCtrls, ExtCtrls, Buttons,
SysUtils, Classes, LCLType, LMessages;
type
{ TfrmAbout }
TfrmAbout = class(TForm)
btnClose: TBitBtn;
btnCopyToClipboard: TButton;
imgLogo: TImage;
lblCommit: TLabel;
lblWidgetsetVer: TLabel;
lblPlatform: TLabel;
lblOperatingSystem: TLabel;
lblRevision: TLabel;
lblHomePageAddress: TLabel;
lblHomePage: TLabel;
lblFreePascalVer: TLabel;
lblTitle: TLabel;
lblLazarusVer: TLabel;
lblBuild: TLabel;
lblVersion: TLabel;
pnlText: TPanel;
memInfo: TMemo;
pnlInfo: TPanel;
procedure btnCopyToClipboardClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure lblHomePageAddressClick(Sender: TObject);
procedure lblHomePageAddressMouseEnter(Sender: TObject);
procedure lblHomePageAddressMouseLeave(Sender: TObject);
procedure frmAboutShow(Sender: TObject);
private
FMouseLeave, FMouseEnter: TColor;
protected
procedure UpdateStyle;
procedure CMThemeChanged(var Message: TLMessage); message CM_THEMECHANGED;
public
{ Public declarations }
end;
procedure ShowAboutBox(TheOwner: TComponent);
implementation
{$R *.lfm}
uses
Clipbrd, dmHelpManager, uDCVersion, uClipboard, uOSForms;
const
cIndention = LineEnding + #32#32;
cAboutMsg =
'This program is free software under GNU GPL 2 license, see COPYING.txt file.' + LineEnding + LineEnding +
'Active developers: '+ cIndention +
'Alexander Koblov ([email protected]) - author, core developer' + cIndention +
'Rich Chang ([email protected]) - developer' + LineEnding + LineEnding +
'Former developers: ' + cIndention +
'Denis Bisson ([email protected]) - developer' + cIndention +
'Przemysław Nagay ([email protected]) - core developer' + cIndention +
'Dmitry Kolomiets ([email protected]) - developer' + cIndention +
'Radek Cervinka ([email protected]) - author of Seksi Commander' + LineEnding + LineEnding +
'Contributors:' + cIndention +
'Tolstov Igor ([email protected])' + cIndention +
'Anton Panferov ([email protected])' + cIndention +
'Rustem Rakhimov ([email protected])' + cIndention +
'Moroz Serhiy ([email protected])' + cIndention +
'Vitaly Zotov ([email protected])' + cIndention +
'Zolotov Alex ([email protected])' + cIndention +
'Peter Cernoch ([email protected]) - author PFM' + cIndention +
'Pavel Letko ([email protected]) - multirename, split, linker' + cIndention +
'Jiri Karasek ([email protected])' + cIndention +
'Vladimir Pilny ([email protected])' + cIndention +
'Vaclav Juza ([email protected])' + cIndention +
'Martin Matusu ([email protected]) - chown, chgrp' + cIndention +
'Radek Polak - some viewer fixes' + cIndention +
'Dmytro Zheludko ([email protected])' + cIndention +
'Andryei Gudyak - main icon' + cIndention +
'translators (see details in language files) ' + LineEnding + LineEnding +
'Double Commander uses icons from:' + LineEnding +
'- Tango Icon Library (http://tango.freedesktop.org/Tango_Icon_Library)' + LineEnding +
'- Silk icon set 1.3 by Mark James (http://www.famfamfam.com/lab/icons/silk/)' + LineEnding +
'- Elementary icon theme 2.7.1 (https://github.com/elementary/icons)' + LineEnding +
'- Adwaita Icon Theme (https://gitlab.gnome.org/GNOME/adwaita-icon-theme)' + LineEnding +
'- Farm-Fresh Web Icons (https://www.fatcow.com/free-icons)' + LineEnding +
'- Oxygen icon theme (https://invent.kde.org/frameworks/oxygen-icons)' + LineEnding + LineEnding +
'Big thanks to Lazarus and Free Pascal Team!';
procedure ShowAboutBox(TheOwner: TComponent);
begin
with TfrmAbout.Create(TheOwner) do
try
ShowModal;
finally
Free;
end;
end;
procedure TfrmAbout.lblHomePageAddressMouseLeave(Sender: TObject);
begin
with Sender as TLabel do
begin
Font.Style:= [];
Font.Color:= FMouseLeave;
Cursor:= crDefault;
end;
end;
procedure TfrmAbout.lblHomePageAddressMouseEnter(Sender: TObject);
begin
with Sender as TLabel do
begin
Font.Style:= [fsUnderLine];
Font.Color:= FMouseEnter;
Cursor:= crHandPoint;
end;
end;
procedure TfrmAbout.lblHomePageAddressClick(Sender: TObject);
var
ErrMsg: String;
begin
dmHelpMgr.HTMLHelpDatabase.ShowURL('https://doublecmd.sourceforge.io','Double Commander Web Site', ErrMsg);
end;
procedure TfrmAbout.btnCopyToClipboardClick(Sender: TObject);
var
StrInfo: String;
begin
StrInfo := Format('Double Commander' + LineEnding +
'Version: %s' + LineEnding +
'Revision: %s' + LineEnding +
'Commit: %s' + LineEnding +
'Build date: %s' + LineEnding +
'Lazarus: %s' + LineEnding +
'FPC: %s' + LineEnding +
'Platform: %s' + LineEnding +
'OS version: %s' + LineEnding,
[dcVersion, dcRevision, dcCommit, dcBuildDate,
lazVersion, fpcVersion,
TargetCPU + '-' + TargetOS + '-' + TargetWS,
OSVersion]);
if WSVersion <> EmptyStr then
StrInfo := StrInfo + LineEnding + 'Widgetset library: ' + WSVersion;
ClipboardSetText(StrInfo);
end;
procedure TfrmAbout.FormCreate(Sender: TObject);
begin
UpdateStyle;
lblTitle.Font.Color:= FMouseEnter;
lblHomePageAddress.Font.Color:= FMouseLeave;
end;
procedure TfrmAbout.frmAboutShow(Sender: TObject);
begin
memInfo.Lines.Text := cAboutMsg;
memInfo.CaretPos := Classes.Point(0, 0);
lblVersion.Caption := lblVersion.Caption + #32 + dcVersion;
lblRevision.Caption := lblRevision.Caption + #32 + dcRevision;
lblCommit.Caption := lblCommit.Caption + #32 + dcCommit;
lblBuild.Caption := lblBuild.Caption + #32 + dcBuildDate;
lblLazarusVer.Caption := lblLazarusVer.Caption + #32 + lazVersion;
lblFreePascalVer.Caption := lblFreePascalVer.Caption + #32 + fpcVersion;
lblPlatform.Caption := TargetCPU + '-' + TargetOS + '-' + TargetWS;
lblOperatingSystem.Caption := OSVersion;
lblWidgetsetVer.Caption := WSVersion;
Constraints.MinHeight := Height;
btnClose.Anchors := [akLeft, akBottom];
end;
procedure TfrmAbout.UpdateStyle;
begin
if DarkStyle then
begin
FMouseLeave:= RGBToColor(97, 155, 192);
FMouseEnter:= RGBToColor(192, 102, 97);
end
else begin
FMouseLeave:= clBlue;
FMouseEnter:= clRed;
end;
end;
procedure TfrmAbout.CMThemeChanged(var Message: TLMessage);
begin
UpdateStyle;
end;
end.