Skip to content

TrayIcon: optional text label beside the icon #22639

Open

Description

@tipa

Is your feature request related to a problem? Please describe.

Applications such as timers can benefit from showing short text beside the tray icon—for example, an elapsed duration—without opening the menu. TrayIcon does not expose this.

macOS supports text through NSStatusItem.button.title. On Linux, the Ubuntu AppIndicator extension for GNOME Shell supports the optional AppIndicator label, but Avalonia’s D-Bus tray implementation does not export it.

Describe the solution you'd like

An optional text property on TrayIcon:

  • macOS: set the status item button’s title.
  • Linux: expose XAyatanaLabel and XAyatanaLabelGuide on org.kde.StatusNotifierItem, and emit XAyatanaNewLabel(s label, s guide) when they change. The guide is an optional width hint.
  • Unsupported platforms, including Windows: no effect.

Null or empty removes the text. Existing icon, tooltip and menu behavior should remain unchanged.

Describe alternatives you've considered

No response

Additional context

Display depends on the Linux tray host. The Ubuntu AppIndicator extension supports labels; stock GNOME Shell has no tray without an extension. Applications must not assume the label is visible, and should make equivalent information available elsewhere.

The GNOME extension can also use the label as the item’s accessible name when no IconAccessibleDesc is supplied.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions