Skip to content

Commit 34a8e5f

Browse files
authored
0.7
1 parent b22b7c7 commit 34a8e5f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

about.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,10 @@ void About::setComponent() {
101101
}
102102

103103
void About::setWindowGeometry() {
104+
QScreen* primaryScreen = qApp->primaryScreen();
105+
QRect screenGeometry = primaryScreen->geometry();
104106
int width = 550, height = 360;
105-
int x = 500, y = 500;
107+
int x = (screenGeometry.width() - width) / 2, y = (screenGeometry.height() - height) / 2;
106108
if (mArguments.contains("-x")) {
107109
int xIndex = mArguments.indexOf("-x") + 1;
108110
x = mArguments.at(xIndex).toInt();

0 commit comments

Comments
 (0)