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
55void MainWindow::restoreGeometry() {55void MainWindow::restoreGeometry() {
56 // Did not use setGeometry() on purpose,56 // Did not use setGeometry() on purpose,
57 // see http://doc.qt.io/qt-5/qsettings.html#restoring-the-state-of-a-gui-application57 // 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
59 move(geometry.topLeft());66 move(geometry.topLeft());
67#endif
60 resize(geometry.size());68 resize(geometry.size());
61 69
62 // Restore to maximized or full screen after restoring to windowed so that going windowed goes to good position and sizes.70 // 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