From 950439e5b898621cc633dab7a75b595f97ce7b44 Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Fri, 19 May 2017 09:49:24 +0200 Subject: [PATCH] Sharing dialog: Ensure error labels are expanding #5774 --- src/gui/sharedialog.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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; } -- 2.30.2