Changeset 108097 in vbox
- Timestamp:
- Feb 6, 2025 3:01:56 PM (2 weeks ago)
- svn:sync-xref-src-repo-rev:
- 167395
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/tools/UIToolsView.cpp
r108004 r108097 210 210 /* Setup palette: */ 211 211 QPalette pal = qApp->palette(); 212 QColor backgroundColor = pal.color(QPalette::Active, QPalette::Window); 212 213 /* We are just taking the [in]active Window colors and 214 * making them a bit darker/lighter according to theme: */ 215 QColor backgroundColorActive = pal.color(QPalette::Active, QPalette::Window); 216 QColor backgroundColorInactive = pal.color(QPalette::Inactive, QPalette::Window); 213 217 if (!tools()->isPopup()) 214 backgroundColor = uiCommon().isInDarkMode() 215 ? backgroundColor.lighter(130) 216 : backgroundColor.darker(110); 217 pal.setColor(QPalette::Active, QPalette::Base, backgroundColor); 218 pal.setColor(QPalette::Inactive, QPalette::Base, backgroundColor); 218 { 219 backgroundColorActive = uiCommon().isInDarkMode() 220 ? backgroundColorActive.lighter(120) 221 : backgroundColorActive.darker(108); 222 backgroundColorInactive = uiCommon().isInDarkMode() 223 ? backgroundColorInactive.lighter(120) 224 : backgroundColorInactive.darker(108); 225 } 226 pal.setColor(QPalette::Active, QPalette::Base, backgroundColorActive); 227 pal.setColor(QPalette::Inactive, QPalette::Base, backgroundColorInactive); 228 229 /* Assing changed palette: */ 219 230 setPalette(pal); 220 231 }
Note:
See TracChangeset
for help on using the changeset viewer.