Changeset 34168 in vbox for trunk/src/VBox
- Timestamp:
- Nov 18, 2010 12:48:19 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/selector/VBoxSelectorWnd.cpp
r34096 r34168 200 200 #define BIG_TOOLBAR 201 201 #if MAC_LEOPARD_STYLE 202 /* Enable unified toolbars on Mac OS X. Available on Qt >= 4.3 */203 202 addToolBar(mVMToolBar); 204 mVMToolBar->setMacToolbar();205 203 /* Central widget @ horizontal layout */ 206 204 setCentralWidget(m_pSplitter); … … 346 344 { 347 345 mNormalGeo.moveTo(x, y); 348 mNormalGeo.setSize(QSize(w, h).expandedTo(minimumSizeHint()) 349 .boundedTo(ar.size())); 346 mNormalGeo.setSize(QSize(w, h) 347 .expandedTo(minimumSizeHint()) 348 .boundedTo(ar.size())); 349 #if defined(Q_WS_MAC) && (QT_VERSION >= 0x040700) 350 move(mNormalGeo.topLeft()); 351 resize(mNormalGeo.size()); 352 mNormalGeo = normalGeometry(); 353 #else /* defined(Q_WS_MAC) && (QT_VERSION >= 0x040700) */ 350 354 setGeometry(mNormalGeo); 355 #endif /* !(defined(Q_WS_MAC) && (QT_VERSION >= 0x040700)) */ 351 356 if (max) /* maximize if needed */ 352 357 showMaximized(); … … 360 365 } 361 366 } 367 #if MAC_LEOPARD_STYLE 368 /* Enable unified toolbars on Mac OS X. Available on Qt >= 4.3. We do this 369 * after setting the window pos/size, cause Qt sometime includes the 370 * toolbar height in the content height. */ 371 mVMToolBar->setMacToolbar(); 372 #endif /* MAC_LEOPARD_STYLE */ 362 373 363 374 /* Update the list */ … … 473 484 /* Save the position of the window */ 474 485 { 475 int y = mNormalGeo.y(); 486 #if defined(Q_WS_MAC) && (QT_VERSION >= 0x040700) 487 QRect frameGeo = frameGeometry(); 488 QRect save(frameGeo.x(), frameGeo.y(), mNormalGeo.width(), mNormalGeo.height()); 489 #else /* defined(Q_WS_MAC) && (QT_VERSION >= 0x040700) */ 490 QRect save(mNormalGeo); 491 #endif /* !(defined(Q_WS_MAC) && (QT_VERSION >= 0x040700)) */ 476 492 QString winPos = QString("%1,%2,%3,%4") 477 .arg( mNormalGeo.x()).arg(y)478 .arg( mNormalGeo.width()).arg(mNormalGeo.height());493 .arg(save.x()).arg(save.y()) 494 .arg(save.width()).arg(save.height()); 479 495 #ifdef Q_WS_MAC 480 496 UIWindowMenuManager::destroy();
Note:
See TracChangeset
for help on using the changeset viewer.