Commit bf8b966b authored by Tomaz Canabrava's avatar Tomaz Canabrava

Fix incorrect placement of the Settings Dialog on Multiple Monitors

The current monitor used was the 'default' one, the primary monitor
but if your default monitor was the laptop one, with the lid closed
like mine was for quite a bit, you'd spend like 20 minutes trying to
find the preferences dialog, like I did.
Signed-off-by: 's avatarTomaz Canabrava <tomaz.canabrava@intel.com>
parent 15e9a62c
......@@ -47,8 +47,11 @@ _ui(new Ui::SettingsDialog)
_ui->setupUi(this);
// Center the window on the screen.
QDesktopWidget *desktop = QApplication::desktop();
int screen = desktop->screenNumber(parent);
QRect position = frameGeometry();
position.moveCenter(QApplication::desktop()->availableGeometry().center());
position.moveCenter(QApplication::desktop()->availableGeometry(screen).center());
move(position.topLeft());
QGCLinkConfiguration* pLinkConf = new QGCLinkConfiguration(this);
......
Markdown is supported
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