lcl: adding LCL compatibility option to define system without accelerators (macOS). For system not supporting accelerator, DialogChar() methods of TControl will not be called (by LCL). See bug #37721 and #37719

git-svn-id: trunk@63960 -
This commit is contained in:
dmitry 2020-10-05 16:21:30 +00:00
parent 9ed4548eef
commit ff637c1fd4
3 changed files with 5 additions and 2 deletions

View File

@ -91,7 +91,8 @@ begin
lcReceivesLMClearCutCopyPasteReliably, lcReceivesLMClearCutCopyPasteReliably,
lcSendsUTF8KeyPress, lcSendsUTF8KeyPress,
lcEmulatedMDI, lcEmulatedMDI,
lcNativeTaskDialog: Result := LCL_CAPABILITY_YES; lcNativeTaskDialog,
lcAccelleratorKeys: Result := LCL_CAPABILITY_YES;
else else
Result := LCL_CAPABILITY_NO; Result := LCL_CAPABILITY_NO;
end; end;

View File

@ -5948,6 +5948,7 @@ var
ParentForm: TCustomForm; ParentForm: TCustomForm;
begin begin
Result := False; Result := False;
if WidgetSet.GetLCLCapability(lcAccelleratorKeys) = LCL_CAPABILITY_NO then Exit;
ParentForm := GetParentForm(Self); ParentForm := GetParentForm(Self);
if ParentForm <> nil then if ParentForm <> nil then
begin begin

View File

@ -72,7 +72,8 @@ type
lcTransparentWindow, // ability to pass mouse messages through a window (on win32 LM_NCHITTEST with HTTRANSPARENT result) lcTransparentWindow, // ability to pass mouse messages through a window (on win32 LM_NCHITTEST with HTTRANSPARENT result)
lcTextHint, // native TextHint support lcTextHint, // native TextHint support
lcNativeTaskDialog, // task dialog under mswindows for widgetsets different than win32/wince. Used in LCLTaskDialog. eg Qt/Qt5 must set this option to false otherwise taskdialog segfaults. lcNativeTaskDialog, // task dialog under mswindows for widgetsets different than win32/wince. Used in LCLTaskDialog. eg Qt/Qt5 must set this option to false otherwise taskdialog segfaults.
lcCanDrawHidden // the system rendering engine might request a hidden control to be drawn (macOS 10.9 and later) lcCanDrawHidden, // the system rendering engine might request a hidden control to be drawn (macOS 10.9 and later)
lcAccelleratorKeys // the system supports UI concept of &-like notation
); );
{ TDialogButton } { TDialogButton }