mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-09 07:49:23 -04:00
gui: rspermissionmatrixwidget: fix name.length check with proper number
This commit is contained in:
parent
5009a4e243
commit
55ff018166
1 changed files with 6 additions and 5 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue