Share dialog: Adjust layout #4119

This commit is contained in:
Christian Kamm 2015-11-24 12:30:53 +01:00
parent f96d94f143
commit bcfdcec3ee
2 changed files with 8 additions and 6 deletions

View File

@ -71,9 +71,17 @@ ShareDialog::ShareDialog(AccountPtr account, const QString &sharePath, const QSt
ocDir.replace(QRegExp("^/*"), "");
ocDir.replace(QRegExp("/*$"), "");
// Laying this out is complex because sharePath
// may be in use or not.
_ui->gridLayout->removeWidget(_ui->label_sharePath);
_ui->gridLayout->removeWidget(_ui->label_name);
if( ocDir.isEmpty() ) {
_ui->gridLayout->addWidget(_ui->label_name, 0, 1, 2, 1);
_ui->label_sharePath->setText(QString());
} else {
_ui->gridLayout->addWidget(_ui->label_name, 0, 1, 1, 1);
_ui->gridLayout->addWidget(_ui->label_sharePath, 1, 1, 1, 1);
_ui->label_sharePath->setText(tr("Folder: %2").arg(ocDir));
}

View File

@ -24,12 +24,6 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>share label</string>
</property>