Skip to content

fix(kde): tint panel icon by battery level and unbreak the Lighting page - #16

Merged
vdemonchy merged 1 commit into
mainfrom
fix/plasmoid-icon-tint-and-rgb-config
Jun 10, 2026
Merged

vdemonchy merged 1 commit into
mainfrom
fix/plasmoid-icon-tint-and-rgb-config

Conversation

@vdemonchy

Copy link
Copy Markdown
Owner

Summary

Fixes three issues reported on a live Plasma 6 (Fedora KDE) session:

  • Panel icon never changed color with battery level — input-gaming-symbolic is a GNOME icon name; Breeze doesn't ship it and the icon lookup silently falls back to the full-color input-gaming (devices/64), which cannot be recolored, so the tint no-opped with nothing in the logs. The compact representation now uses Breeze's input-gamepad-symbolic with fallback: "input-gaming-symbolic" for KDE setups running GNOME icon themes, plus isMask: true so Kirigami applies the tint regardless of theme.
  • RGB/Lighting settings page never opened (Component is not ready, ConfigLighting.qml:130 Cannot assign to non-existent property "parent") — Qt 6's QtQuick.Dialogs.ColorDialog descends from QObject, not Item, so it has no parent property and the invalid binding aborted creation of the entire page. Dropped the assignment; the dialog picks up its window from its QML parent object automatically.
  • Setting initial properties failed: ... cfg_rgb* journal warnings — Plasma pushes every config key as an initial property to every config page; each page now declares the keys owned by the other page. (The identical warnings from KDE's own ConfigurationShortcuts/AboutPlugin pages are upstream shell behavior and can't be silenced from the plasmoid.)

Test plan

  • qml6 harness (with stub Qt.labs.platform / plasma5support modules) reproduces the exact journal error on the old ConfigLighting.qml and instantiates both config pages cleanly after the fix
  • grabToImage pixel test on Kirigami 6.17 with GPU rendering: color alone → 0/2083 icon pixels tinted; color + isMask: true → 2083/2083 tinted; the exact fixed icon config (source + fallback + isMask) renders fully tinted in battery green #2ec27e
  • qmllint on all touched QML files: no new warnings (only pre-existing import-path noise on this non-Plasma dev machine)
  • Confirm on a live Plasma session: icon turns green/yellow/red by charge level, Lighting page opens with color pickers

🤖 Generated with Claude Code

Three fixes for issues reported on a live Plasma 6 session:

- The panel icon never changed color: input-gaming-symbolic is a GNOME
  icon name. Breeze doesn't have it and silently falls back to the
  full-color input-gaming, which cannot be recolored. Use Breeze's
  input-gamepad-symbolic (falling back to input-gaming-symbolic on
  GNOME icon themes) and set isMask so Kirigami applies the tint
  regardless of theme. Verified with a grabToImage pixel test on
  Kirigami 6.17: color alone does not tint, color + isMask does.

- The Lighting config page failed to load ("Component is not ready"):
  Qt 6 ColorDialog is not an Item and has no parent property, so
  `parent: page` aborted creation of the whole page. Reproduced the
  exact journal error in a qml6 harness; the page instantiates cleanly
  after dropping the assignment.

- Plasma pushes every config key as an initial property to every
  config page and warns about missing ones; declare each page's
  missing cfg_* properties to silence the journal noise.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions github-actions Bot added the bug Something isn't working label Jun 10, 2026
@vdemonchy
vdemonchy merged commit 3beb5d7 into main Jun 10, 2026
1 check passed
@vdemonchy
vdemonchy deleted the fix/plasmoid-icon-tint-and-rgb-config branch June 10, 2026 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant