How to get a plasmoid's parent panel orientation?

Hello! I’m writing a plasmoid, and I need to know if it’s placed on the desktop or on a panel, and the orientation of the panel if it’s in a panel. Is this possible? I have not found a single info about this on the web…

thanks in advance!

Hello, the plasmoid context property is an instance of Plasma::Applet which has the containment property.

containment has the formFactor property that describes the orientation of the plasmoid as vertically/horizontally/not at all constrained. It also has the containmentType property that describes whether the widget is on a desktop or in a panel/system tray.

Hope this can help!

1 Like