In notes_viewer_dialog.py:
Code:
self.is_dark_mode = False
if iswindows:
if windows_is_system_dark_mode_enabled():
self.is_dark_mode = True
elif not iswindows and not ismacos:
if linux_is_system_dark_mode_enabled():
self.is_dark_mode = True
Code:
def set_text_background_color(self):
if not self.is_dark_mode:
self.plain_qtextedit.setTextBackgroundColor(color_white)
self.markdown_qtextedit.setTextBackgroundColor(color_white)
self.html_qtextbrowser.setTextBackgroundColor(color_white)
These lines check the
system theme, rather than which theme Calibre is using (
QApplication.instance().is_dark_theme).
When Windows is using light mode but Calibre is in dark mode, the colours do weird things: