diff --git a/CHANGELOG.md b/CHANGELOG.md index 57202cd..ae5745c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ * Make it easier to check on or off the checkbox by adding some buffer (instead of having to precisely click inside it) * Prevent double-click of checkbox leading to selecting/highlighting it * Slightly fade the text of a checkbox line if the checkbox is checked. + * Fix weekend date colours being incorrect on theme change while app is running # 0.5.2 diff --git a/bouquin/main_window.py b/bouquin/main_window.py index 0e5e454..710fca7 100644 --- a/bouquin/main_window.py +++ b/bouquin/main_window.py @@ -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)