Fix minor issues with Workbenches preference panel

This fixes three issues with the new Workbench Loader preferences panel reported by users:
* Some icons were not being properly scaled to the new 48x48 size
* Some text was being incorrectly cut off, despite fitting in the column
* The sort order of the workbenches was incorrect when external workbenches were added
This commit is contained in:
Chris Hennes
2021-02-04 20:06:30 -06:00
committed by wwmayer
parent 4cdef79531
commit 7560a35ea0
2 changed files with 3 additions and 2 deletions

View File

@@ -70,7 +70,7 @@ DlgPreferencesImp::DlgPreferencesImp(QWidget* parent, Qt::WindowFlags fl)
{
ui->setupUi(this);
ui->listBox->setFixedWidth(108);
ui->listBox->setGridSize(QSize(90, 75));
ui->listBox->setGridSize(QSize(108, 75));
connect(ui->buttonBox, SIGNAL (helpRequested()),
getMainWindow(), SLOT (whatsThis()));
@@ -140,7 +140,7 @@ QTabWidget* DlgPreferencesImp::createTabForGroup(const std::string &groupName)
qWarning() << "No group icon found for " << fileName.c_str();
}
else if (icon.size() != QSize(48, 48)) {
icon = Gui::BitmapFactory().resize(48, 48, icon, Qt::TransparentMode);
icon = icon.scaled(48, 48, Qt::KeepAspectRatio, Qt::SmoothTransformation);
qWarning() << "Group icon for " << fileName.c_str() << " is not of size 48x48, so it was scaled";
}
}

View File

@@ -100,6 +100,7 @@ void DlgSettingsLazyLoadedImp::buildUnloadedWorkbenchList()
ui->workbenchList->addItem(wbRow); // Transfers ownership to the QListWidget
}
}
ui->workbenchList->sortItems();
}
/**