Skip to content

Compact app bar: 32 pt bar, PhotoCraft search icon, no app menu + System title bar option - #969

Merged
bflatastic merged 4 commits into
storytold:mainfrom
rafi612:system-title-bar
Oct 10, 2026
Merged

bflatastic merged 4 commits into
storytold:mainfrom
rafi612:system-title-bar

Conversation

@rafi612

@rafi612 rafi612 commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

What and why

On Windows/Linux, VectorCraft's app bar stood out from the rest of the Craft family: tall (44 pt), with its own application menu (which Illustrator doesn't have), and a wide search field — so on narrower windows the content didn't fit the bar. This PR aligns VectorCraft with PhotoCraft, partly as a direct port of storytold/photocraft#1903 (on top of its base, #1344 + #1677):

  1. Bar 44 → 32 pt — brand mark 22→18, Home 24→20, dimensions extracted into named constants (BAR_H, MARK, WIDGET_H).
  2. Search like in PhotoCraft — a 28 px icon instead of the 200×24 box (selected = palette_open, tooltip with the Cmd+Shift+/ shortcut); the palette still opens via shortcut and Help. Frees ~132 px, eliminating the content overflow.
  3. No VectorCraft menu in the window — the bar starts at File (as in Illustrator); Quit moved to File as Exit (same app.quit command, asks about unsaved work). About/Discord were already in Help, Preferences in Edit. Narrowing order: Discord → search icon → workspace switcher shrink.
  4. macOS unchanged — App menu composed as before in mac_layout (About from Help, Settings from Edit, Quit from File relabelled to "Quit VectorCraft", Language/Appearance synthesized since they have no in-window menu — the same pattern as PhotoCraft).
  5. New System Title Bar preference (User Interface, Win/Linux only, applies at next launch): gives the window back its native decorations; the OS title follows the file (*name — VectorCraft), the in-window mark is hidden.

Files

chrome.rs, titlebar.rs, brand.rs, menus.rs, native_menu.rs, prefs_dialog.rs, engine (Prefs + spec), main.rs + window.rs, 10 i18n catalogs, development.md.

Verification

  • vectorcraft-ui-egui: 889/889, vectorcraft (bin): 65/65, vectorcraft-engine: 1597/1597
  • clippy clean in touched crates, fmt --check clean, xtask layers OK
  • xtask wasm fails identically on the pristine tree (third-party num-traits/pxfm breakage — environment issue, not this PR)
  • Headless bar render in tests (File…Help present, no overlaps at 800/1100/1440); live screenshot to confirm on a machine with a display

How it looks?

System title bar:

obraz

Client side decoration:
obraz

rafi612 and others added 4 commits October 10, 2026 21:01
- Preferences hides System Title Bar on macOS and the web, where it did
  nothing (it fell through to the plain checkbox row), and lists it with
  the window options instead of under Language.
- The next-launch note reuses "Applies the next time VectorCraft starts."
  instead of a second wording in every catalog.
- A new window title asks for one more frame: AppKit lays the title bar
  out again for it, and the next frame centres the window buttons (storytold#968).
- The menu bar drops the bold branch for the VectorCraft menu it no
  longer shows; theme is imported where the tests use it.
- Docs: Language is Preferences › User Interface › Language (VectorCraft
  › Language on macOS); the control protocol describes System Title Bar;
  ROADMAP Last updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bflatastic
bflatastic merged commit 58bb72f into storytold:main Oct 10, 2026
@bflatastic

Copy link
Copy Markdown
Member

Thank you @rafi612! This brings VectorCraft's bar in line with PhotoCraft, and File-first with File › Exit matches Illustrator on Windows. I've merged it after rebasing it onto main and adding one review commit:

  • Preferences: System Title Bar is hidden on macOS and the web, where it has no effect. The match guard sent it to the plain checkbox arm there. It's also listed with the other window options rather than under the Language heading. The next-launch note reuses the existing "Applies the next time VectorCraft starts." string, so there's no second wording to translate.
  • macOS: Window controls misaligned on macOS #968 (merged just before this) centres the traffic lights on the app bar, and the bar height is now one constant, chrome::APP_BAR_HEIGHT, which both use. A new window title makes AppKit lay the title bar out again, so sync_window_title asks for one more frame to put the buttons back in place.
  • Small cleanups: removed the bold "VectorCraft" branch in menu_bar, which can no longer be reached; theme is now imported only in the tests that use it; fixed the field_reassign_with_default clippy finding in the new main.rs test.
  • Docs: Language is now described as Preferences › User Interface › Language (VectorCraft › Language on macOS) in ROADMAP, docs/development.md and docs/mcp.md, and docs/control-protocol.md describes the System Title Bar mode.

Full cargo xtask ci passes. I also checked it live on Windows: the bar at 1440 and 900 px, File › Exit, the Preferences row, and a start with System Title Bar on, where the OS title read *bar.svg — VectorCraft and the in-app mark and caption buttons were gone.

If you'd like to follow along or chat with the team, come and join us on Discord: https://discord.gg/artcraft

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.

2 participants