History

change mac default window size

danteruiz committed 7 years ago

Commit d73f6851 parent a00545b1 file · +9 −1Browse files

Showing the changes to libraries/ui/src/MainWindow.cpp (1 of 1 file). Show all

Unified · Split

libraries/ui/src/MainWindow.cpp+9−1
@@ -55,8 +55,16 @@ QWindow* MainWindow::findMainWindow() { · 54 unmodified lines
5555 void MainWindow::restoreGeometry() {
5656 // Did not use setGeometry() on purpose,
5757 // see http://doc.qt.io/qt-5/qsettings.html#restoring-the-state-of-a-gui-application
58− QRect geometry = _windowGeometry.get(qApp->desktop()->availableGeometry());
58+ QRect windowGeometry = qApp->desktop()->availableGeometry();
59+#if defined(Q_OS_MAC)
60+ windowGeometry.setSize((windowGeometry.size() * 0.5f));
61+#endif
62+ QRect geometry = _windowGeometry.get(windowGeometry);
63+#if defined(Q_OS_MAC)
64+ move(geometry.center());
65+#else
5966 move(geometry.topLeft());
67+#endif
6068 resize(geometry.size());
6169
6270 // Restore to maximized or full screen after restoring to windowed so that going windowed goes to good position and sizes.

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t