Open upendra-web opened 1 year ago
Can you confirm where the title was expected to appear? My understanding is that it appears on tooltip, but it was not clear from the screenshot that this was not the case?
I tried the below code with latern's systray
module
package main
import (
"github.com/getlantern/systray"
"github.com/getlantern/systray/example/icon"
)
func main() {
systray.Run(onReady, onExit)
}
func onReady() {
systray.SetIcon(icon.Data)
systray.SetTitle("Awesome App")
systray.SetTooltip("Pretty awesome超级棒")
mQuit := systray.AddMenuItem("Quit", "Quit the whole app")
// Sets the icon of a menu item. Only available on Mac and Windows.
mQuit.SetIcon(icon.Data)
}
func onExit() {
// clean up here
}
It rendered the title beside the icon
as below
So with fyne.io's systray module I thought the result might be the same.
And just FYI, the Quit
you see in the screenshot is a menu option, not a tooltip.
Hi @andydotxyz, any updates on the above, is it an issue or design choice?
I have checked out the protocol and the code, it should work. Do you see any error on the command line when running the app?
It could be a difference in how your window manager handles legacy system tray and the new "AppIndicator" tray items, i'm not entirely sure, as Gnome does not work on this computer.
We are passing the title to the DE correctly as far as I can see, but it is up to the panel whether or not it is displayed.
However in the old model the app controls what is drawn, so the getlantern
code may have been forcing it before?
Yeah, that might be the problem of the DE, I will also try to check the getlatern
's code. Thanks @andydotxyz for the clarification.
Can you clarify a doubt, is it ok to encode a SVG(which has some text) to byte array and pass that to SetIcon
?
Can you clarify a doubt, is it ok to encode a SVG(which has some text) to byte array and pass that to
SetIcon
?
I'm pretty sure that the image data must be bitmap (.png even). In the Fyne library we can rasterise SVG, but the OS systray cannot and this library does not have that feature either.
Hello,
Any update on this subject? why it works on get lantern initial project and not this one ?
On MacOS, I don't have the issue but I got it on windows.
Windows does not support having text next to the system tray icon, so it will show as a tooltip (if none other is set) instead.
For the title issue of this ticket we were waiting for more information from the OP.
Thanks for your feedback.
Maybe could we add this to documentation ?
If it is confirmed that is the answer we could close it with a doc update.
Though I am curious about your comment, how does it look on Windows with the original project?
Any update on this subject? why it works on get lantern initial project and not this one ?
Having the same issue here on KDE, although getlantern/systray has the same issue for me.
I don't think KDE supports inserting text to the system tray. Can you show any app which does that?
Hi, thanks for creating a fork of lantern's systray.
I tried the below code with systray library
But I couldn't see the title in system tray![systray_issue](https://user-images.githubusercontent.com/43108965/194757791-3601aab2-a0ca-4770-b013-f3a9da8fcec9.png)
So was this intentional? Or this is an issue? Thanks in advance!
System and package details
OS: Ubuntu 21.10 Desktop environment: Gnome 40.4.0 Package version: fyne.io/systray v1.10.0 Go version: 1.18