From: Christian Kamm Date: Fri, 19 May 2017 07:49:24 +0000 (+0200) Subject: Sharing dialog: Ensure error labels are expanding #5774 X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~717 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=950439e5b898621cc633dab7a75b595f97ce7b44;p=nextcloud-desktop.git Sharing dialog: Ensure error labels are expanding #5774 --- diff --git a/src/gui/sharedialog.cpp b/src/gui/sharedialog.cpp index c545169e4..05cc7b791 100644 --- a/src/gui/sharedialog.cpp +++ b/src/gui/sharedialog.cpp @@ -102,8 +102,10 @@ ShareDialog::ShareDialog(QPointer accountState, this->setWindowTitle(tr("%1 Sharing").arg(Theme::instance()->appNameGUI())); if (!accountState->account()->capabilities().shareAPI()) { - _ui->shareWidgets->hide(); - layout()->replaceWidget(_ui->shareWidgets, new QLabel(tr("The server does not allow sharing"))); + auto label = new QLabel(tr("The server does not allow sharing")); + label->setWordWrap(true); + label->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); + layout()->replaceWidget(_ui->shareWidgets, label); return; } @@ -175,6 +177,7 @@ void ShareDialog::showSharingUi() auto label = new QLabel(this); label->setText(tr("The file can not be shared because it was shared without sharing permission.")); label->setWordWrap(true); + label->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); layout()->replaceWidget(_ui->shareWidgets, label); return; }