Skip to content

VS Code parity (Tier 1 of #699): GTK chrome metrics — explorer row, tab/breadcrumb height, tab ordinals, mnemonics, indent guides #700

Description

@JDonaghy

Tier 1 of #699 (VS Code visual-parity audit). Six metric changes; no new features, no
theme-colour work (that is Tier 2), no quadraui changes (that is Tier 3).

These are what make vimcode's chrome read ~15–25% larger than VS Code's at the same DPI.

Changes

  1. Explorer row height 28.022.0 pxsrc/gtk/mod.rs:1572
    (explorer_row_height_cell). Matches VS Code's list.rowHeight.

  2. Decouple the tab-bar height from the editor font. Today it is
    ceil(line_height * 1.6), so raising settings.font_size inflates the chrome.
    Make it a fixed 35 px (VS Code's tab height). Four duplicate sites compute
    this — fix all of them, ideally by hoisting one shared constant/helper:
    src/gtk/mod.rs:1416, :2647, :10207, :10346.

  3. Decouple the breadcrumb row from the editor font. Same four sites add a full
    line_height when settings.breadcrumbs is on, which is why the breadcrumb renders
    as large as the code. Target: a 22 px row with ~12 px text, independent of
    font_size.

  4. Drop the ordinal prefix from tab labelssrc/render.rs:10017, plus the two
    [No Name] arms at :10022 and :10025. " {i+1}: {name} ""{name}".
    Not purely cosmetic: quadraui::TabItem's doc contract says backends locate the
    filename "after the last \": \"" in order to underline it, so re-check the tab-bar
    underline and close-glyph hit path with the prefix gone — do not just change the
    format string. src/gtk/mod.rs's CLOSE_* metrics and tighten_close_bounds are
    the relevant hit-test code.

  5. Stop underlining menu mnemonics unconditionallysrc/render.rs:3265 passes
    format!("&{name}") for every item and quadraui's GTK menu bar underlines the char
    after & with no Alt gate (quadraui/src/gtk/menu_bar.rs:105-108). VS Code reveals
    mnemonics only while Alt is held. Prefer gating the & on Alt-held state; if that
    state is not reachable from this call site, drop the & and say so in the PR.

  6. Turn indent guides on by default — the feature is fully implemented on both
    sides (quadraui::EditorLine::indent_guides, painted at
    quadraui/src/gtk/editor.rs:294) and gated on a vimcode setting that currently
    defaults off. VS Code draws them by default. src/core/settings.rs.

Acceptance

Black-box via GtkDriver (src/gtk/testing.rs), asserting on rendered output:

  • explorer row pitch == 22 px
  • tab-bar height stays 35 px across at least two different settings.font_size
    values
    — a single-font-size assertion passes with the bug reinstated, so it is not
    coverage for v0.3.0: TUI-only binary (vcd) #2
  • breadcrumb row height and text size independent of font_size
  • a tab renders as main.rs, not 1: main.rs, and its close glyph still hit-tests at
    the right x-range
  • menu-bar items render with no underline when Alt is not held

Follow the repo's RED-first rule: remove the fix, confirm the test goes red, restore,
and say so in the PR.

Files

  • src/gtk/mod.rs
  • src/render.rs
  • src/core/settings.rs
  • src/gtk/testing.rs (tests)

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

    coordTracked by coord-tui pipelineenhancementNew feature or requeststatus:readyRefined and ready to enter the work pipeline

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions