VirtualBox

Changeset 74118 in vbox for trunk


Ignore:
Timestamp:
Sep 6, 2018 1:41:10 PM (6 years ago)
Author:
vboxsync
Message:

FE/Qt: VirtualBox Manager UI: Details pane re-styling: Close/open animation fix for Element item.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/manager/details
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsElement.cpp

    r74083 r74118  
    696696    pPainter->save();
    697697
     698    /* Prepare variables: */
     699    const int iMargin = data(ElementData_Margin).toInt();
     700    const int iHeadHeight = 2 * iMargin + m_iMinimumHeaderHeight;
     701    const QRect optionRect = pOptions->rect;
     702    const QRect fullRect = m_fAnimationRunning
     703                         ? QRect(optionRect.topLeft(), QSize(optionRect.width(), iHeadHeight + m_iAdditionalHeight))
     704                         : optionRect;
     705
    698706    /* Paint frame: */
    699     const QPalette pal = palette();
    700     const QColor frameColor = pal.color(QPalette::Active, QPalette::Mid);
     707    const QColor frameColor = palette().color(QPalette::Active, QPalette::Mid);
    701708    pPainter->setPen(frameColor.lighter(m_iLightnessToneStart));
    702     pPainter->drawRect(pOptions->rect);
     709    pPainter->drawRect(fullRect);
    703710
    704711    /* Restore painter: */
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsElement.h

    r74083 r74118  
    9999        bool isOpened() const { return !m_fClosed; }
    100100
     101        /** Returns whether toggle animation is running. */
     102        bool isAnimationRunning() const { return m_fAnimationRunning; }
    101103        /** Marks animation finished. */
    102104        void markAnimationFinished();
     
    142144        virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *pEvent) /* override */;
    143145
    144         virtual void paint(QPainter *pPainter, const QStyleOptionGraphicsItem *pOption, QWidget *pWidget = 0) /* override */;
     146        /** Performs painting using passed @a pPainter, @a pOptions and optionally specified @a pWidget. */
     147        virtual void paint(QPainter *pPainter, const QStyleOptionGraphicsItem *pOptions, QWidget *pWidget = 0) /* override */;
    145148    /** @} */
    146149
     
    165168        /** Returns toggle button instance. */
    166169        UIGraphicsRotatorButton *button() const { return m_pButton; }
    167         /** Returns whether toggle animation is running. */
    168         bool isAnimationRunning() const { return m_fAnimationRunning; }
    169170
    170171        /** Returns abstractly stored data value for certain @a iKey. */
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsSet.cpp

    r74111 r74118  
    345345                /* Acquire required height: */
    346346                int iHeight = pElement->minimumHeightHint();
    347                 if (pElement->elementType() == DetailsElementType_System)
     347                if (pElement->elementType() == DetailsElementType_System && !pElement->isAnimationRunning() && !pElement->isClosed())
    348348                    if (UIDetailsElement *pPreviewElement = element(DetailsElementType_Preview))
    349349                        if (pPreviewElement->isVisible())
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