Skip to content

Commit

Permalink
🔧 Fix clicking form to close actions popup menu
Browse files Browse the repository at this point in the history
  • Loading branch information
vhanla committed Jul 3, 2024
1 parent 85173b9 commit b9bb2f5
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 14 deletions.
39 changes: 25 additions & 14 deletions frmSettings.dfm
Original file line number Diff line number Diff line change
Expand Up @@ -2,41 +2,52 @@ object frmTrayPopup: TfrmTrayPopup
Left = 0
Top = 0
Caption = 'frmTrayPopup'
ClientHeight = 354
ClientWidth = 616
ClientHeight = 232
ClientWidth = 404
Color = 16744448
Font.Charset = ANSI_CHARSET
Font.Color = clWindowText
Font.Height = -24
Font.Height = -16
Font.Name = 'Segoe UI'
Font.Style = []
FormStyle = fsStayOnTop
OldCreateOrder = False
OnClick = FormClick
OnClose = FormClose
OnCreate = FormCreate
OnDestroy = FormDestroy
OnPaint = FormPaint
OnShow = FormShow
PixelsPerInch = 144
TextHeight = 32
PixelsPerInch = 96
TextHeight = 21
object imgScreenShape: TImage
Left = 218
Top = 69
Width = 146
Height = 146
Left = 143
Top = 45
Width = 96
Height = 96
Margins.Left = 2
Margins.Top = 2
Margins.Right = 2
Margins.Bottom = 2
OnClick = FormClick
end
object Label1: TLabel
Left = 256
Top = 69
Width = 36
Height = 133
Left = 168
Top = 45
Width = 23
Height = 87
Margins.Left = 2
Margins.Top = 2
Margins.Right = 2
Margins.Bottom = 2
Caption = '1'
Font.Charset = ANSI_CHARSET
Font.Color = clWhite
Font.Height = -100
Font.Height = -65
Font.Name = 'Segoe UI Light'
Font.Style = []
ParentFont = False
OnClick = FormClick
end
object Timer1: TTimer
Interval = 3
Expand Down
6 changes: 6 additions & 0 deletions frmSettings.pas
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ TfrmTrayPopup = class(TForm)
procedure Timer2Timer(Sender: TObject);
procedure Timer3Timer(Sender: TObject);
procedure tmFaderTimer(Sender: TObject);
procedure FormClick(Sender: TObject);
private
{ Private declarations }
CornerOption : TXCombobox;
Expand Down Expand Up @@ -134,6 +135,11 @@ procedure TfrmTrayPopup.CloseApp(Sender: TObject);
Close;
end;

procedure TfrmTrayPopup.FormClick(Sender: TObject);
begin
XPopupMenu.Hide;
end;

procedure TfrmTrayPopup.FormClose(Sender: TObject; var Action: TCloseAction);
procedure Delay(msec: LongInt);
var
Expand Down

0 comments on commit b9bb2f5

Please sign in to comment.