Skip to content

Commit 7356e57

Browse files
authored
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
1 parent acf2b9b commit 7356e57

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

linux/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,3 +83,5 @@ install(TARGETS librepods
8383
)
8484
install(FILES assets/me.kavishdevar.librepods.desktop
8585
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications")
86+
install(FILES assets/librepods.png
87+
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/512x512/apps")

linux/assets/librepods.png

77.5 KB
Loading

linux/trayiconmanager.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ void TrayIconManager::updateIconFromBattery(const QString &status)
127127
QPixmap pixmap(32, 32);
128128
pixmap.fill(Qt::transparent);
129129
QPainter painter(&pixmap);
130-
painter.setPen(QApplication::palette().color(QPalette::WindowText));
130+
painter.setPen(Qt::white);
131131
painter.setFont(QFont("Arial", 12, QFont::Bold));
132132
painter.drawText(pixmap.rect(), Qt::AlignCenter, QString::number(minLevel) + "%");
133133
painter.end();
@@ -141,4 +141,5 @@ void TrayIconManager::onTrayIconActivated(QSystemTrayIcon::ActivationReason reas
141141
{
142142
emit trayClicked();
143143
}
144-
}
144+
}
145+

0 commit comments

Comments
 (0)