- Timestamp:
- Oct 8, 2018 3:34:38 PM (6 years ago)
- 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 21 21 22 22 /* Qt includes: */ 23 # include <QPainter> 23 24 # include <QStyle> 25 # include <QStyleOptionGraphicsItem> 24 26 25 27 /* GUI includes: */ … … 196 198 emit sigBuildDone(); 197 199 } 200 } 201 202 void UIDetailsSet::paint(QPainter *pPainter, const QStyleOptionGraphicsItem *pOptions, QWidget *) 203 { 204 /* Paint background: */ 205 paintBackground(pPainter, pOptions); 198 206 } 199 207 … … 689 697 iAdditionalPreviewHeight = iGroupHeight - iPreviewHeight; 690 698 } 699 700 void 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 76 76 protected: 77 77 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 78 84 /** @name Item stuff. 79 85 * @{ */ … … 173 179 /** @} */ 174 180 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 175 187 /** @name Item stuff. 176 188 * @{ */
Note:
See TracChangeset
for help on using the changeset viewer.