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
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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