Min. sizes for copy component

This commit is contained in:
Klaus Basan
2018-01-20 03:19:59 +01:00
parent d5c9a29618
commit 9a9abbe382
2 changed files with 15 additions and 2 deletions

View File

@@ -49,6 +49,7 @@ namespace BlackGui
{
ui->setupUi(this);
this->initOtherSwiftVersions();
this->setWidths();
ui->cb_ShowAll->setChecked(m_nameFilterDisables);
connect(ui->rb_Cache, &QRadioButton::toggled, [ = ](bool) { this->initCurrentDirectories(true); });
@@ -300,8 +301,7 @@ namespace BlackGui
void CCopyConfigurationComponent::resizeEvent(QResizeEvent *event)
{
const int w = 0.45 * this->width();
ui->cb_OtherVersions->setMaximumWidth(w);
this->setWidths();
QFrame::resizeEvent(event);
}
@@ -434,6 +434,16 @@ namespace BlackGui
this->setNameFilterDisables(ui->cb_ShowAll->isChecked());
}
void CCopyConfigurationComponent::setWidths()
{
const int w = this->width();
const int wCb = 0.45 * w;
const int wView = 0.4 * w;
ui->cb_OtherVersions->setMaximumWidth(wCb);
ui->tv_Destination->setMinimumWidth(wView);
ui->tv_Source->setMinimumWidth(wView);
}
const CLogCategoryList &CCopyConfigurationWizardPage::getLogCategories()
{
static const CLogCategoryList cats { CLogCategory::wizard(), CLogCategory::guiComponent() };

View File

@@ -116,6 +116,9 @@ namespace BlackGui
//! Set name filter disables from ui
void changeNameFilterDisables();
//! Set widths
void setWidths();
QStringList m_otherVersionDirs;
QScopedPointer<Ui::CCopyConfigurationComponent> ui;
QString m_initializedSourceDir;