Summary: | Red battery icon shown for desktop pc | ||
---|---|---|---|
Product: | [Plasma] plasmashell | Reporter: | denk |
Component: | Battery Monitor | Assignee: | Kai Uwe Broulik <kde> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | kde, plasma-bugs |
Priority: | NOR | ||
Version: | 5.6.3 | ||
Target Milestone: | 1.0 | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/plasma-workspace/ed0b2043f7b7b98f889312969dd85ffe8e823d11 | Version Fixed In: | |
Sentry Crash Report: | |||
Attachments: |
Output of upower -d
Battery icon in the panel Tooltip of the battery icon Popup of the battery icon Output in battery section of Plasmaengineexplorer Fix tooltip and icon |
Description
denk
2016-05-11 06:43:19 UTC
Created attachment 98890 [details]
Output of upower -d
The icon is hidden in the popup, right? If so then it behaves as intended. Actually not, the icon is always visible in the panel (see screenshots). If this is the intended functionality, I see two problems: 1. Displaying always a red icon is misleading and suggests to the user, that there could be a problem which should be taken care of. 2. The tooltip saying "0% Wird geladen" (this is german, in english "0% charging") is misleading, too. Would it be possible to think about the intended behaviour again and find maybe some other way of visualization? Created attachment 98891 [details]
Battery icon in the panel
Created attachment 98892 [details]
Tooltip of the battery icon
Created attachment 98893 [details]
Popup of the battery icon
You're right, the battery monitor should hide in the popup and the tooltip should reflect the missing battery. Can you have a look at the "powermanagement" dataengine using plasmaengineexplorer (part of plasma-sdk)? Look in the "Battery" section (not Battery0) and see what it says for "Has Cumulative". It has two properties, one "Has Battery" which is whether there is any battery at all (your mouse/keyboard), and "Has Cumulative" whether there is a battery actually powering the device. Okay, I found the issue for the tooltip: The thing just checks if (batteries.count == 0) instead of the "Has Cumulative" property and then it says "x% charging". The mystery is now why the applet did not hide itself in the popup automatically, according to your upower output both devices correctly report "power supply: no". Please see attached screenshot for the output of Plasmaengineexplorer. I think that the reason for the always shown icon is my configuration, so maybe no mystery here. According to the settings in System Tray Settings the respective entry for powermanagement is set to Shown (which is what I want, by the way). But still one question: Is the red color on purpose on not? As already mentioned, in my opinion it should not be colored red as it is misleading. Created attachment 98909 [details]
Output in battery section of Plasmaengineexplorer
Thanks a lot. Ah, that explains why it shows up. :) I'll fix the tooltip but not sure about the icon. Perhaps have the icon black instead of red in your case? Created attachment 98910 [details]
Fix tooltip and icon
If you can, please test this patch, it will show "No batteries available" if there are none whatsoever and the generic "Battery and Brightness" title when there are only mouse/keyboard like in your case.
It will also change the icon to instead show a red outline to show a black outline with a superimposed "X" as "Batteryies unavailable" which should draw less attention to it.
http://paste.opensuse.org/images/53687952.png - is that ok? :) Git commit a19fcfaf90db8ebc6e704917448ccfde7ae0ae59 by Kai Uwe Broulik. Committed on 12/05/2016 at 12:44. Pushed by broulik into branch 'Plasma/5.6'. [Battery Monitor] Use "Has Cumulative" instead of total battery count for tray icon This fixes the battery icon errorneously showing an empty red battery on a desktop computer with a wireless mouse/keyboard; instead the "no battery" icon with a red cross is shown. CHANGELOG: Battery icon no longer errorneously reports an empty battery if computer has none Reviewed-By: mgraesslin M +1 -1 applets/batterymonitor/package/contents/ui/CompactRepresentation.qml http://commits.kde.org/plasma-workspace/a19fcfaf90db8ebc6e704917448ccfde7ae0ae59 Git commit ed0b2043f7b7b98f889312969dd85ffe8e823d11 by Kai Uwe Broulik. Committed on 12/05/2016 at 12:49. Pushed by broulik into branch 'master'. [Battery Monitor] Take "Has Cumulative" into account for tooltip This fixes showing "0% charging" on a desktop computer which has a wireless mouse/keyboard. If there is no battery whatsoever it continues to show "No batteries available" but for the aforementioned case the generic "Battery and brightness" is shown in order not to lie to the user :) CHANGELOG: Battery tooltip no longer shows "0% charging" for computers with wireless mouse/keyboard Reviewed-By: mgraesslin M +4 -0 applets/batterymonitor/package/contents/ui/batterymonitor.qml http://commits.kde.org/plasma-workspace/ed0b2043f7b7b98f889312969dd85ffe8e823d11 Thank you very much for that really fast fix! The screenshot looks good! And sorry for my late reply! |