1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Merge pull request #3202

PKEv (1):
      fix(friendwidget):the limitation of the group's  name in the shortcut menu
This commit is contained in:
sudden6 2016-04-28 20:41:39 +02:00
commit d9fd513a64
No known key found for this signature in database
GPG Key ID: 279509B499E032B9

View File

@ -89,7 +89,13 @@ void FriendWidget::contextMenuEvent(QContextMenuEvent * event)
for (Group* group : GroupList::getAllGroups())
{
QAction* groupAction = inviteMenu->addAction(tr("Invite to group '%1'").arg(group->getGroupWidget()->getName()));
int maxNameLen = 30;
QString name = group->getGroupWidget()->getName();
if ( name.length() > maxNameLen )
{
name = name.left(maxNameLen).trimmed() + "..";
}
QAction* groupAction = inviteMenu->addAction(tr("Invite to group '%1'").arg(name));
groupActions[groupAction] = group;
}