Add Workbench name as Tab item tooltip

In cases where the user's font is large or the Workbench name is long,
the new, narrower sidebar may not display the entire workbench name. To
address those cases, the tooltip for the element is now also set to the
workbench name. Thanks to Github user @marioalexis84 for the suggestion.
This commit is contained in:
Chris Hennes
2021-01-03 16:14:43 -06:00
committed by wmayer
parent 13e2f93bae
commit d5b68febbb

View File

@@ -126,6 +126,7 @@ QTabWidget* DlgPreferencesImp::createTabForGroup(const std::string &groupName)
QListWidgetItem* item = new QListWidgetItem(ui->listBox);
item->setData(GroupNameRole, QVariant(groupNameQString));
item->setText(QObject::tr(groupNameQString.toLatin1()));
item->setToolTip(QObject::tr(groupNameQString.toLatin1()));
std::string fileName = groupName;
for (auto & ch : fileName) {
if (ch == ' ') ch = '_';