Skip to content

About's image fills the dialog on a Retina screen (#333) - #346

Merged
jamescrosswell merged 3 commits into
mainfrom
milestone-333-retina-cell-size
Sep 29, 2026
Merged

jamescrosswell merged 3 commits into
mainfrom
milestone-333-retina-cell-size

Conversation

@a-team-app

@a-team-app a-team-app Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

On a Retina screen in iTerm2, About (tui) now draws its artwork filling the space reserved for it, instead of a quarter-size image with a blank band beneath. Non-Retina iTerm2 and other sixel terminals are unchanged.

iTerm2's ReportCellSize reply carries a scale factor after the cell's size in points; we now multiply by it. A scale outside 1–4 is clamped, and a missing or unreadable one counts as 1.

Closes #333

a-team try tuicode 346

…ina (#333)

ReportCellSize replies in points plus a scale factor; we dropped the scale
and drew sixels at half size in each direction on a 2.0 display. Multiply
by it, clamped to 1-4, defaulting to 1 when older iTerm2s omit it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@a-team-app
a-team-app Bot marked this pull request as ready for review September 29, 2026 09:53
@jamescrosswell

Copy link
Copy Markdown
Contributor

That works as long as I don't move the terminal between a retina and a non-retina screen.

  • If I open TuiCode on a retina screen and view the about dialog, all is well... however if I then move the app to my main monitor the image in the about dialogue is way too big.
  • Conversely, if I open it first on my main monitor, all is well... but if I then move it to the retina display, it's way too small.

Is there any way of detecting the monitor at the time the about dialog is opened (rather than at app startup)?

a-team-app Bot and others added 2 commits September 29, 2026 23:40
Moving the window between a Retina and a non-Retina screen changes how many
pixels a cell is, so a size measured at startup drew the image too big or too
small afterwards. Sixel support still comes from DA1 once at startup.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@a-team-app

a-team-app Bot commented Sep 29, 2026

Copy link
Copy Markdown
Contributor Author

Yes. Sixel support is still detected once at startup, but the cell size is now measured every time About opens, so it matches the screen the window is on at that moment. You'll see the spinner for a moment while the terminal answers.

Moving the window while About is already open won't resize it. Close it and reopen it.

@jamescrosswell
jamescrosswell merged commit 207625e into main Sep 29, 2026
24 checks passed
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.

About's image fills the dialog on a Retina screen

1 participant