Skip to content

Add Ctrl+= / Ctrl+- / Ctrl+0 text size shortcuts - #25

Open
x3m wants to merge 1 commit into
omacom:masterfrom
x3m:font-size-shortcuts
Open

Add Ctrl+= / Ctrl+- / Ctrl+0 text size shortcuts#25
x3m wants to merge 1 commit into
omacom:masterfrom
x3m:font-size-shortcuts

Conversation

@x3m

@x3m x3m commented Aug 25, 2026

Copy link
Copy Markdown

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:

  • Ctrl+= / Ctrl++ grows, Ctrl+- shrinks, Ctrl+0 resets to the current 20px default (clamped 8–72px).
  • The size persists across sessions via the existing QSettings store ([layout] editorFontSize) — no new UI.
  • The desktop text scale still multiplies on top exactly as before.
  • The shortcuts are listed in the Ctrl+? dialog.

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 Settings blocks 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

@greptile-apps

greptile-apps Bot commented Aug 25, 2026

Copy link
Copy Markdown

Greptile Summary

This follow-up adds persistent editor text-size shortcuts and completes the Qt compatibility fix by consistently requiring Qt 6.5 or newer.

  • Adds Ctrl+=, Ctrl+-, and Ctrl+0 shortcuts with an 8–72px persisted editor font-size setting.
  • Preserves desktop text scaling as a multiplier over the selected editor size.
  • Enforces Qt 6.5+ in qmake configuration, Arch build/runtime dependencies, and documentation.
  • Updates the keyboard-shortcut reference dialog.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

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

Comment thread src/Main.qml
@@ -1,3 +1,4 @@
import QtCore

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 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

Comment thread README.md
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant