diff options
| author | blasty <blasty@local> | 2026-08-07 23:56:34 +0200 |
|---|---|---|
| committer | blasty <blasty@local> | 2026-08-07 23:56:34 +0200 |
| commit | 64a8e28f0ad314a1f9a1ae58ab5e42f36bb4787a (patch) | |
| tree | 4425f07c877d4eb5f2e68115fd6c262c22c89a3c /docs | |
| parent | Centre modals with a rule about modals, not a list of them (diff) | |
| download | ida-tui-64a8e28f0ad314a1f9a1ae58ab5e42f36bb4787a.tar.gz ida-tui-64a8e28f0ad314a1f9a1ae58ab5e42f36bb4787a.tar.xz ida-tui-64a8e28f0ad314a1f9a1ae58ab5e42f36bb4787a.zip | |
Reported as "the splash logo stopped rendering". It had not stopped: the
splash asks for the artwork's NATURAL size and shows nothing when that
does not fit, and the artwork needs 31 rows plus 10 of box chrome. A pane
in a split zellij window is 31 rows — one row short of the 41 it wanted —
so the logo silently disappeared. Traced with $IDATUI_KITTY_LOG in the
real session:
compose: supported=True app.size=Size(width=159, height=31)
cells=60x23 fits=False
The terminal scales an image into whatever cell box it is placed in
(`c=`/`r=` on the placement), so there was never a reason for
all-or-nothing. `logo_cells(max_rows)` now fits the art to the room left
after the box's furniture, and the same number reserves the cells and
sizes the placement, so a resize needs no relayout. In that same 31-row
pane it now draws 55x21 instead of nothing.
Two things fixed on the way:
* The chrome constant was one row optimistic (`rows + 9` where the box
measures 10: border 2, padding 2, art margin 1, title 1, note 1+1,
help 1+1). At exactly the old threshold the help line was clipped off
the bottom.
* `_fits` conflated "is the terminal big enough" with "is the artwork the
right size", which is what made the image path inherit the block art's
all-or-nothing behaviour. The block art genuinely cannot scale (it is
half-block cells, 26 rows) and still falls back to the text splash;
the image no longer does.
`splash_scaling` pins it at 31, 30 and 44 rows: the logo is drawn, it is
scaled to the room, the box is never clipped, and a big pane still gets
the natural size.
905 passed, 0 failed.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/TEXTUAL_NOTES.md | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/docs/TEXTUAL_NOTES.md b/docs/TEXTUAL_NOTES.md index 10df669..aba84ae 100644 --- a/docs/TEXTUAL_NOTES.md +++ b/docs/TEXTUAL_NOTES.md @@ -53,6 +53,15 @@ Hard-won Textual behaviour and the patterns this app relies on. Pairs with `build_byte_to_codepoint_dict`, so character offsets smear on non-ASCII), and a `TextAreaTheme` that sets `base_style` overrides the widget's CSS colours — ours sets only `syntax_styles` so the editor keeps the app's background. +- **Fixed-size splash art disappears instead of shrinking.** The kitty image is + scaled by the terminal into whatever cell box you place it in (`c=`/`r=`), so + sizing it to the artwork's natural height and then asking "is there room?" is + all-or-nothing — a 31-row zellij pane was ONE row short of the 41 the splash + wanted, and the logo silently vanished. Size the art to the room instead + (`logo_cells(max_rows)`), and keep the chrome constant honest: + `LOGO_CHROME_ROWS = 10` is border 2 + padding 2 + the art's margin 1 + title 1 + + note 1+1 + help 1+1, which the old `rows + 9` under-counted by one, so at + exactly the threshold the help line was clipped off the bottom. - **Centre modals with a rule, not a list.** `ModalScreen { align: center middle; }` matches subclasses, so every dialog inherits it and the next one is centred for free. Naming the screens instead (`SymbolPalette, StringsPalette, …`) is |
