Open ShaunPort opened 8 months ago
Please stick to English for bug reports. The vast majority of out development team does not speak Chinese
I translated the entire issue to English.
I could be wrong, but I don't think all OS support different events for left and right click on system tray icons... others have hit this: https://bugs.openjdk.org/browse/JDK-8041890
I could be wrong, but I don't think all OS support different events for left and right click on system tray icons... others have hit this: https://bugs.openjdk.org/browse/JDK-8041890
I understand that certain features are missing in order to fit different operating systems. So will the development team write different call methods according to different operating systems like golang cross-platform, and do different system trays for windows and mac os systems. The other one is the default Quit button in the system tray on windows, but I can't change its name.Because I want to change it to Chinese.
In general we don't have APIs that support different behaviours on different platforms. We are looking for a consistent user experience.
If you launch the menu only on some platforms then how would others use your app?
Regarding changing the menu item "Quit" text that is tracked in different issues and relates to the Localisation work we are adding.
I also strongly recommend left clicking to open the main window and right clicking to open the menu
I also strongly recommend left clicking to open the main window and right clicking to open the menu
Just for some info - I checked all the macOS apps I have with system tray icons. 75% do identical things for left and right, but none of them open a window when left clicked (those that differ show a rich content popup instead of menu on left click). Also of note is that Apple's icons (right next to the system tray, look identical) do nothing on right click.
But on almost all windows desktop programs, the left-clicking icon opens the application and the right-clicking icon opens the menu.
This was discussed on our call today, and as we understand it the status is:
So in this case it seems like the right thing to do is to show a window on left click for Windows only - without exposing more Apis which would be platform specific. So the question becomes, which window to show? The first, the last, or the master? We are opting for the latter (whichever window is marked as master) but looking for feedback on this.
In windows software released in China, the left button tray icon displays the main window, regardless of other Windows.But I don't clean up foreign software habits.
Has anyone see this PR (https://github.com/getlantern/systray/pull/234/files) from the upstream repo of systray? IMHO I think this might be the way to go to allow devs to implement the behaviour as needed/wished, don't you?
The PR you linked to only works on Windows (where the clicks are often different) but not on macOS (where most apps have the same action) or Linux (where right click is not supported).
As Fyne aims to be consistent functionality across all platforms I don't think this helps.
We are opting for the latter (whichever window is marked as master) but looking for feedback on this.
My feedback is: that sounds great! I think loading the master window is better than doing nothing, even if the app would prefer more control.
Checklist
Is your feature request related to a problem?
Can SystemTray add a left-click to display the main form, and a right-click to open the menu, and this menu, which comes with the default 'Quite', can have a name defined by the user, because we have the desire to change it to Chinese. Hope to get a reply.
Is it possible to construct a solution with the existing API?
No response
Describe the solution you'd like to see.
Can SystemTray add a left-click to display the main form, and a right-click to open the menu, and this menu, which comes with the default 'Quite', can have a name defined by the user, because we have the desire to change it to Chinese. Hope to get a reply.