Skip to content

Modules inherit a icon label - #5181

Open
oisanjaya wants to merge 9 commits into
Alexays:masterfrom
oisanjaya:modules-inherit-AIconLabel
Open

oisanjaya wants to merge 9 commits into
Alexays:masterfrom
oisanjaya:modules-inherit-AIconLabel

Conversation

@oisanjaya

Copy link
Copy Markdown
Contributor

What does this PR do?
As 31dfd44 has been merged, now modules can migrated to inherit AIconLabel

affected modules: cpu, idle_inhibitor, inhibitor, memory, network, temperature, and custom

Checklist

  • [✅] Code is formatted with clang-format
  • [✅] Builds locally (ninja -C build)
  • [✅] Man page updated for any new/changed user-facing option (man/)
  • [✅] Tested against the affected module(s)

@bokicoder

Copy link
Copy Markdown

There are the following issues:

  • I have to set icon: true for every module; otherwise, the icon visibility of some modules behaves abnormally — icons fail to render entirely, appear intermittently, or toggle back and forth regularly.
  • No tooltip pops up when hovering over icons.

@oisanjaya

Copy link
Copy Markdown
Contributor Author

There are the following issues:

* I have to set `icon: true` for every module; otherwise, the icon visibility of some modules behaves abnormally — icons fail to render entirely, appear intermittently, or toggle back and forth regularly.

* No tooltip pops up when hovering over icons.

fixed.

@bokicoder

Copy link
Copy Markdown

The following modules also work well with AIconLabel, and there may be more.

  • backlight
  • mpris
  • power_profiles_daemon
  • wireplumber

@oisanjaya

Copy link
Copy Markdown
Contributor Author

i think so as well, but since i don't use those modules i don't update those modules just yet. let's see if there are any more problems or even this PR gonna merged

@oisanjaya
oisanjaya force-pushed the modules-inherit-AIconLabel branch from 0851e1a to dcead83 Compare November 21, 2026 13:15
visibility:

- ALabel last_label_markup_ & last_tooltip_markup_ are protected as
  AIconLabel need it
- ALabel setLabelMarkup & setTooltipMarkup are virtual so AIconLabel can
  override it
@oisanjaya

Copy link
Copy Markdown
Contributor Author

too many conflicts with upstream, converting to draft

@oisanjaya
oisanjaya marked this pull request as draft November 21, 2026 13:53
@oisanjaya
oisanjaya force-pushed the modules-inherit-AIconLabel branch from dcead83 to e4bcbfc Compare November 21, 2026 16:34
@oisanjaya

oisanjaya commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor Author

This PR is ready to review. In this PR:

  • rebase to master branch
  • set cpu, idle_inhibitor, inhibitor, memory, network, temperature, and custom as descendant of AIconLabel
  • enable embedded icons in modules by setting embedded_icon_enabled_
  • address @bokicoder tooltip issue by override ALabel's setTooltipMarkup with AIconLabel own implementation
  • address @bokicoder icon visibility issue by caching iconLabel if not empty

@oisanjaya
oisanjaya marked this pull request as ready for review November 21, 2026 18:19
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.

2 participants