From 0267fa0a5b54c824fa4f7adbb13b7ad6c06298af Mon Sep 17 00:00:00 2001 From: tectrixdev Date: Mon, 18 May 2026 14:49:09 +0200 Subject: [PATCH 1/2] Add todo, fix charging state. --- TODO.md | 7 +++++++ src/shell/taskbar/platform/battery_controller.cpp | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 TODO.md diff --git a/TODO.md b/TODO.md new file mode 100644 index 0000000..d0bf26f --- /dev/null +++ b/TODO.md @@ -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 \ No newline at end of file diff --git a/src/shell/taskbar/platform/battery_controller.cpp b/src/shell/taskbar/platform/battery_controller.cpp index 884e6c6..f4e39a2 100644 --- a/src/shell/taskbar/platform/battery_controller.cpp +++ b/src/shell/taskbar/platform/battery_controller.cpp @@ -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(); } From f415e60f772434aaa1d1300682ec2976099b6949 Mon Sep 17 00:00:00 2001 From: tectrixdev Date: Mon, 18 May 2026 14:50:55 +0200 Subject: [PATCH 2/2] Resolve markdown parsing --- TODO.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TODO.md b/TODO.md index d0bf26f..f195485 100644 --- a/TODO.md +++ b/TODO.md @@ -4,4 +4,4 @@ - [ ] Review or fix parsing of the battery, wifi, ... info - [ ] Dynamic battery icon - [ ] Fix QTWebEngine lags -- [ ] Fix layout overflow/ weird behaviour \ No newline at end of file +- [ ] Fix layout overflow/ weird behaviour