View Single Post
Old 03-19-2023, 01:27 PM   #879
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 11,149
Karma: 77213683
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
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:

Click image for larger version

Name:	2023-03-19 14_26_14-JS+ GUI Tool_  Notes Viewer.png
Views:	303
Size:	35.1 KB
ID:	200484
ownedbycats is offline   Reply With Quote