Skip to content

Commit

Permalink
restyled the hotkey OK button
Browse files Browse the repository at this point in the history
  • Loading branch information
BazzaCuda committed Sep 1, 2023
1 parent 75fe07c commit c4ba9bd
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 deletions.
19 changes: 12 additions & 7 deletions FormHotkeys.dfm
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,19 @@ object HotkeyForm: THotkeyForm
Modifiers = []
TabOrder = 0
end
object btnOK: TButton
Left = 116
Top = 105
Width = 75
Height = 25
object pnlOK: TPanel
Left = 114
Top = 94
Width = 78
Height = 27
Caption = 'OK'
Font.Charset = DEFAULT_CHARSET
Font.Color = clSilver
Font.Height = -19
Font.Name = 'Tahoma'
Font.Style = [fsBold]
ParentFont = False
TabOrder = 1
TabStop = False
OnClick = btnOKClick
OnClick = pnlOKClick
end
end
9 changes: 5 additions & 4 deletions FormHotkeys.pas
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@ interface

uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ComCtrls;
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ComCtrls,
Vcl.ExtCtrls;

type
THotkeyForm = class(TForm)
hkHotkey: THotKey;
Label1: TLabel;
btnOK: TButton;
procedure btnOKClick(Sender: TObject);
pnlOK: TPanel;
procedure pnlOKClick(Sender: TObject);
private
public
property hotKey: THotKey read hkHotKey;
Expand Down Expand Up @@ -96,7 +97,7 @@ function saveHotkey(aHotkey: integer): boolean;
end;
end;

procedure THotkeyForm.btnOKClick(Sender: TObject);
procedure THotkeyForm.pnlOKClick(Sender: TObject);
begin
saveHotkey(registerHotkey(hotkey.hotkey));
modalResult := mrOK;
Expand Down

0 comments on commit c4ba9bd

Please sign in to comment.