mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
UPD: About - link colors
This commit is contained in:
parent
e410909169
commit
ce960e0774
2 changed files with 38 additions and 8 deletions
|
|
@ -10,9 +10,10 @@ object frmAbout: TfrmAbout
|
|||
ClientWidth = 667
|
||||
Constraints.MinWidth = 667
|
||||
KeyPreview = True
|
||||
Position = poOwnerFormCenter
|
||||
LCLVersion = '2.0.12.0'
|
||||
OnCreate = FormCreate
|
||||
OnShow = frmAboutShow
|
||||
Position = poOwnerFormCenter
|
||||
LCLVersion = '3.5.0.0'
|
||||
object pnlText: TPanel
|
||||
AnchorSideLeft.Control = pnlInfo
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
|
|
@ -364,9 +365,9 @@ object frmAbout: TfrmAbout
|
|||
BorderSpacing.CellAlignHorizontal = ccaCenter
|
||||
Caption = 'Copy to clipboard'
|
||||
Constraints.MinWidth = 100
|
||||
OnClick = btnCopyToClipboardClick
|
||||
ParentFont = False
|
||||
TabOrder = 0
|
||||
OnClick = btnCopyToClipboardClick
|
||||
end
|
||||
end
|
||||
object btnClose: TBitBtn
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ interface
|
|||
|
||||
uses
|
||||
Graphics, Forms, Controls, StdCtrls, ExtCtrls, Buttons,
|
||||
SysUtils, Classes, LCLType;
|
||||
SysUtils, Classes, LCLType, LMessages;
|
||||
|
||||
type
|
||||
|
||||
|
|
@ -53,12 +53,16 @@ type
|
|||
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
|
||||
{ Private declarations }
|
||||
FMouseLeave, FMouseEnter: TColor;
|
||||
protected
|
||||
procedure UpdateStyle;
|
||||
procedure CMThemeChanged(var Message: TLMessage); message CM_THEMECHANGED;
|
||||
public
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
|
@ -71,7 +75,7 @@ implementation
|
|||
{$R *.lfm}
|
||||
|
||||
uses
|
||||
Clipbrd, dmHelpManager, uDCVersion, uClipboard;
|
||||
Clipbrd, dmHelpManager, uDCVersion, uClipboard, uOSForms;
|
||||
|
||||
const
|
||||
cIndention = LineEnding + #32#32;
|
||||
|
|
@ -126,7 +130,7 @@ begin
|
|||
with Sender as TLabel do
|
||||
begin
|
||||
Font.Style:= [];
|
||||
Font.Color:= clBlue;
|
||||
Font.Color:= FMouseLeave;
|
||||
Cursor:= crDefault;
|
||||
end;
|
||||
end;
|
||||
|
|
@ -136,7 +140,7 @@ begin
|
|||
with Sender as TLabel do
|
||||
begin
|
||||
Font.Style:= [fsUnderLine];
|
||||
Font.Color:= clRed;
|
||||
Font.Color:= FMouseEnter;
|
||||
Cursor:= crHandPoint;
|
||||
end;
|
||||
end;
|
||||
|
|
@ -170,6 +174,13 @@ begin
|
|||
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;
|
||||
|
|
@ -189,4 +200,22 @@ begin
|
|||
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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue