One more fix for code blocks in dark system mode on macOS

This commit is contained in:
Miguel Jacq 2025-11-12 10:21:12 +11:00
parent b6e603b2bf
commit 8d5f8b6951
Signed by: mig5
GPG key ID: 59B3F0C24135C6A9

View file

@ -69,7 +69,7 @@ class MarkdownHighlighter(QSyntaxHighlighter):
else:
# Light mode: keep the existing light gray
bg = QColor(245, 245, 245)
fg = pal.color(QPalette.Text)
fg = pal.color(0, 0, 0) # avoiding using QPalette.Text as it can be white on macOS
self.code_block_format.setBackground(bg)
self.code_block_format.setForeground(fg)