AvengeMedia / AvengeMedia/DankMaterialShell
Active-state bar icons (battery / Wi-Fi / Bluetooth) use Theme.primary and become invisible when Bar Opacity and Widget Opacity are 0%
- Dominant language
- QML
- Stars
- 8.1k
- Forks
- 515
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 102
Description
### Compositor
Niri
### Distribution
Fedora
### If Other, please specify
_No response_
### Select your Installation Method
Distro Packaging
### Was this your original Installation method?
Yes
### If no, specify
_No response_
### dms doctor -vC
Click to expand
```
System Health Check
──────────────────────────────────────
System
● Operating System ····· Fedora Linux 44 (Forty Four)
└─ ID: fedora, Version: 44, Arch: amd64
● Architecture ········· amd64
● Display Server ······· Wayland
└─ WAYLAND_DISPLAY=wayland-1
Versions
● DMS CLI ·············· dms v1.6.0
└─ /usr/bin/dms
● Quickshell ··········· Quickshell 0.3.1 (revision , distributed by Fedora COPR (avengemedia/quickshell))
└─ /usr/bin/qs
● DMS Shell ············ v1.6.0
└─ /run/user/1000/danklinux-shell/
Installation
● DMS Configuration ···· Found
● shell.qml ············ Present
○ Install Type ········· Unknown
Compositor
● niri ················· 26.04
○ Active ··············· niri
● Background Blur ······ Supported (ext-background-effect-v1)
Quickshell Features
● Polkit / IdleMonitor / IdleInhibitor / ShortcutInhibitor / BackgroundBlur — all Available
Optional Features
● accountsservice, power-profiles-daemon, logind, cups-pk-helper — Available
○ I2C/DDC ·············· No monitors detected
● qt6-imageformats ····· Installed (5 formats)
● kimageformats ········ Installed (4 formats)
● Terminal ············· kitty
● Network ·············· NetworkManager
● matugen ·············· Installed
● cava, danksearch, dankcalendar, adw-gtk3 — Installed
○ khal, fprintd ········ Not installed
Config Files
● settings.json, plugin_settings.json, session.json, dms-colors.json — Present
○ clsettings.json ······ Not yet created
Services
● dms.service ·········· enabled, active
● greetd ··············· enabled
Environment
○ QT_QPA_PLATFORMTHEME · qt6ct
● qt6ct plugin (Qt6) ··· Installed
● XDG_MENU_PREFIX ······ plasma- (menu file not found)
Fonts
● Normal Font ·········· Rubik
● Monospace Font ······· JetBrainsMono Nerd Font Mono
──────────────────────────────────────
1 warning(s), 37 ok
```
### Description
On a DankBar configured with Bar Opacity 0% and Widget Opacity 0%, the bar icons that signal an active state render in Theme.primary and become effectively invisible against the wallpaper, while every other bar icon stays readable because it renders in Theme.surfaceText.
Both sliders are first-class, officially supported options — Settings → DankBar → Appearance → Opacity, minimum: 0 on each. At 0% neither the bar nor the widget pills paint any background, so icons sit directly on the wallpaper.
Confirmed simultaneously on my bar:
* battery while plugged in
* Wi-Fi while connected
* Bluetooth while connected
Measured from the rendered bar:
* Theme.primary: #006a6a
* wallpaper behind the icons: #2b6b74
* contrast: 1.06:1
Other bar icons use Theme.surfaceText (#161d1d) and remain visibly distinct.
The same #006a6a over the light surfaceContainerHigh (#e9efee) gives 5.52:1, so the primary color itself is fine when rendered against the surface it was designed for.
This is not limited to the dynamic theme. Dynamic is simply the worst case because primary is derived from the wallpaper itself.
Relevant code on current master:
* Modules/DankBar/Widgets/ControlCenterButton.qml:140 — connected network uses Theme.primary
* ControlCenterButton.qml:714 / :529 — connected Bluetooth uses Theme.primary
* Modules/DankBar/Widgets/Battery.qml:211 / :158 — plugged-in or charging battery uses Theme.primary
* Common/Theme.qml:426 — Theme.primary
* Common/Theme.qml:1482 — widgetIconColor resolves to surfaceText
* Modules/DankBar/DankBarBody.qml:437-438 — transparent bar background
* Modules/Plugins/BasePill.qml:109-117 — transparent widget background
A possible direction would be an active-icon color role that keeps the accent when there is an effective background to contrast against, but falls back to a contrast-safe color when the bar/widget background is transparent. The exact implementation is up to the maintainers.
Workaround:
Raising Widget Opacity restores legibility. On this wallpaper:
* 40% → 2.25:1
* 60% → 3.12:1
* 85% → 4.5:1
* 100% → 5.52:1
Related but separate:
#3298 concerns Theme.error and has a different root cause.
### Expected Behavior
Active-state bar icons stay distinguishable from whatever is behind them at any supported bar/widget opacity, the same way Theme.surfaceText icons already do.
### Steps to Reproduce
1. Light mode, theme `dynamic`, and a wallpaper with a mid-tone dominant color.
2. Settings → DankBar → Appearance → Opacity: set Bar Opacity 0% and Widget Opacity 0%.
3. Put the battery widget and control center widget on the bar; plug in the charger, connect Wi-Fi, and connect a Bluetooth device.
4. Observe that battery, Wi-Fi and Bluetooth become nearly invisible while other icons remain legible.
### Error Messages/Logs
None. This is purely a rendering/color issue; nothing is logged.
### Screenshots/Recordings
Contributor guide
Research direction
Start with Modules/DankBar/Widgets/ControlCenterButton.qml and Battery.qml at the cited active-state color uses, then trace Common/Theme.qml and widgetIconColor. Reproduce with Bar Opacity and Widget Opacity both at 0% using the listed connected states. Done means active battery, Wi-Fi, and Bluetooth icons remain distinguishable against the wallpaper while retaining appropriate contrast on visible surfaces.
Written by the indexing model from the issue text.
Assessment
- Domain
- design, desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 76/100