Changeset 88805 in vbox for trunk/src/VBox
- Timestamp:
- Apr 30, 2021 1:29:59 PM (4 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/manager
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooser.cpp
r87102 r88805 212 212 { 213 213 /* Prepare everything: */ 214 preparePalette();215 214 prepareModel(); 216 215 prepareWidgets(); … … 219 218 /* Init model: */ 220 219 initModel(); 221 }222 223 void UIChooser::preparePalette()224 {225 setAutoFillBackground(true);226 QPalette pal = palette();227 QColor bodyColor = pal.color(QPalette::Active, QPalette::Midlight).darker(110);228 pal.setColor(QPalette::Window, bodyColor);229 setPalette(pal);230 220 } 231 221 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooser.h
r87102 r88805 198 198 /** Prepares all. */ 199 199 void prepare(); 200 /** Prepares palette. */201 void preparePalette();202 200 /** Prepares model. */ 203 201 void prepareModel(); -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemGroup.cpp
r88586 r88805 1588 1588 pPainter->save(); 1589 1589 1590 /* Prepare color: */1591 const QPalette pal = palette();1592 const QColor headerColor = pal.color(QPalette::Active,1593 model()->selectedItems().contains(this) ?1594 QPalette::Highlight : QPalette::Midlight);1595 1596 /* Root-item: */1597 if (isRoot())1598 {1599 #if 01600 /* Non-main root-item: */1601 if (!isMainRoot())1602 {1603 /* Prepare variables: */1604 const int iMarginV = data(GroupItemData_MarginV).toInt();1605 const int iFullHeaderHeight = 2 * iMarginV + m_minimumHeaderSize.height();1606 QRect headerRect = QRect(0, 0, rect.width(), iFullHeaderHeight);1607 1608 /* Fill background: */1609 QLinearGradient headerGradient(headerRect.bottomLeft(), headerRect.topLeft());1610 headerGradient.setColorAt(1, headerColor.darker(headerDarkness()));1611 headerGradient.setColorAt(0, headerColor.darker(animatedValue()));1612 pPainter->fillRect(headerRect, headerGradient);1613 }1614 #endif1615 }1616 1590 /* Non-root-item: */ 1617 else 1618 { 1591 if (!isRoot()) 1592 { 1593 /* Prepare color: */ 1594 const QColor headerColor = QApplication::palette().color(QPalette::Active, 1595 model()->selectedItems().contains(this) ? 1596 QPalette::Highlight : QPalette::Window); 1597 1619 1598 /* Prepare variables: */ 1620 1599 const int iMarginV = data(GroupItemData_MarginV).toInt(); -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserView.cpp
r84596 r88805 247 247 { 248 248 /* Prepare palette: */ 249 QPalette pal = qApp->palette(); 250 const QColor bodyColor = pal.color(QPalette::Active, QPalette::Midlight).darker(110); 251 pal.setColor(QPalette::Base, bodyColor); 249 QPalette pal = QApplication::palette(); 250 pal.setColor(QPalette::Active, QPalette::Base, pal.color(QPalette::Active, QPalette::Window)); 252 251 setPalette(pal); 253 252 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsGroup.cpp
r84623 r88805 284 284 285 285 /* Paint default background: */ 286 #ifdef VBOX_WS_MAC 287 const QColor defaultColor = palette().color(QPalette::Active, QPalette::Mid).lighter(145); 288 #else 289 const QColor defaultColor = palette().color(QPalette::Active, QPalette::Mid).lighter(160); 290 #endif 291 pPainter->fillRect(optionRect, defaultColor); 286 const QColor backgroundColor = QApplication::palette().color(QPalette::Active, QPalette::Window); 287 pPainter->fillRect(optionRect, backgroundColor); 292 288 293 289 /* Restore painter: */ -
trunk/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsSet.cpp
r84623 r88805 765 765 766 766 /* Paint default background: */ 767 const QColor defaultColor = palette().color(QPalette::Active, QPalette::Midlight).darker(110);768 pPainter->fillRect(optionRect, defaultColor);767 const QColor backgroundColor = QApplication::palette().color(QPalette::Active, QPalette::Window); 768 pPainter->fillRect(optionRect, backgroundColor); 769 769 770 770 /* Restore painter: */ -
trunk/src/VBox/Frontends/VirtualBox/src/manager/tools/UITools.cpp
r88508 r88805 100 100 { 101 101 /* Prepare everything: */ 102 preparePalette();103 102 prepareContents(); 104 103 prepareConnections(); … … 106 105 /* Init model finally: */ 107 106 initModel(); 108 }109 110 void UITools::preparePalette()111 {112 setAutoFillBackground(true);113 QPalette pal = palette();114 QColor bodyColor = pal.color(QPalette::Active, QPalette::Midlight).darker(110);115 pal.setColor(QPalette::Window, bodyColor);116 setPalette(pal);117 107 } 118 108 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/tools/UITools.h
r88508 r88805 110 110 /** Prepares all. */ 111 111 void prepare(); 112 /** Prepares palette. */113 void preparePalette();114 112 /** Prepares contents. */ 115 113 void prepareContents(); -
trunk/src/VBox/Frontends/VirtualBox/src/manager/tools/UIToolsView.cpp
r82968 r88805 184 184 /* Setup palette: */ 185 185 QPalette pal = qApp->palette(); 186 const QColor bodyColor = pal.color(QPalette::Active, QPalette::Midlight).darker(110); 187 pal.setColor(QPalette::Base, bodyColor); 186 pal.setColor(QPalette::Active, QPalette::Base, pal.color(QPalette::Active, QPalette::Window)); 188 187 setPalette(pal); 189 188 }
Note:
See TracChangeset
for help on using the changeset viewer.