Skip to content
Commit b7caba5b authored by Alexander Volkov's avatar Alexander Volkov
Browse files

Fix initial dialog's positioning when it's done by Qt

Summary:
If a window manager doesn't position dialog windows, then
they are centered on a parent window by Qt.
DialogStateSaver::restoreWindowState() is called before
a layout is set for DialogBase and thus it resizes
DialogBase to (-1, -1) returned by DialogBase::sizeHint().
Qt centers the dialog with such size on its parent,
but the dialog changes its size in DialogBase::showEvent()
and becomes uncentered.

Setup the layout before DialogBase::showEvent() to fix it.

Reviewers: marten

Reviewed By: marten

Subscribers: ngraham

Differential Revision: https://phabricator.kde.org/D9438
parent 538b5bbc
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