linux: Use white text for tray icon battery percentage (#243)

* docs: add troubleshooting section for media controls not working

* always use white text for the battery percentage in the system tray icon which matches what other applications like Bluetooth battery indicators do in Plasma

* init librepods asset

* remove update script for librepods
This commit is contained in:
Mathias S.
2025-11-13 10:16:18 +01:00
committed by GitHub
parent acf2b9bea7
commit 7356e57878
3 changed files with 5 additions and 2 deletions

View File

@@ -83,3 +83,5 @@ install(TARGETS librepods
)
install(FILES assets/me.kavishdevar.librepods.desktop
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications")
install(FILES assets/librepods.png
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/512x512/apps")

BIN
linux/assets/librepods.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

View File

@@ -127,7 +127,7 @@ void TrayIconManager::updateIconFromBattery(const QString &status)
QPixmap pixmap(32, 32);
pixmap.fill(Qt::transparent);
QPainter painter(&pixmap);
painter.setPen(QApplication::palette().color(QPalette::WindowText));
painter.setPen(Qt::white);
painter.setFont(QFont("Arial", 12, QFont::Bold));
painter.drawText(pixmap.rect(), Qt::AlignCenter, QString::number(minLevel) + "%");
painter.end();
@@ -141,4 +141,5 @@ void TrayIconManager::onTrayIconActivated(QSystemTrayIcon::ActivationReason reas
{
emit trayClicked();
}
}
}