aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-08-03 16:23:43 +0200
committerDanilo M. <danix@danix.xyz>2026-08-03 16:23:43 +0200
commit212048782be680e2f99341db6c6460e59c708e7c (patch)
tree2a963993682c71e17d9dc1d165ac7ae1aa9e572c /README.md
parente6ea00dce8c74bf0d48e769734958a741ca46ef9 (diff)
downloadqtmaildir-212048782be680e2f99341db6c6460e59c708e7c.tar.gz
qtmaildir-212048782be680e2f99341db6c6460e59c708e7c.zip
feat: own the message-pane zoom and persist it
Zoom was Chromium's, not the application's: the web view handled the keys natively and never told anyone, so there was no value to save. qtmaildir now owns it. Zoom in, out and reset are real actions, in the View menu and rebindable through [keys], and the factor is persisted to the UI state file. Ctrl+wheel over the body zooms and Ctrl+middle-click resets, both filtered by ancestry from an application-level filter: the events are delivered to an internal QQuickWidget the web view creates lazily, so a filter on the view itself never sees them. The factor is clamped to 0.5 - 3.0, and NaN, infinity, zero and negative values fall back to 1.0, since a corrupt state file must not be able to leave the pane unreadable with no visible way back. Both risks the plan flagged turned out not to exist, verified by probe rather than assumed. The application QAction wins over the web view's native zoom key, so the tracked factor cannot diverge from what is on screen. And the factor survives setHtml(), so the web view is the single source of truth and needs no reapply per render. A third finding is worth recording because it produced a wrong fix first. A probe using QTest::keyClick() reported Ctrl++ as a dead binding, and a test was written asserting that. Both were wrong: Ctrl++ is exactly what the '+' key emits on an Italian layout, confirmed against the real keyboard, and it is the shipped default. Whether a symbol needs Shift is a property of the layout, not of Qt, and keyClick() reproduces neither. The test now only checks that every default parses, and the comment in defaultBindings() says not to re-derive this from synthetic input. Ctrl+= is a second binding for reset, skipped when [keys] gives it to something else. Also fixes a pre-existing bug the new config key exposed. [general] entries were read as "general/<key>", which matches nothing: QSettings' INI backend treats a section literally named [general] as its own fallback section and strips the prefix. notmuch_config had therefore never worked. Both keys are now read without it; the file format is unchanged. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Diffstat (limited to 'README.md')
-rw-r--r--README.md4
1 files changed, 4 insertions, 0 deletions
diff --git a/README.md b/README.md
index 37ea3c9..6a0ecd7 100644
--- a/README.md
+++ b/README.md
@@ -79,6 +79,10 @@ identity.
; Optional. Omit to let notmuch resolve its own config, which is what keeps
; the GUI and the CLI pointed at one database.
; notmuch_config = /home/you/.notmuch-config
+; Optional. Starting zoom of the message pane, 0.5 to 3.0. Only the starting
+; point: once you zoom with Ctrl+wheel or Ctrl+/Ctrl-, that is remembered
+; separately and this value no longer applies.
+; message_zoom = 1.0
[sync]
; Optional. Omit and the Sync button disables itself with a tooltip.