mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-19 11:59:30 +01:00
cocoa: update RectToViewCoord to take into consideration if NSView has flipped coordinate system. #32884
git-svn-id: trunk@56853 -
This commit is contained in:
parent
71b6f936e7
commit
6f0194962a
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user