Skip to content

feat: zoom terminal font with Ctrl + wheel and trackpad pinch - #2

Merged
ccsJoaoAzevedo merged 4 commits into
consistem:mainfrom
luis-jagella:feat/ctrl-wheel-zoom
Oct 9, 2026
Merged

ccsJoaoAzevedo merged 4 commits into
consistem:mainfrom
luis-jagella:feat/ctrl-wheel-zoom

Conversation

@luis-jagella

@luis-jagella luis-jagella commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Ctrl + mouse wheel over a terminal pane now adjusts the terminal font size, matching Ctrl+Plus/Minus. Native trackpad pinch events also change the font proportionally, without requiring Ctrl. Both use the existing 8–28 point range, save the setting and repaint the terminal. Ordinary scrolling still navigates the transcript.

Pinch events are handled over a terminal pane in the focused window. The app combines the scale factors received in a frame and prevents a zoom gesture from moving the transcript or its scrollbars. Keyboard, wheel and pinch share the font update path, so pinch scaling also respects the independent interface scale.

Platform support: egui 0.28 translates winit's native trackpad magnification into Event::Zoom on macOS. Windows trackpads that emulate pinch as Ctrl + wheel use the existing wheel path; the tests include releasing the emulated Ctrl and returning to ordinary scrolling. See egui's integration, winit's native platform support and a Windows gesture event trace. This PR does not add a native OS gesture backend for Windows/Linux, and physical trackpad testing is still needed on Windows and macOS.

Validation:

  • git diff --check passed.
  • Added unit tests for pinch in/out, multiple scale factors and invalid input, plus headless terminal tests for hover, window focus and scroll suppression. Existing wheel tests cover both directions and ordinary scrolling.
  • Windows formatting, Clippy, tests, tests with plugins and release build passed in the validation run. It tested the exact working patch subsequently committed as a6b3792. Windows executable for physical trackpad testing.
  • Previous manual Windows test at b5a647a confirmed Ctrl + wheel up/down changes the font and ordinary scrolling still navigates the transcript after printing 100 lines in PowerShell. Physical trackpad pinch testing remains pending.
  • Linux and macOS CI previously stopped at pre-existing dead-code errors in src/features/explorer_menu.rs (ROOTS, Entry and entries), also present on base main at df9caa8.

@luis-jagella
luis-jagella marked this pull request as ready for review October 8, 2026 13:05
@ccsJoaoAzevedo ccsJoaoAzevedo added bloqueado Está bloqueado, aguardar para fazer merge feat Nova funcionalidade impacto-UI Alteração com impacto em UI and removed bloqueado Está bloqueado, aguardar para fazer merge labels Oct 8, 2026
@ccsJoaoAzevedo

ccsJoaoAzevedo commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

im skeptical, need gifs

@luis-jagella

Copy link
Copy Markdown
Contributor Author

im skeptical, need gifs

GIFs of my finger scrolling, or the terminal zooming in and out?

@ccsJoaoAzevedo

Copy link
Copy Markdown
Collaborator

im skeptical, need gifs

GIFs of my finger scrolling, or the terminal zooming in and out?

yes

also, which model did this?

@ccsJoaoAzevedo

Copy link
Copy Markdown
Collaborator

also is trackpad 'pinch' motion supported? if not, make so

@luis-jagella

Copy link
Copy Markdown
Contributor Author

also, which model did this?

GPT-6.1 Sol on max reasoning

@luis-jagella luis-jagella changed the title feat: zoom terminal font with Ctrl + mouse wheel feat: zoom terminal font with Ctrl + wheel and trackpad pinch Oct 8, 2026
@luis-jagella

Copy link
Copy Markdown
Contributor Author

also, which model did this?

GPT-6.1 Sol on max reasoning

and I kept the implementation scoped to the terminal repo.

@luis-jagella

Copy link
Copy Markdown
Contributor Author

also is trackpad 'pinch' motion supported? if not, make so

added in a6b3792: native pinch on macOS, and Ctrl + wheel emulation on compatible Windows trackpads. Automated Windows validation passed; physical trackpad testing on both is still pending.

@luis-jagella

Copy link
Copy Markdown
Contributor Author

im skeptical, need gifs

xF6IyOV.mp4

@ccsJoaoAzevedo ccsJoaoAzevedo added the aprovado Está aprovado pronto para ser feito merge na versão principal label Oct 8, 2026
@ccsJoaoAzevedo
ccsJoaoAzevedo merged commit ef7d6e1 into consistem:main Oct 9, 2026
1 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

aprovado Está aprovado pronto para ser feito merge na versão principal feat Nova funcionalidade impacto-UI Alteração com impacto em UI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants