VirtualBox

Changeset 74687 in vbox for trunk


Ignore:
Timestamp:
Oct 8, 2018 3:34:38 PM (6 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9241: VirtualBox Manager: Details pane: Adjusting color tones UIDetailsSet.

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

Legend:

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

    r74367 r74687  
    2121
    2222/* Qt includes: */
     23# include <QPainter>
    2324# include <QStyle>
     25# include <QStyleOptionGraphicsItem>
    2426
    2527/* GUI includes: */
     
    196198        emit sigBuildDone();
    197199    }
     200}
     201
     202void UIDetailsSet::paint(QPainter *pPainter, const QStyleOptionGraphicsItem *pOptions, QWidget *)
     203{
     204    /* Paint background: */
     205    paintBackground(pPainter, pOptions);
    198206}
    199207
     
    689697        iAdditionalPreviewHeight = iGroupHeight - iPreviewHeight;
    690698}
     699
     700void UIDetailsSet::paintBackground(QPainter *pPainter, const QStyleOptionGraphicsItem *pOptions) const
     701{
     702    /* Save painter: */
     703    pPainter->save();
     704
     705    /* Prepare variables: */
     706    const QRect optionRect = pOptions->rect;
     707
     708    /* Paint default background: */
     709    const QColor defaultColor = palette().color(QPalette::Active, QPalette::Midlight).darker(110);
     710    pPainter->fillRect(optionRect, defaultColor);
     711
     712    /* Restore painter: */
     713    pPainter->restore();
     714}
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsSet.h

    r74367 r74687  
    7676protected:
    7777
     78    /** @name Event-handling stuff.
     79      * @{ */
     80        /** Performs painting using passed @a pPainter, @a pOptions and optionally specified @a pWidget. */
     81        virtual void paint(QPainter *pPainter, const QStyleOptionGraphicsItem *pOptions, QWidget *pWidget = 0) /* override */;
     82    /** @} */
     83
    7884    /** @name Item stuff.
    7985      * @{ */
     
    173179    /** @} */
    174180
     181    /** @name Painting stuff.
     182      * @{ */
     183        /** Paints background using specified @a pPainter and certain @a pOptions. */
     184        void paintBackground(QPainter *pPainter, const QStyleOptionGraphicsItem *pOptions) const;
     185    /** @} */
     186
    175187    /** @name Item stuff.
    176188      * @{ */
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