VirtualBox

Changeset 52349 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Aug 11, 2014 6:24:56 PM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
95476
Message:

FE/Qt: 3646: Status-bar Editor: Forgot to update mask in couple of places in r95079.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIStatusBarEditorWindow.cpp

    r52097 r52349  
    807807    m_pEmbeddedWidget->setGeometry(0, sh.height(), qMax(width(), sh.width()), sh.height());
    808808
     809#ifdef Q_WS_X11
     810    /* The setMask functionality is excessive under Win/Mac hosts
     811     * because there is a Qt composition works properly,
     812     * Mac host has native translucency support,
     813     * Win host allows to enable it through Qt::WA_TranslucentBackground: */
     814    setMask(m_pEmbeddedWidget->geometry());
     815#endif /* Q_WS_X11 */
     816
    809817#ifdef Q_WS_WIN
    810818    /* Raise tool-window for proper z-order. */
     
    842850    m_pEmbeddedWidget->setGeometry(0, 0, qMax(width(), sh.width()), sh.height());
    843851
    844 #ifdef Q_WS_WIN
    845     /* Raise tool-window for proper z-order. */
    846     raise();
    847 #endif /* Q_WS_WIN */
    848 }
    849 
    850 void UIStatusBarEditorWindow::updateAnimation()
    851 {
    852     /* Skip if no animation created: */
    853     if (!m_pAnimation)
    854         return;
    855 
    856     /* Recalculate mdi-sub-window geometry animation boundaries based on size-hint: */
    857     const QSize sh = m_pEmbeddedWidget->sizeHint();
    858     m_startWidgetGeometry = QRect(0, sh.height(), qMax(width(), sh.width()), sh.height());
    859     m_finalWidgetGeometry = QRect(0,           0, qMax(width(), sh.width()), sh.height());
    860     m_pAnimation->update();
    861 }
    862 
    863 void UIStatusBarEditorWindow::showEvent(QShowEvent*)
    864 {
    865     /* If window isn't expanded: */
    866     if (!m_fExpanded)
    867     {
    868         /* Start expand animation: */
    869         emit sigShown();
    870     }
    871 }
    872 
    873 void UIStatusBarEditorWindow::closeEvent(QCloseEvent *pEvent)
    874 {
    875     /* If window isn't expanded: */
    876     if (!m_fExpanded)
    877     {
    878         /* Ignore close-event: */
    879         pEvent->ignore();
    880         return;
    881     }
    882 
    883     /* If animation state is Final: */
    884     const QString strAnimationState = property("AnimationState").toString();
    885     bool fAnimationComplete = strAnimationState == "Final";
    886     if (fAnimationComplete)
    887     {
    888         /* Ignore close-event: */
    889         pEvent->ignore();
    890         /* And start collapse animation: */
    891         emit sigCollapse();
    892     }
    893 }
    894 
    895 void UIStatusBarEditorWindow::setWidgetGeometry(const QRect &rect)
    896 {
    897     /* Apply mdi-sub-window geometry: */
    898     m_pEmbeddedWidget->setGeometry(rect);
    899 
    900852#ifdef Q_WS_X11
    901853    /* The setMask functionality is excessive under Win/Mac hosts
     
    905857    setMask(m_pEmbeddedWidget->geometry());
    906858#endif /* Q_WS_X11 */
     859
     860#ifdef Q_WS_WIN
     861    /* Raise tool-window for proper z-order. */
     862    raise();
     863#endif /* Q_WS_WIN */
     864}
     865
     866void UIStatusBarEditorWindow::updateAnimation()
     867{
     868    /* Skip if no animation created: */
     869    if (!m_pAnimation)
     870        return;
     871
     872    /* Recalculate mdi-sub-window geometry animation boundaries based on size-hint: */
     873    const QSize sh = m_pEmbeddedWidget->sizeHint();
     874    m_startWidgetGeometry = QRect(0, sh.height(), qMax(width(), sh.width()), sh.height());
     875    m_finalWidgetGeometry = QRect(0,           0, qMax(width(), sh.width()), sh.height());
     876    m_pAnimation->update();
     877}
     878
     879void UIStatusBarEditorWindow::showEvent(QShowEvent*)
     880{
     881    /* If window isn't expanded: */
     882    if (!m_fExpanded)
     883    {
     884        /* Start expand animation: */
     885        emit sigShown();
     886    }
     887}
     888
     889void UIStatusBarEditorWindow::closeEvent(QCloseEvent *pEvent)
     890{
     891    /* If window isn't expanded: */
     892    if (!m_fExpanded)
     893    {
     894        /* Ignore close-event: */
     895        pEvent->ignore();
     896        return;
     897    }
     898
     899    /* If animation state is Final: */
     900    const QString strAnimationState = property("AnimationState").toString();
     901    bool fAnimationComplete = strAnimationState == "Final";
     902    if (fAnimationComplete)
     903    {
     904        /* Ignore close-event: */
     905        pEvent->ignore();
     906        /* And start collapse animation: */
     907        emit sigCollapse();
     908    }
     909}
     910
     911void UIStatusBarEditorWindow::setWidgetGeometry(const QRect &rect)
     912{
     913    /* Apply mdi-sub-window geometry: */
     914    m_pEmbeddedWidget->setGeometry(rect);
     915
     916#ifdef Q_WS_X11
     917    /* The setMask functionality is excessive under Win/Mac hosts
     918     * because there is a Qt composition works properly,
     919     * Mac host has native translucency support,
     920     * Win host allows to enable it through Qt::WA_TranslucentBackground: */
     921    setMask(m_pEmbeddedWidget->geometry());
     922#endif /* Q_WS_X11 */
    907923}
    908924
Note: See TracChangeset for help on using the changeset viewer.

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