feat(collab): presence — name tag on remote selection boxes + thicker outline

Each remote selection rectangle now carries the selector's name above its
top-left corner (9px glyph, peer color) and the outline width goes 1.5→2.5px.
Verified live two-tab + presence-pcbnew.spec.ts 5/5.

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-06 16:33:05 +02:00
commit 943e8fe4d2
No known key found for this signature in database
GPG key ID: 8E75F2CDE64E5322

View file

@ -1206,7 +1206,7 @@ void redrawOverlay()
g_overlay->SetIsFill( false );
g_overlay->SetIsStroke( true );
g_overlay->SetStrokeColor( peer.color );
g_overlay->SetLineWidth( 1.5 * px );
g_overlay->SetLineWidth( 2.5 * px );
for( const KIID& id : peer.selection )
{
@ -1218,6 +1218,17 @@ void redrawOverlay()
BOX2I bb = item->ViewBBox();
bb.Inflate( KiROUND( 4 * px ) );
g_overlay->Rectangle( bb.GetOrigin(), bb.GetEnd() );
// Who selected it — name tag just above the box's top-left corner
// (world y grows downward, so "above" is -y).
if( !peer.name.empty() )
{
g_overlay->SetGlyphSize( VECTOR2I( KiROUND( 9 * px ), KiROUND( 9 * px ) ) );
g_overlay->BitmapText( wxString::FromUTF8( peer.name.c_str() ),
VECTOR2I( bb.GetOrigin().x,
KiROUND( bb.GetOrigin().y - 8 * px ) ),
ANGLE_0 );
}
}
if( peer.hasCursor )