Add Ctrl+= / Ctrl+- / Ctrl+0 text size shortcuts - #25
Conversation
Greptile SummaryThis follow-up adds persistent editor text-size shortcuts and completes the Qt compatibility fix by consistently requiring Qt 6.5 or newer.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| src/Main.qml | Adds persisted, bounded editor font sizing and application-wide zoom shortcuts while using the QtCore Settings type. |
| omawrite.pro | Rejects application builds using Qt versions older than the QML Settings requirement. |
| pkgbuild/PKGBUILD | Aligns Arch build-time and runtime Qt dependencies with the enforced Qt 6.5 minimum. |
| README.md | Documents the Qt 6.5 minimum required by the application. |
Reviews (3): Last reviewed commit: "Add Ctrl+= / Ctrl+- / Ctrl+0 text size s..." | Re-trigger Greptile
| @@ -1,3 +1,4 @@ | |||
| import QtCore | |||
There was a problem hiding this comment.
QtCore Settings breaks older Qt
If Omawrite runs with Qt 6.0–6.4, import QtCore does not provide the new Settings type, so Main.qml fails to instantiate and the application exits before displaying a window. The project currently declares generic, unversioned Qt 6 requirements, so either retain the pre-6.5 settings import or raise the documented and packaged minimum to Qt 6.5.
Knowledge Base Used: Desktop application shell
478d234 to
9a8cd87
Compare
Browsers and terminals train the same reflex everywhere: Ctrl+= to grow the text, Ctrl+- to shrink it, Ctrl+0 to reset. Omawrite's editor size is fixed at 20px, so the only recourse is the desktop-wide text scaling knob, which drags every other app along. Wire that reflex up: the three shortcuts adjust the editor font size (clamped 8-72px, default 20), the size persists across sessions via the existing QSettings store ([layout] editorFontSize), and the desktop text scale still multiplies on top exactly as before. The editor measure follows the font metrics, so the column keeps its 65-character width at any size. The new shortcuts are listed in the Ctrl+? dialog. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D5cK4VRT6nuLGuwEJrZvRD
9a8cd87 to
7b3658b
Compare
Browsers and terminals train the same reflex everywhere: Ctrl+= to grow the text, Ctrl+- to shrink it, Ctrl+0 to reset. Omawrite's editor size is fixed at 20px, so the only recourse today is the desktop-wide text scaling knob, which drags every other app along.
This wires that reflex up:
[layout] editorFontSize) — no new UI.On current master the measure is a fixed 65 characters, so zooming changes glyph size at constant characters per line. Paired with #24 (editor fills the window by default), Ctrl+- also packs more characters per line, matching what the same shortcut does in a terminal. The PRs are independent; if both land, the two
Settingsblocks merge trivially.Tested on Omarchy (Qt 6.11) with all three shortcuts, including persistence across restarts and the combination with #24.
🤖 Generated with Claude Code
https://claude.ai/code/session_01D5cK4VRT6nuLGuwEJrZvRD