Skip to content

Allow derived bars to provide a passive background component - #11103

Open
adamritter wants to merge 1 commit into
omacom:quattrofrom
adamritter:feat/bar-background-component
Open

Allow derived bars to provide a passive background component#11103
adamritter wants to merge 1 commit into
omacom:quattrofrom
adamritter:feat/bar-background-component

Conversation

@adamritter

@adamritter adamritter commented Sep 10, 2026

Copy link
Copy Markdown

Derived bar plugins currently need to duplicate Bar.qml to change how its background is painted. Add an optional backgroundComponent so they can inherit the stock bar's widgets, layout, input handling and multi-monitor behavior while supplying their own passive background.

Each monitor gets its own disabled Loader beneath the widgets, with the bar's background color, position and orientation exposed as context properties. Null keeps the existing theme fill, and transparent mode unloads the custom background. No appearance change for existing bars. Includes a usage example and focused QML tests.

Validation:

  • Existing bar tests and new Qt 6 background tests pass (default/removal, geometry/theme/orientation, independent instances, disabled input and transparency).
  • Verified the modified Bar.qml through a derived plugin in the running desktop shell: gradient background, transparency, and return to the default fill. The local shell predates this branch, so the current PluginBarApi was included in the temporary test plugin.
  • Ran ./test/all: six shell test files fail on this machine (config, launch-about, locate, network-qr, snapper, unowned-system-paths). Re-ran each against the unmodified base and reproduced all six failures; some require the separate packaging checkout. Relevant bar tests pass.

Visual verification

Actual desktop captures of the same derived bar with the stock clock, on an empty workspace. Cropped to the bar and wallpaper immediately below it.

Custom gradient supplied through backgroundComponent

Custom gradient supplied through backgroundComponent

Transparent mode: custom background unloaded

Transparent mode: custom background unloaded

Component removed: stock theme fill restored

Component removed: stock theme fill restored

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

Successfully merging this pull request may close these issues.

1 participant