Changeset 89242 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- May 24, 2021 3:14:21 PM (4 years ago)
- svn:sync-xref-src-repo-rev:
- 144585
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/manager
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemGlobal.cpp
r89240 r89242 711 711 const QColor simpleText = pal.color(QPalette::Active, QPalette::Text); 712 712 const QColor highlightText = pal.color(QPalette::Active, QPalette::HighlightedText); 713 const QColor lightText = simpleText.black() < highlightText.black() ? simpleText : highlightText; 714 const QColor darkText = simpleText.black() > highlightText.black() ? simpleText : highlightText; 713 QColor lightText = simpleText.black() < highlightText.black() ? simpleText : highlightText; 714 QColor darkText = simpleText.black() > highlightText.black() ? simpleText : highlightText; 715 if (lightText.black() > 128) 716 lightText = QColor(Qt::white); 717 if (darkText.black() < 128) 718 darkText = QColor(Qt::black); 715 719 716 720 /* Gather foreground color for background one: */ -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemGroup.cpp
r89241 r89242 1738 1738 const QColor simpleText = pal.color(QPalette::Active, QPalette::Text); 1739 1739 const QColor highlightText = pal.color(QPalette::Active, QPalette::HighlightedText); 1740 const QColor lightText = simpleText.black() < highlightText.black() ? simpleText : highlightText; 1741 const QColor darkText = simpleText.black() > highlightText.black() ? simpleText : highlightText; 1740 QColor lightText = simpleText.black() < highlightText.black() ? simpleText : highlightText; 1741 QColor darkText = simpleText.black() > highlightText.black() ? simpleText : highlightText; 1742 if (lightText.black() > 128) 1743 lightText = QColor(Qt::white); 1744 if (darkText.black() < 128) 1745 darkText = QColor(Qt::black); 1742 1746 1743 1747 /* Gather foreground color for background one: */ -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemMachine.cpp
r89240 r89242 1095 1095 const QColor simpleText = pal.color(QPalette::Active, QPalette::Text); 1096 1096 const QColor highlightText = pal.color(QPalette::Active, QPalette::HighlightedText); 1097 const QColor lightText = simpleText.black() < highlightText.black() ? simpleText : highlightText; 1098 const QColor darkText = simpleText.black() > highlightText.black() ? simpleText : highlightText; 1097 QColor lightText = simpleText.black() < highlightText.black() ? simpleText : highlightText; 1098 QColor darkText = simpleText.black() > highlightText.black() ? simpleText : highlightText; 1099 if (lightText.black() > 128) 1100 lightText = QColor(Qt::white); 1101 if (darkText.black() < 128) 1102 darkText = QColor(Qt::black); 1099 1103 1100 1104 /* Gather foreground color for background one: */ -
trunk/src/VBox/Frontends/VirtualBox/src/manager/tools/UIToolsItem.cpp
r88862 r89242 868 868 const QColor simpleText = pal.color(QPalette::Active, QPalette::Text); 869 869 const QColor highlightText = pal.color(QPalette::Active, QPalette::HighlightedText); 870 const QColor lightText = simpleText.black() < highlightText.black() ? simpleText : highlightText; 871 const QColor darkText = simpleText.black() > highlightText.black() ? simpleText : highlightText; 870 QColor lightText = simpleText.black() < highlightText.black() ? simpleText : highlightText; 871 QColor darkText = simpleText.black() > highlightText.black() ? simpleText : highlightText; 872 if (lightText.black() > 128) 873 lightText = QColor(Qt::white); 874 if (darkText.black() < 128) 875 darkText = QColor(Qt::black); 872 876 873 877 /* Gather foreground color for background one: */
Note:
See TracChangeset
for help on using the changeset viewer.