VirtualBox

Changeset 74689 in vbox for trunk


Ignore:
Timestamp:
Oct 8, 2018 4:25:36 PM (6 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9241: VirtualBox Manager: Details pane: Sync Element item frame painting style with Chooser pane items.

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

Legend:

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

    r74685 r74689  
    238238    /* Paint background: */
    239239    paintBackground(pPainter, pOptions);
    240     /* Paint frame rectangle: */
    241     paintFrameRect(pPainter, pOptions);
     240    /* Paint frame: */
     241    paintFrame(pPainter, pOptions);
    242242    /* Paint element info: */
    243243    paintElementInfo(pPainter, pOptions);
     
    700700}
    701701
    702 void UIDetailsElement::paintFrameRect(QPainter *pPainter, const QStyleOptionGraphicsItem *pOptions) const
     702void UIDetailsElement::paintFrame(QPainter *pPainter, const QStyleOptionGraphicsItem *pOptions) const
    703703{
    704704    /* Save painter: */
     
    709709    const int iHeadHeight = 2 * iMargin + m_iMinimumHeaderHeight;
    710710    const QRect optionRect = pOptions->rect;
    711     const QRect fullRect = m_fAnimationRunning
    712                          ? QRect(optionRect.topLeft(), QSize(optionRect.width(), iHeadHeight + m_iAdditionalHeight))
    713                          : optionRect;
     711    const QRect rectangle = m_fAnimationRunning
     712                          ? QRect(optionRect.topLeft(), QSize(optionRect.width(), iHeadHeight + m_iAdditionalHeight))
     713                          : optionRect;
    714714
    715715    /* Paint frame: */
     
    718718    pen.setWidth(0);
    719719    pPainter->setPen(pen);
    720     pPainter->drawRect(fullRect);
     720    pPainter->drawLine(rectangle.topLeft(),    rectangle.topRight());
     721    pPainter->drawLine(rectangle.bottomLeft(), rectangle.bottomRight());
     722    pPainter->drawLine(rectangle.topLeft(),    rectangle.bottomLeft());
     723    pPainter->drawLine(rectangle.topRight(),   rectangle.bottomRight());
    721724
    722725    /* Restore painter: */
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsElement.h

    r74685 r74689  
    277277        /** Paints background using specified @a pPainter and certain @a pOptions. */
    278278        void paintBackground(QPainter *pPainter, const QStyleOptionGraphicsItem *pOptions) const;
    279         /** Paints frame rectangle using passed @a pPainter and certain @a pOptions. */
    280         void paintFrameRect(QPainter *pPainter, const QStyleOptionGraphicsItem *pOptions) const;
     279        /** Paints frame using passed @a pPainter and certain @a pOptions. */
     280        void paintFrame(QPainter *pPainter, const QStyleOptionGraphicsItem *pOptions) const;
    281281        /** Paints element info using specified @a pPainter and certain @a pOptions. */
    282282        void paintElementInfo(QPainter *pPainter, const QStyleOptionGraphicsItem *pOptions) const;
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