VirtualBox

Ignore:
Timestamp:
Mar 25, 2013 11:42:38 AM (12 years ago)
Author:
vboxsync
Message:

FE/Qt: QIDialog cleanup (part 2).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIDialog.cpp

    r45162 r45163  
    3737void QIDialog::showEvent(QShowEvent * /* pEvent */)
    3838{
    39     /* Two thinks to do for fixed size dialogs on MacOS X:
    40      * 1. Make sure the layout is polished and have the right size
    41      * 2. Disable that _unnecessary_ size grip (Bug in Qt?) */
    42     QSizePolicy policy = sizePolicy();
    43     if ((policy.horizontalPolicy() == QSizePolicy::Fixed &&
    44          policy.verticalPolicy() == QSizePolicy::Fixed) ||
    45         (windowFlags() & Qt::Sheet) == Qt::Sheet)
    46     {
    47         adjustSize();
    48         setFixedSize(size());
    49 #ifdef Q_WS_MAC
    50         ::darwinSetShowsResizeIndicator (this, false);
    51 #endif /* Q_WS_MAC */
    52     }
    53 
    5439    /* Polishing: */
    5540    if (m_fPolished)
    5641        return;
    5742    m_fPolished = true;
     43
     44    /* Make sure layout is polished: */
     45    adjustSize();
     46#ifdef Q_WS_MAC
     47    /* And dialog have fixed size: */
     48    setFixedSize(size());
     49#endif /* Q_WS_MAC */
    5850
    5951    /* Explicit centering according to our parent: */
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette