Changeset 89248 in vbox
- Timestamp:
- May 24, 2021 4:53:33 PM (4 years ago)
- svn:sync-xref-src-repo-rev:
- 144591
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIToolBar.cpp
r88863 r89248 112 112 113 113 /* Prepare gradient: */ 114 const QColor backgroundColor = QApplication::palette().color(QPalette::Active, QPalette:: Mid);114 const QColor backgroundColor = QApplication::palette().color(QPalette::Active, QPalette::Window); 115 115 QLinearGradient gradient(rectangle.topLeft(), rectangle.bottomLeft()); 116 gradient.setColorAt(0, backgroundColor. lighter(130));117 gradient.setColorAt(1, backgroundColor. lighter(125));116 gradient.setColorAt(0, backgroundColor.darker(105)); 117 gradient.setColorAt(1, backgroundColor.darker(115)); 118 118 119 119 /* Fill background: */ -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp
r88862 r89248 2225 2225 /* Make sure menu-bar fills own solid background: */ 2226 2226 menuBar()->setAutoFillBackground(true); 2227 QPalette pal = QApplication::palette(); 2228 const QColor color = pal.color(QPalette::Active, QPalette::Mid).lighter(160); 2229 pal.setColor(QPalette::Active, QPalette::Button, color); 2230 menuBar()->setPalette(pal); 2227 # ifdef VBOX_WS_WIN 2228 // WORKAROUND: 2229 // On Windows we have to override Windows Vista style with style-sheet: 2230 menuBar()->setStyleSheet(QString("QMenuBar { background-color: %1; }") 2231 .arg(QApplication::palette().color(QPalette::Active, QPalette::Window).name(QColor::HexRgb))); 2232 # endif 2231 2233 } 2232 2234 #endif -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.cpp
r89094 r89248 551 551 { 552 552 /* Prepare everything: */ 553 preparePalette();554 553 prepareWidgets(); 555 554 prepareConnections(); … … 563 562 /* Make sure current Chooser-pane index fetched: */ 564 563 sltHandleChooserPaneIndexChange(); 565 }566 567 void UIVirtualBoxManagerWidget::preparePalette()568 {569 setAutoFillBackground(true);570 QPalette pal = QApplication::palette();571 #ifdef VBOX_WS_MAC572 const QColor color = pal.color(QPalette::Active, QPalette::Mid).lighter(145);573 #else574 const QColor color = pal.color(QPalette::Active, QPalette::Mid).lighter(160);575 #endif576 pal.setColor(QPalette::Window, color);577 setPalette(pal);578 564 } 579 565 … … 696 682 697 683 /* Adjust splitter colors according to main widgets it splits: */ 698 m_pSplitter->configureColor(QApplication::palette().color(QPalette::Active, QPalette:: Midlight).darker(110));684 m_pSplitter->configureColor(QApplication::palette().color(QPalette::Active, QPalette::Window).darker(130)); 699 685 /* Set the initial distribution. The right site is bigger. */ 700 686 m_pSplitter->setStretchFactor(0, 2); -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.h
r89094 r89248 292 292 /** Prepares all. */ 293 293 void prepare(); 294 /** Prepares palette. */295 void preparePalette();296 294 /** Prepares widgets. */ 297 295 void prepareWidgets(); -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/graphics/UIGraphicsScrollBar.cpp
r88862 r89248 158 158 159 159 /* Draw background: */ 160 QColor backgroundColor = pal.color(QPalette::Active, QPalette::Mid); 161 backgroundColor = backgroundColor.darker(140); 160 QColor backgroundColor = pal.color(QPalette::Active, QPalette::Window).darker(190); 162 161 QRectF actualRectangle = pOptions->rect; 163 162 actualRectangle.setLeft(pOptions->rect.left() + .22 * pOptions->rect.width()); … … 175 174 176 175 /* Draw background: */ 177 QColor backgroundColor = pal.color(QPalette::Active, QPalette:: Mid);176 QColor backgroundColor = pal.color(QPalette::Active, QPalette::Window).darker(140); 178 177 pPainter->fillRect(pOptions->rect, backgroundColor); 179 178 … … 1016 1015 if (m_iHoveringValue < 100) 1017 1016 { 1018 QColor tokenColor = pal.color(QPalette::Active, QPalette:: Mid);1017 QColor tokenColor = pal.color(QPalette::Active, QPalette::Window); 1019 1018 tokenColor.setAlpha(255 * ((double)m_iRevealingValue / 100)); 1020 tokenColor = tokenColor.darker(1 40);1019 tokenColor = tokenColor.darker(190); 1021 1020 QRectF tokenRectangle = QRect(actualTokenPosition(), QSize(m_iExtent, 2 * m_iExtent)); 1022 1021 QRectF actualRectangle = tokenRectangle; … … 1044 1043 1045 1044 /* Draw background: */ 1046 QColor backgroundColor = pal.color(QPalette::Active, QPalette:: Midlight);1045 QColor backgroundColor = pal.color(QPalette::Active, QPalette::Window); 1047 1046 backgroundColor.setAlpha(50 + (double)m_iHoveringValue / 100 * 150); 1048 1047 QRect actualRectangle = rectangle; … … 1053 1052 if (m_iHoveringValue < 100) 1054 1053 { 1055 QColor tokenColor = pal.color(QPalette::Active, QPalette:: Dark);1054 QColor tokenColor = pal.color(QPalette::Active, QPalette::Window).darker(140); 1056 1055 QRect tokenRectangle = QRect(actualTokenPosition(), QSize(m_iExtent, m_iExtent)); 1057 1056 tokenRectangle.setLeft(tokenRectangle.left() + .85 * tokenRectangle.width() * ((double)100 - m_iHoveringValue) / 100);
Note:
See TracChangeset
for help on using the changeset viewer.