Summary: | Tooltip and popup of battery applet show different battery levels | ||
---|---|---|---|
Product: | [Plasma] plasmashell | Reporter: | Patrick Silva <bugseforuns> |
Component: | Power and Battery widget | Assignee: | Kai Uwe Broulik <kde> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | nate, plasma-bugs |
Priority: | NOR | ||
Version: | master | ||
Target Milestone: | 1.0 | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | https://commits.kde.org/plasma-workspace/ddefcfb7c901dc31a356fc1089d69122ac89f9e4 | Version Fixed In: | |
Sentry Crash Report: | |||
Attachments: |
screen recording
Mismatched percentages |
If you enable the percentage display on the tray icon, which number does it show? (In reply to Nate Graham from comment #1) > If you enable the percentage display on the tray icon, which number does it > show? Tray icon and its popup show the same battery level. Tooltip shows another (and incorrect) battery level. Both tray icon and tooltip use pmSource.data.Battery.Percent - so I don't see why the icon would be correct and the tooltip not. If any, the icons hould be wrong as well :/ Just reproduced this myself! :( Created attachment 128238 [details]
Mismatched percentages
The tooltip is accessing the information using `pmSource.data.Battery.Percent` rather than `pmSource.data["Battery"]["Percent"]` which is used by the pop-up and the tray icon overlay. But switching the tooltip to using the same access method fix it. How odd. Could it be an issue where the toolTipMainText: condition doesn't get updated when the value changes due the complex logic in it? Will be fixed with https://phabricator.kde.org/D29633 Git commit ddefcfb7c901dc31a356fc1089d69122ac89f9e4 by Kai Uwe Broulik. Committed on 12/05/2020 at 13:30. Pushed by broulik into branch 'master'. [Battery Monitor] Fix toolTipMainText when plugged in It only had a return value for "NoCharge" since the else case was only for not plugged in, resulting in it effectively returning undefined, throwing during assignment "cannot assign [undefined] to string" and leaving whatever text happened to be shown last. Differential Revision: https://phabricator.kde.org/D29633 M +8 -4 applets/batterymonitor/package/contents/ui/batterymonitor.qml https://commits.kde.org/plasma-workspace/ddefcfb7c901dc31a356fc1089d69122ac89f9e4 |
Created attachment 128100 [details] screen recording STEPS TO REPRODUCE 1. disconnect the ac adapter from your laptop 2. use your device during a few minutes/hours or just wait for the battery level to decrease 3. reconnect the ac adapter to your device and wait for your battery to be charged 4. observe the battery level hovering over the battery applet in systray. Also click on such applet and observe the percentage of "Charging". OBSERVED RESULT Tooltip and popup of battery applet show different battery levels. Watch the attached screen recording please. EXPECTED RESULT Tooltip and popup of battery applet should show the same battery level SOFTWARE/OS VERSIONS Operating System: KDE neon Unstable Edition KDE Plasma Version: 5.18.80 KDE Frameworks Version: 5.70.0 Qt Version: 5.14.2