Skip to content

#671: #592-C: GTK live path — paint the remaining chrome (find_replace, tab_switcher, separated_status_line, tab_tooltip) - #686

Merged
JDonaghy merged 2 commits into
developfrom
issue-671-592-c-gtk-live-path-paint-the-remaining
Aug 28, 2026
Merged

#671: #592-C: GTK live path — paint the remaining chrome (find_replace, tab_switcher, separated_status_line, tab_tooltip)#686
JDonaghy merged 2 commits into
developfrom
issue-671-592-c-gtk-live-path-paint-the-remaining

Conversation

@JDonaghy

Copy link
Copy Markdown
Owner

Closes #671

Automated PR opened by coordinator for review of issue #671.

JDonaghy and others added 2 commits August 28, 2026 02:40
…tooltip on GTK's live render_content path

Sub-task 3/4 of #592 (chrome/transient surfaces group). These four
screen.* fields were populated by the engine the whole time but had no
live GTK painter: find_replace and tab_switcher had a dead draw.rs
painter to bypass (routed through Backend::draw_find_replace and the
already-shared render::tab_switcher_to_quadraui_list_view/Backend::
draw_list instead), while separated_status_line and tab_tooltip never
had a GTK painter at all.

- render.rs: new shared tab_hover_tooltip_paint adapter (unit_w/unit_h
  scale, same convention #669 established) — the single-segment
  StatusBar trick TUI's now-retired draw_rule_row-based
  render_tab_hover_tooltip used, generalized so GTK can call it with
  cw/lh pixel scale instead of TUI's 1.0/1.0 cell scale.
- tui_main/render_impl.rs: render_tab_hover_tooltip is now a thin
  1.0/1.0 wrapper around the shared function — no behavior change,
  verified via the existing tab_tooltip_agrees_with_click_target_
  across_the_bar test.
- gtk/mod.rs: render_content now paints all four surfaces — find/
  replace via Backend::draw_find_replace directly, the tab switcher
  via the shared list-view adapter + Backend::draw_list (also feeding
  the long-existing but never-populated tab_switcher_popup_rect click
  cache), the separated status line via the same window_status_line_
  to_status_bar adapter the per-window status bar already uses, and
  the tab-hover tooltip via the new render.rs adapter.
- gtk/testing.rs: four new GtkDriver black-box tests (chrome_surfaces
  module) proving each surface actually paints — not just that its
  screen.* field is populated. Each was verified to fail red by
  temporarily commenting out its paint call and confirming the pixel-
  diff assertion panics, then restoring it.

No GTK-only painter added; the two surfaces with no prior painter
route through a render.rs adapter shared with TUI. TUI behavior
unchanged (verified by existing TUI test suites).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The tooltip's Y position was offset by one line height (`lh`), but GTK's
tab row is `tab_row_h = (lh * 1.6).ceil()` tall — 1.6x a line height, not
1x like TUI's cell-based tab bar. Offsetting by `lh` alone landed the
tooltip's top edge inside the tab row's own vertical span, painting over
tab labels instead of sitting in a clean band below the tab bar.

Fixed by offsetting by `tab_row_h` (already computed earlier in the same
function) instead of `lh`, matching TUI's `area.y + 1` semantics: TUI's
`+1` clears exactly one cell row regardless of the breadcrumbs setting,
same as `tab_row_h` here (as opposed to `tab_bar_h`, which also reserves
the breadcrumb row).

Added a positional regression test (`tab_hover_tooltip_paints_below_tab_row_not_inside_it`)
that pins the exact paint band rather than just checking "some pixel
changed" — the existing `tab_hover_tooltip_paints` test's broad 0-200px
scan stayed green with the bug present. Verified the new test fails red
against the old `lh`-only offset before confirming it passes with the fix.
@JDonaghy
JDonaghy merged commit fe252d5 into develop Aug 28, 2026
2 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.

#592-C: GTK live path — paint the remaining chrome (find_replace, tab_switcher, separated_status_line, tab_tooltip)

1 participant