mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-10 05:09:26 +01:00
cocoa: update hint window to use windowcontentdocument as well
git-svn-id: trunk@61440 -
This commit is contained in:
parent
12152924e3
commit
28ca352efe
@ -791,7 +791,7 @@ end;
|
||||
|
||||
function TCocoaScrollView.acceptsFirstResponder: LCLObjCBoolean;
|
||||
begin
|
||||
Result := True;
|
||||
Result := false;
|
||||
end;
|
||||
|
||||
function TCocoaScrollView.lclGetCallback: ICommonCallback;
|
||||
|
||||
@ -247,6 +247,7 @@ var
|
||||
R: NSRect;
|
||||
Form: TCustomForm absolute AWinControl;
|
||||
cb: TLCLWindowCallback;
|
||||
doc: TCocoaWindowContentDocument;
|
||||
const
|
||||
WinMask = NSBorderlessWindowMask or NSUtilityWindowMask;
|
||||
begin
|
||||
@ -289,11 +290,19 @@ begin
|
||||
R.origin.x := 0;
|
||||
R.origin.y := 0;
|
||||
cnt := TCocoaWindowContent.alloc.initWithFrame(R);
|
||||
cb := TLCLWindowCallback.Create(cnt, AWinControl, cnt);
|
||||
doc := TCocoaWindowContentDocument.alloc.initWithFrame(R);
|
||||
doc.setHidden(false);
|
||||
doc.setAutoresizesSubviews(true);
|
||||
doc.setAutoresizingMask(NSViewMaxXMargin or NSViewMinYMargin);
|
||||
cb := TLCLWindowCallback.Create(doc, AWinControl, cnt);
|
||||
doc.callback := cb;
|
||||
cb.window := win;
|
||||
cnt.callback := cb;
|
||||
cnt.wincallback := cb;
|
||||
cnt.preventKeyOnShow := true;
|
||||
cnt.isCustomRange := true;
|
||||
cnt.setDocumentView(doc);
|
||||
cnt.setDrawsBackground(false); // everything is covered anyway
|
||||
TCocoaPanel(win).callback := cb;
|
||||
|
||||
win.setContentView(cnt);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user