unit frmAbout;

interface

uses
  {$IFDEF  MSWINDOWS}  Winapi.ShellAPI, Winapi.Windows, {$ENDIF}
  System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
  FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs,
  FMX.Layouts, FMX.Objects, FMX.Effects, FMX.Filter.Effects, FMX.Ani;

type
  TFormAbout = class(TForm)
    txtGitlab: TText;
    layBackground: TLayout;
    procedure layBackgroundClick(Sender: TObject);
    procedure txtGitlabClick(Sender: TObject);
    procedure txtGitlabMouseEnter(Sender: TObject);
    procedure txtGitlabMouseLeave(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  FormAbout: TFormAbout;

implementation

uses
  frmStyleModule;

{$R *.fmx}

procedure TFormAbout.layBackgroundClick(Sender: TObject);
begin
  Close;
end;

procedure TFormAbout.txtGitlabClick(Sender: TObject);
begin
  {$IFDEF WINDOWS}
  ShellExecute(0, 'open', 'https://code.moenext.com/rarnu/puzzle-editor', nil, nil, SW_NORMAL);
  {$ENDIF}
end;

procedure TFormAbout.txtGitlabMouseEnter(Sender: TObject);
begin
  txtGitlab.TextSettings.Font.Style := [TFontStyle.fsBold, TFontStyle.fsUnderline];
end;

procedure TFormAbout.txtGitlabMouseLeave(Sender: TObject);
begin
  txtGitlab.TextSettings.Font.Style := [TFontStyle.fsBold];
end;

end.
