Let plugins drop their bar pill with a "background" setting

A plugin bar widget whose settings say background: "transparent" sits
straight on the bar, like the tray's transparent background.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
mxandClaude Opus 5.5 committed 2026-11-29 14:41:28 +01:00
1 parent 4f078bdf5c
commit 68281b0874
1 file changed
+6
+6
View File
@@ -23,6 +23,12 @@ GlassPill {
// Omarchy widgets report emptiness through hasVisualContent instead.
readonly property var widgetObject: loader.item
readonly property bool shown: !!widget && (noctalia || widgetObject.hasVisualContent !== false) && widget.implicitWidth > 0
// A plugin can offer a "background" setting; "transparent" drops the
// pill so its widget sits straight on the bar, like the tray's option.
readonly property bool bare: settings.background === "transparent"
color: bare ? "transparent" : Qt.alpha(Theme.surface, surfaceOpacity)
border.width: bare ? 0 : 1
plain: bare
implicitHeight: ModuleRegistry.pillHeight
implicitWidth: shown ? Math.ceil(widget.implicitWidth) + 8 : 0
visible: implicitWidth > 0