https://bugs.kde.org/show_bug.cgi?id=388995
Bug ID: 388995 Summary: Plasma::Types::FormFactor or Plasma::Types::Location miss SystemTray variant Product: frameworks-plasma Version: unspecified Platform: Other OS: Linux Status: UNCONFIRMED Severity: normal Priority: NOR Component: libplasma Assignee: notm...@gmail.com Reporter: kosse...@kde.org Target Milestone: --- An applet shown in a system tray has to deal with the special requirement of needing to be square in that container, it seems. To allow the applet to do that, it has to be able to know about its situation. But there seems no official way to query if an applet is placed in the system tray. While "AppletInterface" has properties "formFactor" or "location", none of the values of the returned types give a notion about the system tray. Perhaps the enum "Plasma::Types::FormFactor" could be extended with a new value "Square", matching "Horizontal" and "Vertical". So other applet containers which have that special requirement by design can reuse that as well (IIRC macOS docker-style panels might want that with applets, too). Workaround for now: One can peek into the containing structure and do a guess from the data seen there: ``` inTray = (plasmoid.parent !== null && (plasmoid.parent.pluginName === 'org.kde.plasma.private.systemtray' || plasmoid.parent.objectName === 'taskItemContainer')) ``` (found at https://github.com/kotelnik/plasma-applet-weather-widget/blob/master/package/contents/ui/main.qml#L146) -- You are receiving this mail because: You are watching all bug changes.