Skip to content

GPII-3780: Solve "windows.desktopBackground" and ""windows.desktopBackgroundColor" transformations issues #754

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 11 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions testData/preferences/brenda.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// # Brenda.json5
//
// This preference sets changes the desktop wallpaper with another default Windows 10 one.
//
// ## Testing
//
// Windows desktop background should be replaced by with other one.
//
{
"flat": {
"name": "Brenda",
"contexts": {
"gpii-default": {
"name": "Default preferences",
"preferences": {
"http://registry.gpii.net/applications/com.microsoft.windows.desktopBackground": {
"Image": "C:\\Windows\\Web\\Wallpaper\\Theme1\\img2.jpg"
}
}
}
}
}
}
25 changes: 25 additions & 0 deletions testData/preferences/bryan.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// # Bryan.json5
//
// This preference sets changes the desktop wallpaper with another default Windows 10 one,
// at sets the Scaling to "Fill".
//
// ## Testing
//
// Windows desktop background should be replaced by with other one, and scaling set to "Fit".
//
{
"flat": {
"name": "Bryan",
"contexts": {
"gpii-default": {
"name": "Default preferences",
"preferences": {
"http://registry.gpii.net/applications/com.microsoft.windows.desktopBackground": {
"Scaling": "Fill",
"Image": "C:\\Windows\\Web\\Wallpaper\\Theme1\\img3.jpg"
}
}
}
}
}
}
30 changes: 30 additions & 0 deletions testData/preferences/daniel-raw.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// # Daniel-raw.json5
//
// This preference sets the desktop background to a solid color. This is the same
// preference set as Daniels one, but without using the convenience transforms.
//
// ## Testing
//
// Windows desktop background should be replace by a green image.
//
{
"flat": {
"name": "Daniel-raw",
"contexts": {
"gpii-default": {
"name": "Default preferences",
"preferences": {
"http://registry.gpii.net/applications/com.microsoft.windows.desktopBackgroundColor": {
"ImageConfig": {
"path": "pvParam",
"value": ""
},
"SolidColorConfig": {
"value": { "r": 67, "g": 187, "b": 19 }
}
}
}
}
}
}
}
7 changes: 2 additions & 5 deletions testData/preferences/daniel.json5
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,8 @@
"gpii-default": {
"name": "Default preferences",
"preferences": {
"http://registry.gpii.net/applications/com.microsoft.windows.desktopBackground": {
"BackgroundTypeVal": "SolidColor",
"InputVal": {
"Color": {"r": 67, "g": 187, "b": 19}
}
"http://registry.gpii.net/applications/com.microsoft.windows.desktopBackgroundColor": {
"SolidColor": { "r": 67, "g": 187, "b": 19 }
}
}
}
Expand Down
27 changes: 18 additions & 9 deletions testData/solutions/win32.json5
Original file line number Diff line number Diff line change
Expand Up @@ -4816,7 +4816,8 @@
"path": "Control Panel\\Desktop",
"dataTypes": {
"TileWallpaper": "REG_SZ",
"WallpaperStyle": "REG_SZ"
"WallpaperStyle": "REG_SZ",
"Scaling": "REG_SZ"
}
},
"supportedSettings": {
Expand Down Expand Up @@ -4900,15 +4901,15 @@
"type": "fluid.transforms.valueMapper",
"defaultInputPath": "http://registry\\.gpii\\.net/applications/com\\.microsoft\\.windows\\.desktopBackground.Scaling",
"match": {
"Fill": "6",
"Fit": "10",
"Fill": "10",
"Fit": "6",
"Stretch": "2",
"Tile": "0",
"Center": "0",
"Span": "22"
},
"noMatch": {
"outputValue": "6"
"outputValue": "10"
}
}
}
Expand All @@ -4919,8 +4920,8 @@
"type": "fluid.transforms.valueMapper",
"defaultInputPath": "WallpaperStyle",
"match": {
"6": "Fill",
"10": "Fit",
"10": "Fill",
"6": "Fit",
"2": "Stretch",
"0": {
"outputValue": {
Expand Down Expand Up @@ -5042,6 +5043,9 @@
}
}
},
"capabilities": [
"http://registry\\.gpii\\.net/applications/com\\.microsoft\\.windows\\.desktopBackgroundColor.SolidColor"
],
"capabilitiesTransformations": {
"ImageConfig": {
"transform": {
Expand All @@ -5056,9 +5060,6 @@
}
}
}
},
"inverseCapabilitiesTransformations": {
"http://registry\\.gpii\\.net/applications/com\\.microsoft\\.windows\\.desktopBackgroundColor.Image": "ImageConfig.value"
}
},
"configureSolidColor": {
Expand Down Expand Up @@ -5114,6 +5115,14 @@
}
}
},
"configure": [
"settings.configureImage",
"settings.configureSolidColor"
],
"restore": [
"settings.configureImage",
"settings.configureSolidColor"
],
"isInstalled": [
{
"type": "gpii.deviceReporter.alwaysInstalled"
Expand Down
14 changes: 14 additions & 0 deletions tests/data/preferences/os_win_solidColor_tf.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"flat": {
"contexts": {
"gpii-default": {
"name": "Default preferences",
"preferences": {
"http://registry.gpii.net/applications/com.microsoft.windows.desktopBackgroundColor": {
"SolidColor": { "r": 67, "g": 187, "b": 19 }
}
}
}
}
}
}
15 changes: 15 additions & 0 deletions tests/data/preferences/os_win_wallpaper_fill.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"flat": {
"contexts": {
"gpii-default": {
"name": "Default preferences",
"preferences": {
"http://registry.gpii.net/applications/com.microsoft.windows.desktopBackground": {
"Scaling": "Fill",
"Image": "C:\\Windows\\Web\\Wallpaper\\Theme1\\img3.jpg"
}
}
}
}
}
}
15 changes: 15 additions & 0 deletions tests/data/preferences/os_win_wallpaper_fit.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"flat": {
"contexts": {
"gpii-default": {
"name": "Default preferences",
"preferences": {
"http://registry.gpii.net/applications/com.microsoft.windows.desktopBackground": {
"Scaling": "Fit",
"Image": "C:\\Windows\\Web\\Wallpaper\\Theme1\\img2.jpg"
}
}
}
}
}
}
15 changes: 15 additions & 0 deletions tests/data/preferences/os_win_wallpaper_tile.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"flat": {
"contexts": {
"gpii-default": {
"name": "Default preferences",
"preferences": {
"http://registry.gpii.net/applications/com.microsoft.windows.desktopBackground": {
"Scaling": "Tile",
"Image": "C:\\Windows\\Web\\Wallpaper\\Theme1\\img4.jpg"
}
}
}
}
}
}
Loading