Changeset 10148 in vbox
- Timestamp:
- Jul 3, 2008 9:27:02 AM (17 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp
r9054 r10148 705 705 QString str = cmachine.GetExtraData (VBoxDefs::GUI_LastWindowPosition); 706 706 707 QRect ar = QApplication::desktop()->availableGeometry (this);708 707 bool ok = false, max = false; 709 708 int x = 0, y = 0, w = 0, h = 0; … … 719 718 if (ok) 720 719 { 720 QRect ar = QApplication::desktop()->availableGeometry (QPoint (x, y)); 721 /* Do some position checks */ 722 if (x < ar.left() || x > ar.right()) 723 x = ar.left(); 724 if (y < ar.top() || y > ar.bottom()) 725 y = ar.top(); 726 721 727 normal_pos = QPoint (x, y); 722 728 normal_size = QSize (w, h); -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxSelectorWnd.cpp
r8296 r10148 579 579 QString winPos = vbox.GetExtraData (VBoxDefs::GUI_LastWindowPosition); 580 580 581 QRect ar = QApplication::desktop()->availableGeometry (pos());582 581 bool ok = false, max = false; 583 582 int x = 0, y = 0, w = 0, h = 0; … … 593 592 if (ok) 594 593 { 594 QRect ar = QApplication::desktop()->availableGeometry (QPoint (x, y)); 595 /* Do some position checks */ 596 if (x < ar.left() || x > ar.right()) 597 x = ar.left(); 598 if (y < ar.top() || y > ar.bottom()) 599 y = ar.top(); 595 600 move (x, y); 596 601 resize (QSize (w, h).expandedTo (minimumSizeHint()) … … 602 607 else 603 608 { 609 QRect ar = QApplication::desktop()->availableGeometry (this); 604 610 resize (QSize (770, 550).expandedTo (minimumSizeHint()) 605 611 .boundedTo (ar.size()));
Note:
See TracChangeset
for help on using the changeset viewer.