Don't close EvaluateDialog and Debug Inspector when docked

git-svn-id: trunk@60043 -
This commit is contained in:
michl 2019-01-09 14:25:58 +00:00
parent f32968dd25
commit ef57dae24f
4 changed files with 8 additions and 2 deletions

View File

@ -309,7 +309,7 @@ end;
procedure TEvaluateDlg.FormKeyDown(Sender: TObject; var Key: Word; procedure TEvaluateDlg.FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState); Shift: TShiftState);
begin begin
if Key = VK_ESCAPE then if (Key = VK_ESCAPE) and not Docked then
Close Close
else else
inherited;; inherited;;

View File

@ -298,7 +298,7 @@ end;
procedure TIDEInspectDlg.FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); procedure TIDEInspectDlg.FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
begin begin
if Key = VK_ESCAPE then if (Key = VK_ESCAPE) and not Docked then
Close; Close;
end; end;

View File

@ -1539,6 +1539,7 @@ type
KeepDockSiteSize: Boolean = true): Boolean; virtual; KeepDockSiteSize: Boolean = true): Boolean; virtual;
function ReplaceDockedControl(Control: TControl; NewDockSite: TWinControl; function ReplaceDockedControl(Control: TControl; NewDockSite: TWinControl;
DropControl: TControl; ControlSide: TAlign): Boolean; DropControl: TControl; ControlSide: TAlign): Boolean;
function Docked: Boolean;
function Dragging: Boolean; function Dragging: Boolean;
// accessibility // accessibility
function GetAccessibleObject: TLazAccessibleObject; function GetAccessibleObject: TLazAccessibleObject;

View File

@ -4876,6 +4876,11 @@ begin
EnableAutoSizing{$IFDEF DebugDisableAutoSizing}('TControl.ReplaceDockedControl'){$ENDIF}; EnableAutoSizing{$IFDEF DebugDisableAutoSizing}('TControl.ReplaceDockedControl'){$ENDIF};
end; end;
function TControl.Docked: Boolean;
begin
Result := Assigned(Parent) and (Parent = HostDockSite) and (GetParentForm(Parent) <> Parent);
end;
procedure TControl.AddHandlerOnResize(const OnResizeEvent: TNotifyEvent; procedure TControl.AddHandlerOnResize(const OnResizeEvent: TNotifyEvent;
AsFirst: boolean); AsFirst: boolean);
begin begin