cocoa: lcl: adding a new capability lcCanDrawHidden for widgetsets with optimized drawing that can draw hidden on offscreen controls (macOS). bug #35678

git-svn-id: trunk@61341 -
This commit is contained in:
dmitry 2019-06-08 03:26:39 +00:00
parent 15cde7a988
commit 1acc007cbc
3 changed files with 8 additions and 5 deletions

View File

@ -4924,8 +4924,9 @@ begin
if not (TempControl is TWinControl) then begin if not (TempControl is TWinControl) then begin
//DebugLn('TWinControl.PaintControls B Self=',Self.Name,':',Self.ClassName,' Control=',TempControl.Name,':',TempControl.ClassName,' ',TempControl.Left,',',TempControl.Top,',',TempControl.Width,',',TempControl.Height); //DebugLn('TWinControl.PaintControls B Self=',Self.Name,':',Self.ClassName,' Control=',TempControl.Name,':',TempControl.ClassName,' ',TempControl.Left,',',TempControl.Top,',',TempControl.Width,',',TempControl.Height);
with TempControl do with TempControl do
if IsVisible if ((WidgetSet.GetLCLCapability(lcCanDrawHidden) = LCL_CAPABILITY_YES) and isControlVisible)
and RectVisible(DC, TempControl.BoundsRect) then or (IsVisible and RectVisible(DC, TempControl.BoundsRect))
then
begin begin
if csPaintCopy in Self.ControlState then if csPaintCopy in Self.ControlState then
Include(FControlState, csPaintCopy); Include(FControlState, csPaintCopy);

View File

@ -71,7 +71,8 @@ type
lcRadialGradientBrush, // Indicates that the function CreateBrushWithRadialGradient is supported, i.e. we can create a brush with a radial gradient pattern lcRadialGradientBrush, // Indicates that the function CreateBrushWithRadialGradient is supported, i.e. we can create a brush with a radial gradient pattern
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)
); );
{ TDialogButton } { TDialogButton }

View File

@ -280,9 +280,10 @@ begin
{$ifdef COCOA_USE_NATIVE_MODAL} {$ifdef COCOA_USE_NATIVE_MODAL}
lcModalWindow, lcModalWindow,
{$endif} {$endif}
lcAntialiasingEnabledByDefault: lcAntialiasingEnabledByDefault,
lcTransparentWindow,
lcCanDrawHidden:
Result := LCL_CAPABILITY_YES; Result := LCL_CAPABILITY_YES;
lcTransparentWindow: Result := LCL_CAPABILITY_YES;
else else
Result := inherited; Result := inherited;
end; end;