mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-27 16:29:44 -05:00
Use availableGeometry() to calculate the dialog position.
availableGeometry() excludes ares where windows can't be placed (e.g. panels).
This commit is contained in:
parent
b02ec98ec6
commit
9e1ea264e2
@ -43,7 +43,7 @@ AutoTypeSelectDialog::AutoTypeSelectDialog(QWidget* parent)
|
||||
resize(size);
|
||||
|
||||
// move dialog to the center of the screen
|
||||
QPoint screenCenter = QApplication::desktop()->screenGeometry(QCursor::pos()).center();
|
||||
QPoint screenCenter = QApplication::desktop()->availableGeometry(QCursor::pos()).center();
|
||||
move(screenCenter.x() - (size.width() / 2), screenCenter.y() - (size.height() / 2));
|
||||
|
||||
QVBoxLayout* layout = new QVBoxLayout(this);
|
||||
|
Loading…
Reference in New Issue
Block a user