|
|
|
|
@ -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); |
|
|
|
|
} |
|
|
|
|
|