mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
gui: rspermissionmatrixwidget: fix name.length check with proper number
This commit is contained in:
parent
5009a4e243
commit
55ff018166
@ -289,7 +289,8 @@ void RSPermissionMatrixWidget::paintEvent(QPaintEvent *)
|
||||
rsPeers->getPeerDetails(*it,details) ;
|
||||
|
||||
QString name = QString::fromUtf8(details.name.c_str()) + " (" + QString::fromUtf8(details.location.c_str()) + ")";
|
||||
if(name.length() > 20)
|
||||
// TODO does not work correctly with hieroglyphs
|
||||
if(name.length() > 20 + 3)
|
||||
name = name.left(20)+"..." ;
|
||||
|
||||
peer_name_size = std::max(peer_name_size, fm.width(name)) ;
|
||||
|
Loading…
Reference in New Issue
Block a user