| Summary: | Display of two batteries on tray widget does not look good | ||
|---|---|---|---|
| Product: | [Plasma] plasmashell | Reporter: | Jure Repinc <jlp> |
| Component: | Power and Battery widget | Assignee: | Plasma Bugs List <plasma-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | kde, kdedev, natalie_clarius |
| Priority: | NOR | ||
| Version First Reported In: | master | ||
| Target Milestone: | 1.0 | ||
| Platform: | openSUSE | ||
| OS: | Linux | ||
| Latest Commit: | https://invent.kde.org/plasma/powerdevil/-/commit/4d29cd00de35dce18c43f78eefb02f78f2059f41 | Version Fixed/Implemented In: | 6.4.0 |
| Sentry Crash Report: | |||
| Attachments: | Multiple batteries tray display bug | ||
Forgot to mention that I only get this dual batteries displayed when I use the tray wisget on itself directly on the desktop, and not in a panel A possibly relevant merge request was started @ https://invent.kde.org/plasma/powerdevil/-/merge_requests/549 Git commit 58f2c466e48562f5c78cd19990148af473bbde24 by Christoph Wolk. Committed on 26/05/2025 at 20:10. Pushed by cwo into branch 'master'. applets/batterymonitor: only show one battery icon in desktop tray The compact representation only shows one icon in most cases, but on the desktop users can resize it to be long in only one direction and short in the other to get a row or column with one icon for each connected battery. This breaks in the case of a system tray on the desktop, where applets inherit the desktop form factor, and the battery applet appears to have a variably-sized partial icon below it depending on the tray widget dimensions. (I suspect the change toward nested plasma containments in 46ada24f is involved). Instead, we also test for the ContainmentForcesSquarePlasmoids containment hint (which the tray sets), and consider the widget constrained in that case - with a forced square plasmoid, showing multiple icons doesn't make much sense anyway. FIXED-IN: 6.4.0 M +1 -0 applets/batterymonitor/package/contents/ui/CompactRepresentation.qml https://invent.kde.org/plasma/powerdevil/-/commit/58f2c466e48562f5c78cd19990148af473bbde24 Git commit 4d29cd00de35dce18c43f78eefb02f78f2059f41 by Christoph Wolk. Committed on 26/05/2025 at 20:29. Pushed by cwo into branch 'Plasma/6.4'. applets/batterymonitor: only show one battery icon in desktop tray The compact representation only shows one icon in most cases, but on the desktop users can resize it to be long in only one direction and short in the other to get a row or column with one icon for each connected battery. This breaks in the case of a system tray on the desktop, where applets inherit the desktop form factor, and the battery applet appears to have a variably-sized partial icon below it depending on the tray widget dimensions. (I suspect the change toward nested plasma containments in 46ada24f is involved). Instead, we also test for the ContainmentForcesSquarePlasmoids containment hint (which the tray sets), and consider the widget constrained in that case - with a forced square plasmoid, showing multiple icons doesn't make much sense anyway. FIXED-IN: 6.4.0 (cherry picked from commit 58f2c466e48562f5c78cd19990148af473bbde24) Co-authored-by: Christoph Wolk <cwo.kde@posteo.net> M +1 -0 applets/batterymonitor/package/contents/ui/CompactRepresentation.qml https://invent.kde.org/plasma/powerdevil/-/commit/4d29cd00de35dce18c43f78eefb02f78f2059f41 |
Created attachment 181677 [details] Multiple batteries tray display bug I have a wireless mouse (Logitech MX Vertical) and a keyboard (Logitech K800) for which the battery level is displayed in the widget. But the tray icon of the widget displaying the two batteries does not look nice, the second battery is clipped at the bottom. Operating System: openSUSE Tumbleweed 20250515 KDE Plasma Version: 6.4.80 KDE Frameworks Version: 6.15.0 Qt Version: 6.9.0 Kernel Version: 6.14.6-1-default (64-bit) Graphics Platform: Wayland Processors: 12 × AMD Ryzen 5 7600 6-Core Processor Memory: 32 GiB of RAM (31.1 GiB usable) Graphics Processor: AMD Radeon RX 7900 GRE