mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-08 14:35:58 +02:00
Cocoa: fix the issue that ShowBalloonHint does not conform to conventions on macOS, issue #41016
This commit is contained in:
parent
2b70328d5d
commit
5db9facb32
@ -139,8 +139,17 @@ begin
|
||||
end;
|
||||
|
||||
class function TCocoaWSCustomTrayIcon.ShowBalloonHint(const ATrayIcon: TCustomTrayIcon): Boolean;
|
||||
var
|
||||
nc: NSUserNotificationCenter;
|
||||
message: NSUserNotification;
|
||||
begin
|
||||
Result := False;
|
||||
Result := True;
|
||||
message:= NSUserNotification.alloc.init;
|
||||
message.setTitle( StrToNSString(ATrayIcon.BalloonTitle) );
|
||||
message.setInformativeText( StrToNSString(ATrayIcon.BalloonHint) );
|
||||
nc:= NSUserNotificationCenter.defaultUserNotificationCenter;
|
||||
nc.deliverNotification( message );
|
||||
message.release;
|
||||
end;
|
||||
|
||||
class function TCocoaWSCustomTrayIcon.GetPosition(const ATrayIcon: TCustomTrayIcon): TPoint;
|
||||
|
@ -31,7 +31,7 @@ uses
|
||||
WSExtCtrls, WSLCLClasses,
|
||||
// LCL Cocoa
|
||||
CocoaPrivate, CocoaMenus, CocoaWSCommon, CocoaGDIObjects, CocoaScrollers,
|
||||
Cocoa_Extra;
|
||||
Cocoa_Extra, CocoaUtils;
|
||||
|
||||
type
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user