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:
parent
8ad1cc673a
commit
943e8fe4d2
1 changed files with 12 additions and 1 deletions
|
|
@ -1206,7 +1206,7 @@ void redrawOverlay()
|
||||||
g_overlay->SetIsFill( false );
|
g_overlay->SetIsFill( false );
|
||||||
g_overlay->SetIsStroke( true );
|
g_overlay->SetIsStroke( true );
|
||||||
g_overlay->SetStrokeColor( peer.color );
|
g_overlay->SetStrokeColor( peer.color );
|
||||||
g_overlay->SetLineWidth( 1.5 * px );
|
g_overlay->SetLineWidth( 2.5 * px );
|
||||||
|
|
||||||
for( const KIID& id : peer.selection )
|
for( const KIID& id : peer.selection )
|
||||||
{
|
{
|
||||||
|
|
@ -1218,6 +1218,17 @@ void redrawOverlay()
|
||||||
BOX2I bb = item->ViewBBox();
|
BOX2I bb = item->ViewBBox();
|
||||||
bb.Inflate( KiROUND( 4 * px ) );
|
bb.Inflate( KiROUND( 4 * px ) );
|
||||||
g_overlay->Rectangle( bb.GetOrigin(), bb.GetEnd() );
|
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 )
|
if( peer.hasCursor )
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue