Commit a9cef8e2 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Hide messagelabel when not necessary.

Fix size dialog
parent c0fd0809
...@@ -53,8 +53,6 @@ ContactSelectionDialog::ContactSelectionDialog(QItemSelectionModel *selectionMod ...@@ -53,8 +53,6 @@ ContactSelectionDialog::ContactSelectionDialog(QItemSelectionModel *selectionMod
mainLayout->addWidget(mSelectionWidget); mainLayout->addWidget(mSelectionWidget);
} }
mainLayout->addWidget(buttonBox); mainLayout->addWidget(buttonBox);
resize(QSize(450, 220));
} }
void ContactSelectionDialog::setMessageText(const QString &message) void ContactSelectionDialog::setMessageText(const QString &message)
......
...@@ -59,7 +59,10 @@ ContactSelectionWidget::ContactSelectionWidget(QItemSelectionModel *selectionMod ...@@ -59,7 +59,10 @@ ContactSelectionWidget::ContactSelectionWidget(QItemSelectionModel *selectionMod
void ContactSelectionWidget::setMessageText(const QString &message) void ContactSelectionWidget::setMessageText(const QString &message)
{ {
mMessageLabel->setText(message); if (!message.isEmpty()) {
mMessageLabel->setText(message);
mMessageLabel->show();
}
} }
void ContactSelectionWidget::setDefaultAddressBook(const Akonadi::Collection &addressBook) void ContactSelectionWidget::setDefaultAddressBook(const Akonadi::Collection &addressBook)
...@@ -105,6 +108,7 @@ void ContactSelectionWidget::initGui() ...@@ -105,6 +108,7 @@ void ContactSelectionWidget::initGui()
mMessageLabel = new QLabel; mMessageLabel = new QLabel;
layout->addWidget(mMessageLabel); layout->addWidget(mMessageLabel);
mMessageLabel->hide();
QButtonGroup *group = new QButtonGroup(this); QButtonGroup *group = new QButtonGroup(this);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment