v0.74.1: the version in the status bar follows light/dark mode

It read its color from its own palette, which its stylesheet pins, so
the color it got at launch survived every theme switch — pale on pale
after going from dark to light.
This commit is contained in:
2026-10-21 21:54:07 -07:00
parent 00c3ef7f66
commit a43f0be9d8
3 changed files with 27 additions and 4 deletions
+1 -1
View File
@@ -1,3 +1,3 @@
"""LinTunes — iTunes-style music library manager and player for Linux."""
__version__ = "0.74.0"
__version__ = "0.74.1"
+4 -3
View File
@@ -7,10 +7,9 @@ git pull → the main window restarts the app on `update_applied`.
"""
from PyQt6.QtCore import Qt, QTimer, pyqtSignal
from PyQt6.QtGui import QPalette
from PyQt6.QtWidgets import QMessageBox, QPushButton
from lintunes import __version__
from lintunes import __version__, theme
class VersionButton(QPushButton):
@@ -45,7 +44,9 @@ class VersionButton(QPushButton):
def refresh_theme(self):
# Subtle but readable: the theme's text color at ~55% opacity
# (palette(mid) is too close to the light backgrounds to read).
text = self.palette().color(QPalette.ColorRole.WindowText)
# From the theme, never self.palette(): this stylesheet pins that,
# so the color it gave at launch survived every light/dark switch.
text = theme.text_color()
self.setStyleSheet(
"QPushButton { border: none; padding: 0 6px; "
f"color: rgba({text.red()}, {text.green()}, {text.blue()}, 140); }}")