feat(collab): ship the tuned presence style as per-editor defaults

Defaults picked with the PresenceTuner (2026-07-07):
- pcbnew: exact-outline selection, 6px stroke @0.7, 46% fill, bottom-end
  chips @7.5px, cross cursor 8/3px @1.0 with chip label, 9px pins w/ 3px ring.
- eeschema (eeschemaDefaultStyle): same look softened for the schematic
  canvas — hairline 1px outline, 14% fill, 0.5 cursor alpha.
- New chipBgAlpha knob (default 0.7 = the border alpha) for label AND cursor
  badges, + tuner slider.
- Tuner: per-tool defaults + per-tool localStorage keys; Reset returns each
  editor to its own shipped look; tool prop threaded from WasmTool.
Verified: pure defaults (no style push) render the picked look in both
editors; presence suites green.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CvqUd4QsJSGHN28aunJRTq
This commit is contained in:
Gergő Törcsvári 2026-07-07 16:53:10 +02:00
commit ef15c0d863
No known key found for this signature in database
GPG key ID: 8E75F2CDE64E5322
4 changed files with 84 additions and 48 deletions

View file

@ -718,7 +718,8 @@ std::vector<PEER> g_peers;
std::vector<PIN> g_pins;
// Every visual knob (shapes, widths, alphas, label placement, color overrides)
// — see collab_presence_style.h; live-patched by kicadCollabSetStyle (tuner).
pcbjam_presence::STYLE g_style;
// eeschema ships its own defaults (hairline outline, subtler fill/cursor).
pcbjam_presence::STYLE g_style = pcbjam_presence::eeschemaDefaultStyle();
std::shared_ptr<KIGFX::VIEW_OVERLAY> g_overlay;
// Labels render from their own overlay at the nearest depth (chip rects
// would otherwise erase same-depth text) — see PRESENCE_TEXT_OVERLAY.