VirtualBox

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


Ignore:
Timestamp:
May 17, 2021 2:48:19 PM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
144441
Message:

FE/Qt: bugref:10003: Reworking Details pane; No need for element frame, it's useless there.

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

    r88862 r89100  
    300300    /* Paint background: */
    301301    paintBackground(pPainter, pOptions);
    302     /* Paint frame: */
    303     paintFrame(pPainter, pOptions);
    304302    /* Paint element info: */
    305303    paintElementInfo(pPainter, pOptions);
     
    15021500}
    15031501
    1504 void UIDetailsElement::paintFrame(QPainter *pPainter, const QStyleOptionGraphicsItem *pOptions) const
    1505 {
    1506     /* Save painter: */
    1507     pPainter->save();
    1508 
    1509     /* Prepare variables: */
    1510     const int iMargin = data(ElementData_Margin).toInt();
    1511     const int iHeadHeight = 2 * iMargin + m_iMinimumHeaderHeight;
    1512     const QRect optionRect = pOptions->rect;
    1513     const QRect rectangle = m_fAnimationRunning
    1514                           ? QRect(optionRect.topLeft(), QSize(optionRect.width(), iHeadHeight + m_iAdditionalHeight))
    1515                           : optionRect;
    1516 
    1517     /* Paint frame: */
    1518     const QColor frameColor = QApplication::palette().color(QPalette::Active, QPalette::Mid).lighter(m_iDefaultToneStart);
    1519     QPen pen(frameColor);
    1520     pen.setWidth(0);
    1521     pPainter->setPen(pen);
    1522     pPainter->drawLine(rectangle.topLeft(),    rectangle.topRight());
    1523     pPainter->drawLine(rectangle.bottomLeft(), rectangle.bottomRight());
    1524     pPainter->drawLine(rectangle.topLeft(),    rectangle.bottomLeft());
    1525     pPainter->drawLine(rectangle.topRight(),   rectangle.bottomRight());
    1526 
    1527     /* Restore painter: */
    1528     pPainter->restore();
    1529 }
    1530 
    15311502void UIDetailsElement::paintElementInfo(QPainter *pPainter, const QStyleOptionGraphicsItem *) const
    15321503{
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsElement.h

    r86226 r89100  
    323323        /** Paints background using specified @a pPainter and certain @a pOptions. */
    324324        void paintBackground(QPainter *pPainter, const QStyleOptionGraphicsItem *pOptions) const;
    325         /** Paints frame using passed @a pPainter and certain @a pOptions. */
    326         void paintFrame(QPainter *pPainter, const QStyleOptionGraphicsItem *pOptions) const;
    327325        /** Paints element info using specified @a pPainter and certain @a pOptions. */
    328326        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