From 1c0052a0cfd3f78eb54da266533b102ddac5bea1 Mon Sep 17 00:00:00 2001 From: Miguel Jacq Date: Mon, 10 Nov 2025 17:43:12 +1100 Subject: [PATCH] Tweaks --- CHANGELOG.md | 5 +++++ bouquin/main_window.py | 11 +++++++++-- bouquin/markdown_editor.py | 2 +- pyproject.toml | 2 +- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 367c243..b486e8c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +# 0.2.1.5 + + * Go back to font size 10 (I might add a switcher later) + * Fix bug with not syncing the right calendar date on search (History item would then be wrong too) + # 0.2.1.4 * Increase font size of normal text diff --git a/bouquin/main_window.py b/bouquin/main_window.py index 95ef7f2..2222694 100644 --- a/bouquin/main_window.py +++ b/bouquin/main_window.py @@ -758,7 +758,6 @@ class MainWindow(QMainWindow): tb.numbersRequested.connect(self._tb_numbers) tb.checkboxesRequested.connect(self._tb_checkboxes) - # these aren’t editor methods tb.historyRequested.connect(self._open_history) tb.insertImageRequested.connect(self._on_insert_image) @@ -812,6 +811,10 @@ class MainWindow(QMainWindow): date_iso = self._current_date_iso() qd = QDate.fromString(date_iso, "yyyy-MM-dd") + # Keep calendar in sync + with QSignalBlocker(self.calendar): + self.calendar.setSelectedDate(qd) + self._load_date_into_editor(qd, extra_data) self.editor.current_date = qd @@ -948,7 +951,11 @@ class MainWindow(QMainWindow): # ----------- History handler ------------# def _open_history(self): - date_iso = self._current_date_iso() + if hasattr(self.editor, "current_date"): + date_iso = self.editor.current_date.toString("yyyy-MM-dd") + else: + date_iso = self._current_date_iso() + dlg = HistoryDialog(self.db, date_iso, self) if dlg.exec() == QDialog.Accepted: # refresh editor + calendar (head pointer may have changed) diff --git a/bouquin/markdown_editor.py b/bouquin/markdown_editor.py index 9421f23..9a17010 100644 --- a/bouquin/markdown_editor.py +++ b/bouquin/markdown_editor.py @@ -264,7 +264,7 @@ class MarkdownEditor(QTextEdit): # Normal text font = QFont() - font.setPointSize(11) + font.setPointSize(10) self.setFont(font) # Install syntax highlighter diff --git a/pyproject.toml b/pyproject.toml index 117933b..fdf55ca 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "bouquin" -version = "0.2.1.4" +version = "0.2.1.5" description = "Bouquin is a simple, opinionated notebook application written in Python, PyQt and SQLCipher." authors = ["Miguel Jacq "] readme = "README.md"