Changeset 59726 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Feb 18, 2016 3:19:41 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp
r59507 r59726 2315 2315 geometry.setSize(geometry.size().expandedTo(pWidget->minimumSizeHint())); 2316 2316 2317 /* Get screen-geometry [of screen with point (iX, iY) if possible]: */2317 /* Get available-geometry [of screen with point (iX, iY) if possible]: */ 2318 2318 const QRect availableGeometry = fOk ? vboxGlobal().availableGeometry(QPoint(iX, iY)) : 2319 2319 vboxGlobal().availableGeometry(); … … 2326 2326 #endif /* Q_WS_WIN */ 2327 2327 2328 /* Move default-geometry to screen-geometry' center: */2328 /* As final fallback, move default-geometry to available-geometry' center: */ 2329 2329 if (!fOk) 2330 2330 geometry.moveCenter(availableGeometry.center()); … … 3527 3527 geometry.setSize(geometry.size().expandedTo(pWidget->minimumSizeHint())); 3528 3528 3529 /* In Windows Qt fails to reposition out of screen window properly, so moving to centre: */3530 #ifdef Q_WS_WIN3531 3529 /* Get available-geometry [of screen with point (iX, iY) if possible]: */ 3532 3530 const QRect availableGeometry = fOk ? vboxGlobal().availableGeometry(QPoint(iX, iY)) : 3533 3531 vboxGlobal().availableGeometry(); 3534 3532 3533 /* In Windows Qt fails to reposition out of screen window properly, so moving to centre: */ 3534 #ifdef Q_WS_WIN 3535 3535 /* Make sure resulting geometry is within current bounds: */ 3536 3536 if (fOk && geometry.intersects(availableGeometry)) … … 3538 3538 #endif /* Q_WS_WIN */ 3539 3539 3540 /* Move default-geometry to pParentWidget' geometry center: */3540 /* As a fallback, move default-geometry to pParentWidget' geometry center: */ 3541 3541 if (!fOk && pParentWidget) 3542 3542 geometry.moveCenter(pParentWidget->geometry().center()); 3543 /* As final fallback, move default-geometry to available-geometry' center: */ 3544 else if (!fOk) 3545 geometry.moveCenter(availableGeometry.center()); 3543 3546 3544 3547 /* Return result: */ … … 3694 3697 #endif /* Q_WS_WIN */ 3695 3698 3696 /* Move default-geometry to current screencenter: */3699 /* As final fallback, move default-geometry to available-geometry' center: */ 3697 3700 if (!fOk) 3698 3701 geometry.moveCenter(availableGeometry.center()); … … 3802 3805 /* In Windows Qt fails to reposition out of screen window properly, so moving to centre: */ 3803 3806 #ifdef Q_WS_WIN 3804 /* Get screen-geometry [of screen with point (iX, iY) if possible]: */ 3805 const QRect availableGeometry = vboxGlobal().availableGeometry(QPoint(iX, iY)); 3807 /* Get available-geometry [of screen with point (iX, iY) if possible]: */ 3808 const QRect availableGeometry = fOk ? vboxGlobal().availableGeometry(QPoint(iX, iY)) : 3809 vboxGlobal().availableGeometry(); 3806 3810 3807 3811 /* Make sure resulting geometry is within current bounds: */
Note:
See TracChangeset
for help on using the changeset viewer.