cocoa: update RectToViewCoord to take into consideration if NSView has flipped coordinate system. #32884

git-svn-id: trunk@56853 -
This commit is contained in:
dmitry 2017-12-27 02:53:20 +00:00
parent 71b6f936e7
commit 6f0194962a

View File

@ -2461,13 +2461,13 @@ var
begin
if not Assigned(view) then Exit;
b := view.bounds;
with r do
begin
Result.origin.x := Left;
Result.origin.y := b.size.height - Bottom;
Result.size.width := Right - Left;
Result.size.height := Bottom - Top;
end;
Result.origin.x := r.Left;
Result.size.width := r.Right - r.Left;
Result.size.height := r.Bottom - r.Top;
if view.isFlipped then
Result.origin.y := r.Top
else
Result.origin.y := b.size.height - r.Bottom;
end;
function LCLControlExtension.lclIsEnabled:Boolean;