QzTools: Use correct screen for widget in centerWidgetOnScreen

BUG: 384543
remotes/origin/Falkon/3.0
David Rosca 8 years ago
parent 7b6b69c35f
commit f80d827e59
  1. 4
      src/lib/tools/qztools.cpp

@ -1,6 +1,6 @@
/* ============================================================
* Falkon - Qt web browser
* Copyright (C) 2010-2017 David Rosca <nowrep@gmail.com>
* Copyright (C) 2010-2018 David Rosca <nowrep@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -110,7 +110,7 @@ QByteArray QzTools::readAllFileByteContents(const QString &filename)
void QzTools::centerWidgetOnScreen(QWidget* w)
{
const QRect screen = QApplication::desktop()->screenGeometry();
const QRect screen = QApplication::desktop()->screenGeometry(w);
const QRect size = w->geometry();
w->move((screen.width() - size.width()) / 2, (screen.height() - size.height()) / 2);
}

Loading…
Cancel
Save