Changeset 303 for branches/highdpi/Packages/CevoComponents/DrawDlg.pas
- Timestamp:
- Mar 9, 2021, 9:19:49 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/highdpi/Packages/CevoComponents/DrawDlg.pas
r252 r303 18 18 MoveActive: Boolean; 19 19 procedure VisibleChangedHandler(Sender: TObject); 20 procedure DoDeactivate(Sender: TObject); 20 21 protected 21 22 TitleHeight: Integer; … … 29 30 procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; 30 31 procedure MouseLeave; override; 32 procedure KeyDown(var Key: Word; Shift: TShiftState); override; 31 33 public 32 34 constructor Create(AOwner: TComponent); override; … … 71 73 MoveActive := False; 72 74 AddHandlerOnVisibleChanged(VisibleChangedHandler); 75 {$IFDEF LINUX} 76 OnDeactivate := DoDeactivate; 77 {$ENDIF} 73 78 end; 74 79 … … 76 81 begin 77 82 RemoveHandlerOnVisibleChanged(VisibleChangedHandler); 78 inherited Destroy;83 inherited; 79 84 end; 80 85 … … 171 176 end; 172 177 178 procedure TDrawDlg.KeyDown(var Key: Word; Shift: TShiftState); 179 begin 180 if Key = VK_ESCAPE then Close; 181 inherited; 182 end; 183 173 184 procedure TDrawDlg.VisibleChangedHandler(Sender: TObject); 185 begin 186 MoveActive := False; 187 end; 188 189 procedure TDrawDlg.DoDeactivate(Sender: TObject); 174 190 begin 175 191 MoveActive := False;
Note:
See TracChangeset
for help on using the changeset viewer.