mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-02 11:01:20 +02:00
Cocoa: unify window titles
This commit is contained in:
parent
60f26594ad
commit
55c4e2ffe8
@ -792,9 +792,8 @@ begin
|
||||
cb.window := win;
|
||||
|
||||
win.setDelegate(win);
|
||||
ns := NSStringUtf8(AWinControl.Caption);
|
||||
ns := ControlTitleToNSStr( AWinControl.Caption );
|
||||
win.setTitle(ns);
|
||||
ns.release;
|
||||
{$ifdef BOOLFIX}
|
||||
win.setReleasedWhenClosed_(Ord(False)); // do not release automatically
|
||||
win.setAcceptsMouseMovedEvents_(Ord(True));
|
||||
@ -939,12 +938,11 @@ begin
|
||||
if not AWinControl.HandleAllocated then
|
||||
Exit;
|
||||
win := TCocoaWindowContent(AWinControl.Handle).lclOwnWindow;
|
||||
ns := NSStringUtf8(AText);
|
||||
ns := ControlTitleToNSStr( AText );
|
||||
if Assigned(win) then
|
||||
NSwindow(win).setTitle(ns)
|
||||
else
|
||||
TCocoaWindowContent(AWinControl.Handle).setStringValue(ns);
|
||||
ns.release;
|
||||
end;
|
||||
|
||||
class procedure TCocoaWSCustomForm.CloseModal(const ACustomForm: TCustomForm);
|
||||
|
Loading…
Reference in New Issue
Block a user