Revert "[Light Switch] Switch desktop wallpapers with the Light/Dark mode" (#44588)

This uses IVirtualDesktopManagerInternal*, which is an undocumented
Windows Shell internal API.
These interfaces are not stable and can change across Windows updates,
so using them in PowerToys carries some long-term risk
This commit is contained in:
Kai Tao
2026-01-08 10:14:43 +08:00
committed by GitHub
parent 08d4689ec5
commit 9c58574484
25 changed files with 310 additions and 1118 deletions

View File

@@ -17,10 +17,6 @@ namespace Microsoft.PowerToys.Settings.UI.Library
public const string DefaultLatitude = "0.0";
public const string DefaultLongitude = "0.0";
public const string DefaultScheduleMode = "Off";
public const bool DefaultWallpaperEnabled = false;
public const bool DefaultWallpaperVirtualDesktopEnabled = false;
public const int DefaultWallpaperStyle = 0;
public const string DefaultWallpaperPath = "";
public static readonly HotkeySettings DefaultToggleThemeHotkey = new HotkeySettings(true, true, false, true, 0x44); // Ctrl+Win+Shift+D
public LightSwitchProperties()
@@ -34,12 +30,6 @@ namespace Microsoft.PowerToys.Settings.UI.Library
SunriseOffset = new IntProperty(DefaultSunriseOffset);
SunsetOffset = new IntProperty(DefaultSunsetOffset);
ScheduleMode = new StringProperty(DefaultScheduleMode);
WallpaperEnabled = new BoolProperty(DefaultWallpaperEnabled);
WallpaperVirtualDesktopEnabled = new BoolProperty(DefaultWallpaperVirtualDesktopEnabled);
WallpaperStyleLight = new IntProperty(DefaultWallpaperStyle);
WallpaperStyleDark = new IntProperty(DefaultWallpaperStyle);
WallpaperPathLight = new StringProperty(DefaultWallpaperPath);
WallpaperPathDark = new StringProperty(DefaultWallpaperPath);
ToggleThemeHotkey = new KeyboardKeysProperty(DefaultToggleThemeHotkey);
}
@@ -72,23 +62,5 @@ namespace Microsoft.PowerToys.Settings.UI.Library
[JsonPropertyName("toggle-theme-hotkey")]
public KeyboardKeysProperty ToggleThemeHotkey { get; set; }
[JsonPropertyName("wallpaperEnabled")]
public BoolProperty WallpaperEnabled { get; set; }
[JsonPropertyName("wallpaperVirtualDesktopEnabled")]
public BoolProperty WallpaperVirtualDesktopEnabled { get; set; }
[JsonPropertyName("wallpaperStyleLight")]
public IntProperty WallpaperStyleLight { get; set; }
[JsonPropertyName("wallpaperStyleDark")]
public IntProperty WallpaperStyleDark { get; set; }
[JsonPropertyName("wallpaperPathLight")]
public StringProperty WallpaperPathLight { get; set; }
[JsonPropertyName("wallpaperPathDark")]
public StringProperty WallpaperPathDark { get; set; }
}
}