forked from trav/lintunes
v0.44.1: Preferences headings stay bold under the app's style sheet
The headings were set with setFont, which the app's own style sheet (theme.apply_theme) overrides on re-polish — bold in a bare dialog, plain in the running app. A style sheet on the heading itself wins. The test now applies the theme first, as the app does.
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
"""LinTunes — iTunes-style music library manager and player for Linux."""
|
||||
|
||||
__version__ = "0.44.0"
|
||||
__version__ = "0.44.1"
|
||||
|
||||
@@ -191,10 +191,9 @@ class PreferencesDialog(QDialog):
|
||||
the UI size changes, since the app font moves with it."""
|
||||
size = QFontInfo(QApplication.font()).pixelSize() + HEADING_EXTRA_PX
|
||||
for header in self._headings:
|
||||
font = QFont(QApplication.font())
|
||||
font.setPixelSize(size)
|
||||
font.setBold(True)
|
||||
header.setFont(font)
|
||||
# A style sheet, not setFont: the app's own style sheet (theme)
|
||||
# re-polishes widgets and would quietly put the plain font back.
|
||||
header.setStyleSheet(f"font-weight: bold; font-size: {size}px;")
|
||||
|
||||
def _show_page(self, row: int):
|
||||
self.pages.setCurrentIndex(row)
|
||||
|
||||
Reference in New Issue
Block a user