Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Icon not showing in tray when app packaged using Flatpak #67

Open
KRTirtho opened this issue Aug 22, 2023 · 3 comments
Open

Icon not showing in tray when app packaged using Flatpak #67

KRTirtho opened this issue Aug 22, 2023 · 3 comments

Comments

@KRTirtho
Copy link

The icon shows everywhere except when the app was packaged as Flatpak
Everything works just as expected just the icon doesn't show up instead there's an empty space (KDE/XFCE/Mint) or triple dots (Gnome/Budgie) which are default placeholders ig

I tried to debug but unfortunately no luck

Related issue from another project: KRTirtho/spotube#541

@callegar
Copy link

callegar commented Oct 16, 2023

Is it really flatpak specific? I am not getting any icon either with the spotube appimage.

@guihkx
Copy link

guihkx commented Jan 6, 2024

The API provided by this package is a bit unfortunate for Linux users, but I think it can be easily improved.

Internally, it calls app_indicator_set_icon_full(), which signature is the following:

image

The second parameter (*icon_name) can be:

  • The literal path for the icon file on disk
  • The name of the icon (usually installed to /usr/share/icons/hicolor/*/apps/status)

Unfortunately, this package only really covers the first option.

Ideally, a new option could be introduced so that the iconPath could be forwarded to app_indicator_set_icon_full() exactly as we specify it, because right now if I try to do something like this:

await systemTray.initSystemTray(
  title: "system tray",
  iconPath: "myapp-tray"
);

The icon name in iconPath gets converted to an absolute path, e.g. something like /usr/share/myapp/data/flutter_assets/myapp-tray, which is undesired.

@velten-dev
Copy link

I can confirm that this is also an issue in snap packaging. Basically any Linux containerized packaging will cause this not to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants