Resize columns of "other swift versions" to percentage

This commit is contained in:
Klaus Basan
2018-12-26 01:06:07 +01:00
committed by Mat Sutcliffe
parent 7baf5f238e
commit 48b18c7acd
10 changed files with 47 additions and 19 deletions

View File

@@ -27,14 +27,23 @@ namespace BlackGui
this->setCustomMenu(new CApplicationInfoMenu(this));
}
int CApplicationInfoView::otherSwiftVersionsFromDataDirectories(bool reInit)
int CApplicationInfoView::otherSwiftVersionsFromDataDirectories(bool reinitOtherVersions)
{
const CApplicationInfoList others = CApplicationInfoList::fromOtherSwiftVersionsFromDataDirectories(reInit);
this->updateContainer(others);
const CApplicationInfoList others = CApplicationInfoList::fromOtherSwiftVersionsFromDataDirectories(reinitOtherVersions);
m_acceptRowSelection = (others.size() > 0);
this->updateContainer(others);
return others.size();
}
int CApplicationInfoView::otherSwiftVersionsFromDataDiretoriesAndResize(bool reinitOtherVersion)
{
const int r = this->otherSwiftVersionsFromDataDirectories(reinitOtherVersion);
this->setPercentageColumnWidths();
this->resizeRowsToContents();
return r;
}
void CApplicationInfoView::deleteSelectedDataDirectories()
{
if (!this->hasSelection()) { return; }

View File

@@ -33,7 +33,10 @@ namespace BlackGui
explicit CApplicationInfoView(QWidget *parent = nullptr);
//! BlackMisc::CApplicationInfoList::otherSwiftVersionsFromDataDirectories
int otherSwiftVersionsFromDataDirectories(bool reInit = false);
int otherSwiftVersionsFromDataDirectories(bool reinitOtherVersions = false);
//! Display versions and resize
int otherSwiftVersionsFromDataDiretoriesAndResize(bool reinitOtherVersion = false);
//! Delete the selected directories
void deleteSelectedDataDirectories();