Changeset 74109 in vbox for trunk/src/VBox
- Timestamp:
- Sep 6, 2018 10:14:20 AM (6 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/manager/details
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetails.cpp
r74083 r74109 66 66 setAutoFillBackground(true); 67 67 QPalette pal = qApp->palette(); 68 const QColor bodyColor = pal.color(QPalette::Active, QPalette::Mid light).darker(110);68 const QColor bodyColor = pal.color(QPalette::Active, QPalette::Mid).lighter(155); 69 69 pal.setColor(QPalette::Base, bodyColor); 70 70 setPalette(pal); -
trunk/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsGroup.cpp
r74042 r74109 22 22 /* Qt include: */ 23 23 # include <QGraphicsScene> 24 # include <QPainter> 24 25 # include <QStyle> 26 # include <QStyleOptionGraphicsItem> 25 27 26 28 /* GUI includes: */ … … 161 163 } 162 164 165 void UIDetailsGroup::paint(QPainter *pPainter, const QStyleOptionGraphicsItem *pOptions, QWidget *) 166 { 167 /* Paint background: */ 168 paintBackground(pPainter, pOptions); 169 } 170 163 171 void UIDetailsGroup::addItem(UIDetailsItem *pItem) 164 172 { … … 305 313 return QVariant(); 306 314 } 315 316 void UIDetailsGroup::paintBackground(QPainter *pPainter, const QStyleOptionGraphicsItem *pOptions) const 317 { 318 /* Save painter: */ 319 pPainter->save(); 320 321 /* Prepare variables: */ 322 const QRect optionRect = pOptions->rect; 323 324 /* Paint default background: */ 325 const QColor defaultColor = palette().color(QPalette::Active, QPalette::Midlight).darker(110); 326 pPainter->fillRect(optionRect, defaultColor); 327 328 /* Restore painter: */ 329 pPainter->restore(); 330 } -
trunk/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsGroup.h
r74044 r74109 85 85 protected: 86 86 87 /** @name Event-handling stuff. 88 * @{ */ 89 /** Performs painting using passed @a pPainter, @a pOptions and optionally specified @a pWidget. */ 90 virtual void paint(QPainter *pPainter, const QStyleOptionGraphicsItem *pOptions, QWidget *pWidget = 0) /* override */; 91 /** @} */ 92 87 93 /** @name Item stuff. 88 94 * @{ */ … … 140 146 /** @} */ 141 147 148 /** @name Painting stuff. 149 * @{ */ 150 /** Paints background using specified @a pPainter and certain @a pOptions. */ 151 void paintBackground(QPainter *pPainter, const QStyleOptionGraphicsItem *pOptions) const; 152 /** @} */ 153 142 154 /** @name Item stuff. 143 155 * @{ */ -
trunk/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsView.cpp
r74083 r74109 182 182 /* Setup palette: */ 183 183 QPalette pal = qApp->palette(); 184 const QColor bodyColor = pal.color(QPalette::Active, QPalette::Mid light).darker(110);184 const QColor bodyColor = pal.color(QPalette::Active, QPalette::Mid).lighter(155); 185 185 pal.setColor(QPalette::Base, bodyColor); 186 186 setPalette(pal);
Note:
See TracChangeset
for help on using the changeset viewer.