To test, I changed the lines to
Code:
def set_text_background_color(self):
if not QApplication.instance().is_dark_theme:
self.plain_qtextedit.setTextBackgroundColor(color_white)
self.markdown_qtextedit.setTextBackgroundColor(color_white)
self.html_qtextbrowser.setTextBackgroundColor(color_white)
It fixed it
EDIT: wrong screenshot, hang on
EDIT: Replaced screenshot
ANOTHER EDIT: Additional testing: It also works as expected using Calibre in System default with Windows in dark mode.