From 4a5acabc19cd0bdfe7484974f1ee039f076b670f Mon Sep 17 00:00:00 2001 From: uncor3 Date: Mon, 8 Dec 2025 21:21:45 +0000 Subject: [PATCH] fix text color --- src/deviceinfowidget.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/deviceinfowidget.cpp b/src/deviceinfowidget.cpp index a3c68df..2ef7417 100644 --- a/src/deviceinfowidget.cpp +++ b/src/deviceinfowidget.cpp @@ -143,10 +143,12 @@ DeviceInfoWidget::DeviceInfoWidget(iDescriptorDevice *device, QWidget *parent) m_chargingStatusLabel = new QLabel(device->deviceInfo.batteryInfo.isCharging ? "Charging" : "Not Charging"); + m_chargingStatusLabel->setStyleSheet( device->deviceInfo.batteryInfo.isCharging ? QString("color: %1;").arg(COLOR_GREEN.name()) - : "color: white;"); + : QString("color: %1;") + .arg(qApp->palette().color(QPalette::WindowText).name())); // Create the layout without a parent widget QHBoxLayout *chargingLayout = new QHBoxLayout();