diff --git a/bouquin/main_window.py b/bouquin/main_window.py index 9f04347..480d0f8 100644 --- a/bouquin/main_window.py +++ b/bouquin/main_window.py @@ -356,6 +356,9 @@ class MainWindow(QMainWindow): self._day_change_timer.timeout.connect(self._on_day_changed) self._schedule_next_day_change() + # Ensure toolbar is definitely visible + self.toolBar.setVisible(True) + @property def editor(self) -> MarkdownEditor | None: """Get the currently active editor.""" diff --git a/bouquin/markdown_highlighter.py b/bouquin/markdown_highlighter.py index caff702..8077842 100644 --- a/bouquin/markdown_highlighter.py +++ b/bouquin/markdown_highlighter.py @@ -117,10 +117,13 @@ class MarkdownHighlighter(QSyntaxHighlighter): # Markdown syntax (the markers themselves) - make invisible self.syntax_format = QTextCharFormat() + # Use the editor background color so they blend in + bg = pal.color(QPalette.Base) + hidden = QColor(bg) + hidden.setAlpha(0) + self.syntax_format.setForeground(hidden) # Make the markers invisible by setting font size to 0.1 points self.syntax_format.setFontPointSize(0.1) - # Also make them very faint in case they still show - self.syntax_format.setForeground(QColor(250, 250, 250)) def _overlay_range( self, start: int, length: int, overlay_fmt: QTextCharFormat