mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-04 19:40:20 +02:00
cocoa: replacing use of GetNSObjectView with lclContentView
git-svn-id: trunk@61763 -
This commit is contained in:
parent
c369647805
commit
5e4157f40b
@ -910,7 +910,7 @@ var
|
||||
begin
|
||||
p := nil;
|
||||
if (AParams.WndParent <> 0) then
|
||||
p := CocoaUtils.GetNSObjectView(NSObject(AParams.WndParent));
|
||||
p := NSView(AParams.WndParent).lclContentView;
|
||||
|
||||
if Assigned(p) then
|
||||
LCLToNSRect(Types.Bounds(AParams.X, AParams.Y, AParams.Width, AParams.Height),
|
||||
|
@ -1411,7 +1411,7 @@ var
|
||||
cr:TCocoaCursor;
|
||||
begin
|
||||
Result := False;
|
||||
View := CocoaUtils.GetNSObjectView(Owner);
|
||||
View := HandleFrame.lclContentView;
|
||||
if View = nil then Exit;
|
||||
if not Assigned(Target) then Exit;
|
||||
if not (csDesigning in Target.ComponentState) then
|
||||
@ -1607,10 +1607,7 @@ var
|
||||
begin
|
||||
if not AWinControl.HandleAllocated then Exit;
|
||||
|
||||
//todo: GetNSObjectView must be replaced with oop approach
|
||||
// note that client rect might be smaller than the bounds of TWinControl itself
|
||||
// thus extra size should be adapted
|
||||
lView := CocoaUtils.GetNSObjectView(NSObject(AWinControl.Handle));
|
||||
lView := NSObject(AWinControl.Handle).lclContentView;
|
||||
if lView = nil then Exit;
|
||||
|
||||
//todo: using fittingSize is wrong - it's based on constraints of the control solely.
|
||||
|
Loading…
Reference in New Issue
Block a user