Browse Source

Merge pull request #3202

PKEv (1):
      fix(friendwidget):the limitation of the group's  name in the shortcut menu
pull/3226/head
sudden6 9 years ago
parent
commit
d9fd513a64
No known key found for this signature in database
GPG Key ID: 279509B499E032B9
  1. 8
      src/widget/friendwidget.cpp

8
src/widget/friendwidget.cpp

@ -89,7 +89,13 @@ void FriendWidget::contextMenuEvent(QContextMenuEvent * event) @@ -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;
}

Loading…
Cancel
Save