Share dialog: Hide the icon when unused

Previously this used up some space when there was no icon, leading
to an oddly indented header.
This commit is contained in:
Christian Kamm 2017-05-19 09:48:47 +02:00 committed by ckamm
parent d3b00532b1
commit f24cdf5a05

View file

@ -107,6 +107,7 @@ ShareDialog::ShareDialog(QPointer<AccountState> accountState,
return;
}
_ui->label_icon->hide();
if (QFileInfo(_localPath).isFile()) {
ThumbnailJob *job = new ThumbnailJob(_sharePath, _accountState->account(), this);
connect(job, SIGNAL(jobFinished(int, QByteArray)), SLOT(slotThumbnailFetched(int, QByteArray)));
@ -217,6 +218,7 @@ void ShareDialog::slotThumbnailFetched(const int &statusCode, const QByteArray &
p.loadFromData(reply, "PNG");
p = p.scaledToHeight(thumbnailSize, Qt::SmoothTransformation);
_ui->label_icon->setPixmap(p);
_ui->label_icon->show();
}
void ShareDialog::slotAccountStateChanged(int state)