mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
Fix a regression in 4.10 that prevented dark mode from working because of a change in Qt behavior
This commit is contained in:
parent
69357d7a73
commit
e0b74b5082
@ -1069,8 +1069,10 @@ class Application(QApplication):
|
||||
self.ignore_palette_changes = True
|
||||
self.setPalette(pal)
|
||||
# Needed otherwise Qt does not emit the paletteChanged signal when
|
||||
# appearance is changed.
|
||||
self.setAttribute(Qt.AA_SetPalette, False)
|
||||
# appearance is changed. And it has to be after current event
|
||||
# processing finishes as of Qt 5.14 otherwise the palette change is
|
||||
# ignored.
|
||||
QTimer.singleShot(1000, lambda: QApplication.instance().setAttribute(Qt.AA_SetPalette, False))
|
||||
self.ignore_palette_changes = False
|
||||
|
||||
def on_palette_change(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user