Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Todo

- [x] Fix charging state always in "charging"
- [ ] Review or fix parsing of the battery, wifi, ... info
- [ ] Dynamic battery icon
- [ ] Fix QTWebEngine lags
- [ ] Fix layout overflow/ weird behaviour
3 changes: 2 additions & 1 deletion src/shell/taskbar/platform/battery_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ void BatteryController::refresh()
next.percentage = match.captured(1).toInt();
}
} else if (trimmed.startsWith(QStringLiteral("state:"))) {
next.charging = trimmed.contains(QStringLiteral("charging"));
next.charging = !trimmed.contains(QStringLiteral("discharging"));
// When not charging, it displays discharging, which contains charging, therefore it would always show charging status as charging. This fixes that issue by doing the reverse.
} else if (trimmed.startsWith(QStringLiteral("time to empty:")) || trimmed.startsWith(QStringLiteral("time to full:"))) {
next.timeRemaining = trimmed.section(':', 1).trimmed();
}
Expand Down