Fix weekend date colours being incorrect on theme change while app is running
This commit is contained in:
parent
1a56fa80ca
commit
f6fa0aa997
2 changed files with 4 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue