Fix weekend date colours being incorrect on theme change while app is running

This commit is contained in:
Miguel Jacq 2025-11-28 15:27:49 +11:00
parent 1a56fa80ca
commit f6fa0aa997
Signed by: mig5
GPG key ID: 59B3F0C24135C6A9
2 changed files with 4 additions and 1 deletions

View file

@ -1026,10 +1026,12 @@ class MainWindow(QMainWindow):
self.editor.viewport().update()
def _apply_calendar_text_colors(self):
pal = self.palette()
pal = QApplication.instance().palette()
txt = pal.windowText().color()
fmt = QTextCharFormat()
fmt.setForeground(txt)
# Use normal text color for weekends
self.calendar.setWeekdayTextFormat(Qt.Saturday, fmt)
self.calendar.setWeekdayTextFormat(Qt.Sunday, fmt)