mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-03 13:40:20 +02:00
cooca: resizing overlay view towards the hosting view
git-svn-id: trunk@61043 -
This commit is contained in:
parent
8bc92cc16d
commit
4844c73998
@ -683,15 +683,6 @@ begin
|
||||
// events to arrive for this window, creating a second call to TCocoaWSCustomForm.CreateHandle
|
||||
// while the first didn't finish yet, instead delay the call
|
||||
cnt.popup_parent := AParams.WndParent;
|
||||
|
||||
if IsFormDesign(AWinControl) then begin
|
||||
ds:=(TCocoaDesignOverlay.alloc).initWithFrame(cnt.frame);
|
||||
ds.callback := cnt.callback;
|
||||
ds.setAutoresizingMask(NSViewWidthSizable or NSViewHeightSizable);
|
||||
cnt.addSubview_positioned_relativeTo(ds, NSWindowAbove, nil);
|
||||
cnt.overlay := ds;
|
||||
end;
|
||||
|
||||
end
|
||||
else
|
||||
begin
|
||||
@ -708,6 +699,24 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
if IsFormDesign(AWinControl) then begin
|
||||
ds:=(TCocoaDesignOverlay.alloc).initWithFrame(cnt.frame);
|
||||
ds.callback := cnt.callback;
|
||||
ds.setFrame( NSMakeRect(0,0, cnt.frame.size.width, cnt.frame.size.height));
|
||||
ds.setAutoresizingMask(
|
||||
//NSViewWidthSizable or NSViewHeightSizable
|
||||
NSViewMinXMargin
|
||||
or NSViewWidthSizable
|
||||
or NSViewMaxXMargin
|
||||
or NSViewMinYMargin
|
||||
or NSViewHeightSizable
|
||||
or NSViewMaxYMargin
|
||||
);
|
||||
|
||||
cnt.addSubview_positioned_relativeTo(ds, NSWindowAbove, nil);
|
||||
cnt.overlay := ds;
|
||||
end;
|
||||
|
||||
Result := TLCLIntfHandle(cnt);
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user