diff options
| author | blasty <blasty@local> | 2026-07-24 16:07:51 +0200 |
|---|---|---|
| committer | blasty <blasty@local> | 2026-07-24 16:07:51 +0200 |
| commit | 5c683b3e91bc3e8c3db3efc755c9a57b6d3298fd (patch) | |
| tree | 2ae503c197092436c6b66c5a802d5db76f6ebd29 /idatui | |
| parent | hex: freeze the cursor's screen position on scroll (not clamp-to-edge) (diff) | |
| download | ida-tui-5c683b3e91bc3e8c3db3efc755c9a57b6d3298fd.tar.gz ida-tui-5c683b3e91bc3e8c3db3efc755c9a57b6d3298fd.tar.xz ida-tui-5c683b3e91bc3e8c3db3efc755c9a57b6d3298fd.zip | |
ux: omit the splash logo when the terminal is too small for it
The logo.ans art is 33 rows tall; on a short/narrow terminal the auto-height
loading box would overflow and clip both the art and the title/note/help
(center-aligned, so the useful text scrolls off top and bottom). LoadingScreen
now only mounts the logo when app.size fits it plus the chrome (height >= lines+9
and width >= 64); otherwise it falls back to the text-only overlay.
Verified across sizes: 90x44 -> shown, 90x30 -> omitted (too short), 50x44 ->
omitted (too narrow), 120x50 -> shown.
Diffstat (limited to 'idatui')
| -rw-r--r-- | idatui/app.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/idatui/app.py b/idatui/app.py index 446c364..ac55864 100644 --- a/idatui/app.py +++ b/idatui/app.py @@ -2063,8 +2063,14 @@ class LoadingScreen(ModalScreen): def compose(self) -> ComposeResult: with Vertical(id="loading-box"): logo = _load_logo() + # Only show the splash art when the terminal can fit it plus the + # title/note/help + box chrome; otherwise fall back to a text-only + # overlay so nothing important is clipped off a small screen. if logo is not None: - yield Static(logo, id="loading-logo") + sz = self.app.size + n = len(logo.split("\n")) + if sz.height >= n + 9 and sz.width >= 64: + yield Static(logo, id="loading-logo") yield Static(f"\u23f3 loading {self._title}", id="loading-title") yield Static(self._note, id="loading-note") yield Static("first open of a big binary can take a while \u00b7 " |
