We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b22b7c7 commit 34a8e5fCopy full SHA for 34a8e5f
about.cpp
@@ -101,8 +101,10 @@ void About::setComponent() {
101
}
102
103
void About::setWindowGeometry() {
104
+ QScreen* primaryScreen = qApp->primaryScreen();
105
+ QRect screenGeometry = primaryScreen->geometry();
106
int width = 550, height = 360;
- int x = 500, y = 500;
107
+ int x = (screenGeometry.width() - width) / 2, y = (screenGeometry.height() - height) / 2;
108
if (mArguments.contains("-x")) {
109
int xIndex = mArguments.indexOf("-x") + 1;
110
x = mArguments.at(xIndex).toInt();
0 commit comments