Skip to content

Commit

Permalink
Merged universal's master branch into GPII-4218
Browse files Browse the repository at this point in the history
  • Loading branch information
klown committed Jun 16, 2020
2 parents 54a04cf + 5b6163b commit 608c108
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 5 deletions.
12 changes: 11 additions & 1 deletion testData/defaultSettings/defaultSettings.win32.json5
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,20 @@
"http://registry.gpii.net/common/language": "en-US",
"http://registry.gpii.net/common/DPIScale": 0,
"http://registry.gpii.net/common/highContrast/enabled": false,
"http://registry.gpii.net/common/highContrastTheme": "regular-contrast",
"http://registry.gpii.net/common/selfVoicing/enabled": false,
"http://registry.gpii.net/applications/com.microsoft.office": {
"word-ribbon": "StandardSet"
}
},
"http://registry.gpii.net/applications/com.microsoft.windows.colorFilters": {
"FilterType": 0
},
"http://registry.gpii.net/applications/com.microsoft.windows.mouseSettings": {
"PointerSpeed": 10,
"SwapMouseButtons": 0,
"DoubleClickTime": 500
},
"http://registry.gpii.net/common/cursorSize": 0
}
}
}
Expand Down
55 changes: 51 additions & 4 deletions testData/solutions/win32.json5
Original file line number Diff line number Diff line change
Expand Up @@ -25988,7 +25988,8 @@
},
"stop": [],
"update": [
"settings.configure"
"settings.configure",
"start"
],
"restore": [
"settings.configure",
Expand Down Expand Up @@ -26491,16 +26492,62 @@
],
"capabilitiesTransformations": {
"HighContrastOn": {
// (highContrast.enabled === true) && (highContrastTheme !== "regular-contrast")
// GPII-4505 - We are going to apply a few edge cases of logic here to support both:
// 1. The fact that the QSS only sends up the high contrast theme setting at the moment, and is
// unlikely to change this soon, using the special value "regular-contrast" to determine
// whether or not the high contrast is enabled. ( If the value is regular-contrast, it should
// not be enabled. )
// 2. The fact that probably the correct way to determine if the high contrast theme is on is the
// actual windows settings which turns it on and off, and which will be captured during the
// process of a capture tool snapshot. In this case, if `enabled` is equal to false, the
// high contrast really shouldn't turn on, depsite a high contrast theme setting being saved.
//
// To work around both these use cases for the near future, we will turn on the high contrast
// if highContrast.enabled is not false and if highContrastTheme is not regular-contrast. Do
// note that this will cause problems for users who go their preference set up by doing a system
// capture when high contrast was off, and then beginning to use the qss. But it's unlikely this
// problem will present itself anytime soon.
//
//
// ON
// "http://registry.gpii.net/common/highContrastTheme": "yellow-black",
// "http://registry.gpii.net/common/highContrast/enabled": true
//
// OFF
// "http://registry.gpii.net/common/highContrastTheme": "yellow-black",
// "http://registry.gpii.net/common/highContrast/enabled": false
//
// OFF
// "http://registry.gpii.net/common/highContrastTheme": "regular-contrast",
// "http://registry.gpii.net/common/highContrast/enabled": true
//
// OFF
// "http://registry.gpii.net/common/highContrastTheme": "regular-contrast",
// "http://registry.gpii.net/common/highContrast/enabled": false
//
// ON
// "http://registry.gpii.net/common/highContrastTheme": "yellow-black"
//
// OFF
// "http://registry.gpii.net/common/highContrastTheme": "regular-contrast"
//
// ON
// "http://registry.gpii.net/common/highContrast/enabled": true
//
// OFF
// "http://registry.gpii.net/common/highContrast/enabled": false
//
// (highContrast.enabled !== false) && (highContrastTheme !== "regular-contrast")
"value": {
"transform": {
"type": "fluid.transforms.binaryOp",
"left": {
"transform": {
"type": "fluid.transforms.binaryOp",
"left": true, // If `enabled` is missing use `true` to support QSS case
"leftPath": "http://registry\\.gpii\\.net/common/highContrast/enabled",
"operator": "===",
"right": true
"operator": "!==",
"right": false
}
},
"operator": "&&",
Expand Down

0 comments on commit 608c108

Please sign in to comment.