Show our own name in bold, in the row and in its editor
The renderer asks the panel which id is ours rather than reading ClientEntry.self: our own row usually arrives among the enter-view events of the connect handshake, before the connection knows its own client id, so that flag was left false. It is now stamped once the id is known, which also fixes the "(you)" marker in the info panel. The inline editor matches, and sits 2px further left so its text lines up with the label it replaces rather than with its own border. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -153,7 +153,7 @@ public final class ServerTreePanel extends JScrollPane {
|
||||
tree.setRowHeight(20);
|
||||
tree.setBackground(Theme.TREE_BG);
|
||||
tree.setFont(Theme.UI_FONT);
|
||||
ServerTreeCellRenderer renderer = new ServerTreeCellRenderer();
|
||||
ServerTreeCellRenderer renderer = new ServerTreeCellRenderer(id -> id == selfClientId);
|
||||
tree.setCellRenderer(renderer);
|
||||
nicknameEditor = NicknameCellEditor.create(tree, renderer, id -> id == selfClientId);
|
||||
tree.setCellEditor(nicknameEditor);
|
||||
|
||||
Reference in New Issue
Block a user