Skip to content

GTK tab switcher: migrate to quadraui::gtk::draw_list with rounded border #225

Description

@JDonaghy

Summary

The GTK tab-switcher popup is bespoke (src/gtk/draw.rs:2801::draw_tab_switcher_popup) and draws a square 1-pixel stroked border, while the TUI version uses quadraui::tui::draw_list with bordered = true and renders rounded ╭─╮ ╰─╯ corners. Surfaced during smoke-testing of the #223 ListView rasteriser pilot — the visual divergence is pre-existing, not introduced by the pilot, but it stands out now that the TUI version got migrated.

Two-step fix

  1. Add bordered support to quadraui::gtk::draw_list. The current public rasteriser (in quadraui/src/gtk/list.rs) explicitly comments that list.bordered isn't honoured. Add:

    • Rounded-rectangle border via Cairo arcs (3-4 px corner radius, matching dialog / palette modal styling).
    • Title overlay on the top border (single-row label centred or left-padded), using theme.title_fg and a small inset background block to "cut" the border behind the title. The TUI version's title-as-" {title} " pattern is the visual reference.
    • Inset the item region by 1 cell / row-height equivalent on each side so item rows don't overlap the border.
  2. Migrate draw_tab_switcher_popup to call quadraui::gtk::draw_list with bordered = true. The bespoke render code goes away; vimcode just builds the ListView (already exists via render::tab_switcher_to_quadraui_list_view) and passes it through. This deletes ~80 lines of vimcode-private rendering and aligns with the TUI behaviour.

Files

  • quadraui/src/gtk/list.rs — bordered branch
  • src/gtk/draw.rs:2801draw_tab_switcher_popup, becomes a thin wrapper

Surfaced by

#223 ListView rasteriser pilot (Session 332 smoke test).

Related

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    infrastructureBuild, CI, distributionplatformPlatform-specific (macOS, Windows, Linux)uiUI/rendering

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions