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
Please register or sign in to comment