Recent

Author Topic: TTrayIcon does not work properly on MAC Mojave  (Read 1942 times)

tduccuong

  • New member
  • *
  • Posts: 7
TTrayIcon does not work properly on MAC Mojave
« on: January 05, 2019, 01:33:17 pm »
Hi,

im using MAC Mojave and Lazarus 2.0RC3. I created a new project with 1 main form, added TTrayIcon and TPopupMenu. My problems are:
1. The TTrayIcon's icon scales too big that I can see only part of the icon. I tried different resolutions from 16x16 to 512x512 but none worked.
2. I already set the hint but it is not shown when mouse hover over the icon
3. Clicking or double-clicking does not do anything as specified by the code. E.g., ShowMessage, popup menu,...

The same code works fine in Linux. I am using all default compiler and target options.

Here is some code:
Code: Pascal  [Select][+][-]
  1. procedure TfrmMain.FormCreate(Sender: TObject);
  2. begin
  3.   trayIcon.Visible := True;
  4.   trayIcon.Hint := 'Some hint';
  5.  
  6.   mnExit := TMenuItem.Create(nil);
  7.   mnExit.Caption := 'Close';
  8.   trayMenu.Items.Add(mnExit);
  9. end;
  10.  
  11. ...
  12.  
  13. procedure TfrmMain.trayIconClick(Sender: TObject);
  14. begin
  15.   trayMenu.PopUp(trayIcon.GetPosition.x, trayIcon.GetPosition.y);
  16. end;
  17.  

tduccuong

  • New member
  • *
  • Posts: 7
Re: TTrayIcon does not work properly on MAC Mojave
« Reply #1 on: January 24, 2019, 12:32:19 pm »
anyone?

 

TinyPortal © 2005-2018