Leave a talking client's name alone, and rename from the whole row
Bolding the name of whoever is speaking re-measures the row while the label keeps its old width, so a nickname spent every utterance clipped to an ellipsis. Talking already shows in the client's icon, which is where TeamSpeak shows it too, so the name keeps its normal weight and colour. Renaming now starts from the tree's own double-click handling, which works a row by its whole line, instead of Swing's, which only sees clicks that land on the label. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -200,8 +200,12 @@ public final class ServerTreePanel extends JScrollPane {
|
||||
if (SwingUtilities.isLeftMouseButton(e) && e.getClickCount() == 2) {
|
||||
if (obj instanceof ChannelNode && !Spacers.isSpacer(((ChannelNode) obj).name)) {
|
||||
actions.joinChannel(((ChannelNode) obj).id);
|
||||
} else if (obj instanceof ClientEntry && ((ClientEntry) obj).id != selfClientId) {
|
||||
actions.openPrivateChat((ClientEntry) obj);
|
||||
} else if (obj instanceof ClientEntry) {
|
||||
if (((ClientEntry) obj).id == selfClientId) {
|
||||
tree.startEditingAtPath(tree.pathAt(e.getY()));
|
||||
} else {
|
||||
actions.openPrivateChat((ClientEntry) obj);
|
||||
}
|
||||
}
|
||||
} else if (SwingUtilities.isMiddleMouseButton(e) && obj instanceof ClientEntry) {
|
||||
actions.showConnectionInfo((ClientEntry) obj);
|
||||
|
||||
Reference in New Issue
Block a user