Commit 3c5248f9 authored by Ingo Klöcker's avatar Ingo Klöcker
Browse files

Store and restore the size of the dialog, not its geometry

We want to remember the size of the dialog, but we don't want to remember
its position on screen. It should always open centered with respect to
the parent window.

GnuPG-bug-id: 6046
parent cd308b23
Pipeline #218342 passed with stage
in 5 minutes and 14 seconds
......@@ -65,18 +65,16 @@ CertifyCertificateDialog::CertifyCertificateDialog(QWidget *p, Qt::WindowFlags f
});
KConfigGroup cfgGroup(KSharedConfig::openStateConfig(), "CertifyDialog");
const QByteArray geom = cfgGroup.readEntry("geometry", QByteArray());
if (!geom.isEmpty()) {
restoreGeometry(geom);
return;
const auto size = cfgGroup.readEntry("Size", QSize{640, 480});
if (size.isValid()) {
resize(size);
}
resize(QSize(640, 480));
}
CertifyCertificateDialog::~CertifyCertificateDialog()
{
KConfigGroup cfgGroup(KSharedConfig::openStateConfig(), "CertifyDialog");
cfgGroup.writeEntry("geometry", saveGeometry());
cfgGroup.writeEntry("Size", size());
cfgGroup.sync();
}
......
Supports Markdown
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