Skip to content

feat: migrate menu bar labels to quadraui::MenuBar (#301) - #309

Merged
JDonaghy merged 1 commit into
developfrom
issue-301-menu-bar-quadraui
May 4, 2026
Merged

feat: migrate menu bar labels to quadraui::MenuBar (#301)#309
JDonaghy merged 1 commit into
developfrom
issue-301-menu-bar-quadraui

Conversation

@JDonaghy

@JDonaghy JDonaghy commented May 4, 2026

Copy link
Copy Markdown
Owner

Summary

  • Replace bespoke per-backend menu label paint in TUI (render_menu_bar) and GTK (draw_menu_bar) with quadraui::tui::draw_menu_bar() / quadraui::gtk::draw_menu_bar()
  • Replace bespoke click handling (TUI column-walking loop, GTK 7px/char + 10px approximation) and GTK hover-to-switch with MenuBarLayout::hit_test() from cached paint layout
  • Add render::build_menu_bar_view() adapter that converts MENU_STRUCTURE + engine.menu_open_idx into a quadraui::MenuBar descriptor
  • Cache MenuBarLayout on engine at paint time (established pattern from Lift terminal panel toolbar to quadraui primitives (StatusBar + TabBar) #305)

What stays

Nav arrows (◀ ▶) + search/title box rendering and click handling remain as bespoke per-backend code pending quadraui#51 (CommandCenter primitive). Pre-existing dispatch gaps (GTK arrow keys, TUI Alt conflicts, TUI hover) tracked in #308.

Test plan

  • cargo fmt — clean
  • cargo clippy -- -D warnings — zero warnings
  • cargo test --no-default-features — 4,907 tests pass (1952 lib + 2040 integration)
  • cargo build — compiles
  • Smoke test: TUI menu label clicks open/close dropdowns
  • Smoke test: GTK menu label clicks open/close dropdowns
  • Smoke test: GTK hover-to-switch works when dropdown is open
  • Smoke test: menu dropdown anchors correctly below the active label

Closes #301

🤖 Generated with Claude Code

Replace bespoke per-backend menu label paint + click/hover with
quadraui::MenuBar in both TUI and GTK. Menu labels now paint through
quadraui rasterisers; click and hover use cached MenuBarLayout::hit_test
instead of hand-rolled geometry. Nav arrows + search box remain as-is
pending quadraui#51 (CommandCenter primitive).

Closes #301

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

1 participant