From 403060e10982efbb91cbd06f5e4fe2811cb58165 Mon Sep 17 00:00:00 2001
From: Heiko <61519853+htcfreek@users.noreply.github.com>
Date: Sun, 19 Jan 2025 15:32:46 +0100
Subject: [PATCH] [Settings]Update GPO infobar icon, improve some pages and fix
bugs (#33703)
* changes part 1
* fix xaml code
* changes part 2
* fix cmdNotFound page
* Update PowerOcrPage
* More Pages changed
* More Pages changed
* revert temporary change
* fix spelling
* add resw comment
* add resw comment
* Update MouseWihtoutBorderPage.xaml
* PowerPreview page
* workspaces page
* fix awake page gpo handling
* NewPlus page
* update new+ page!
* AdvancedPaste.xaml: Move Info bar.
* Update MouseJumpPanel.xaml
* Update GeneralPage.xaml
* fix position of info bar and some ui quirks
* fix xaml style
* fix string resources
* string changes
* prepare megre main
* update new+ page
* zoomit page
* various fixes
---
.../SettingsXAML/Panels/MouseJumpPanel.xaml | 8 +++-
.../SettingsXAML/Views/AdvancedPaste.xaml | 33 ++++++++++-----
.../SettingsXAML/Views/AlwaysOnTopPage.xaml | 6 ++-
.../SettingsXAML/Views/AwakePage.xaml | 6 ++-
.../SettingsXAML/Views/AwakePage.xaml.cs | 2 +-
.../SettingsXAML/Views/CmdNotFoundPage.xaml | 40 ++++++++++++++-----
.../SettingsXAML/Views/ColorPickerPage.xaml | 6 ++-
.../SettingsXAML/Views/CropAndLockPage.xaml | 6 ++-
.../Views/EnvironmentVariablesPage.xaml | 6 ++-
.../SettingsXAML/Views/FancyZonesPage.xaml | 6 ++-
.../SettingsXAML/Views/FileLocksmithPage.xaml | 6 ++-
.../SettingsXAML/Views/GeneralPage.xaml | 37 ++++++++++-------
.../SettingsXAML/Views/HostsPage.xaml | 6 ++-
.../SettingsXAML/Views/ImageResizerPage.xaml | 6 ++-
.../Views/KeyboardManagerPage.xaml | 6 ++-
.../SettingsXAML/Views/MeasureToolPage.xaml | 6 ++-
.../SettingsXAML/Views/MouseUtilsPage.xaml | 18 +++++++--
.../Views/MouseWithoutBordersPage.xaml | 22 +++++-----
.../SettingsXAML/Views/NewPlusPage.xaml | 11 +++--
.../SettingsXAML/Views/PeekPage.xaml | 6 ++-
.../SettingsXAML/Views/PowerAccentPage.xaml | 6 ++-
.../SettingsXAML/Views/PowerLauncherPage.xaml | 12 +++++-
.../SettingsXAML/Views/PowerOcrPage.xaml | 19 +++++----
.../SettingsXAML/Views/PowerPreviewPage.xaml | 12 +++++-
.../SettingsXAML/Views/PowerRenamePage.xaml | 6 ++-
.../Views/RegistryPreviewPage.xaml | 6 ++-
.../SettingsXAML/Views/ShortcutGuidePage.xaml | 6 ++-
.../SettingsXAML/Views/WorkspacesPage.xaml | 6 ++-
.../SettingsXAML/Views/ZoomItPage.xaml | 26 ++++++------
.../Settings.UI/Strings/en-us/Resources.resw | 11 +++++
.../Settings.UI/ViewModels/AwakeViewModel.cs | 27 ++++++++++++-
.../ViewModels/CmdNotFoundViewModel.cs | 19 +++++----
.../ViewModels/PowerOcrViewModel.cs | 6 +++
33 files changed, 305 insertions(+), 100 deletions(-)
diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Panels/MouseJumpPanel.xaml b/src/settings-ui/Settings.UI/SettingsXAML/Panels/MouseJumpPanel.xaml
index b92cf4d458..22d996efb2 100644
--- a/src/settings-ui/Settings.UI/SettingsXAML/Panels/MouseJumpPanel.xaml
+++ b/src/settings-ui/Settings.UI/SettingsXAML/Panels/MouseJumpPanel.xaml
@@ -35,7 +35,11 @@
IsClosable="False"
IsOpen="{x:Bind ViewModel.IsJumpEnabledGpoConfigured, Mode=OneWay}"
IsTabStop="{x:Bind ViewModel.IsJumpEnabledGpoConfigured, Mode=OneWay}"
- Severity="Informational" />
+ Severity="Informational">
+
+
+
+
-
\ No newline at end of file
+
diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Views/AdvancedPaste.xaml b/src/settings-ui/Settings.UI/SettingsXAML/Views/AdvancedPaste.xaml
index 391a974efc..f6308feba6 100644
--- a/src/settings-ui/Settings.UI/SettingsXAML/Views/AdvancedPaste.xaml
+++ b/src/settings-ui/Settings.UI/SettingsXAML/Views/AdvancedPaste.xaml
@@ -56,9 +56,23 @@
IsClosable="False"
IsOpen="{x:Bind ViewModel.IsEnabledGpoConfigured, Mode=OneWay}"
IsTabStop="{x:Bind ViewModel.IsEnabledGpoConfigured, Mode=OneWay}"
- Severity="Informational" />
+ Severity="Informational">
+
+
+
+
+
+
+
+
+
@@ -81,12 +95,6 @@
-
-
+ Severity="Informational">
+
+
+
+
+
+
+
+
diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Views/AlwaysOnTopPage.xaml b/src/settings-ui/Settings.UI/SettingsXAML/Views/AlwaysOnTopPage.xaml
index aead2cb5eb..66cf570af0 100644
--- a/src/settings-ui/Settings.UI/SettingsXAML/Views/AlwaysOnTopPage.xaml
+++ b/src/settings-ui/Settings.UI/SettingsXAML/Views/AlwaysOnTopPage.xaml
@@ -27,7 +27,11 @@
IsClosable="False"
IsOpen="{x:Bind ViewModel.IsEnabledGpoConfigured, Mode=OneWay}"
IsTabStop="{x:Bind ViewModel.IsEnabledGpoConfigured, Mode=OneWay}"
- Severity="Informational" />
+ Severity="Informational">
+
+
+
+
+ Severity="Informational">
+
+
+
+
diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Views/AwakePage.xaml.cs b/src/settings-ui/Settings.UI/SettingsXAML/Views/AwakePage.xaml.cs
index 49861c3c0b..3399f425cc 100644
--- a/src/settings-ui/Settings.UI/SettingsXAML/Views/AwakePage.xaml.cs
+++ b/src/settings-ui/Settings.UI/SettingsXAML/Views/AwakePage.xaml.cs
@@ -164,7 +164,7 @@ namespace Microsoft.PowerToys.Settings.UI.Views
{
// Get the enabled state from GPO.
ViewModel.IsEnabledGpoConfigured = true;
- ViewModel.IsEnabled = enabledGpoRuleConfiguration == GpoRuleConfigured.Enabled;
+ ViewModel.EnabledGPOConfiguration = enabledGpoRuleConfiguration == GpoRuleConfigured.Enabled;
}
else
{
diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Views/CmdNotFoundPage.xaml b/src/settings-ui/Settings.UI/SettingsXAML/Views/CmdNotFoundPage.xaml
index 649d306226..5c4a09a9c4 100644
--- a/src/settings-ui/Settings.UI/SettingsXAML/Views/CmdNotFoundPage.xaml
+++ b/src/settings-ui/Settings.UI/SettingsXAML/Views/CmdNotFoundPage.xaml
@@ -21,16 +21,29 @@
+ IsOpen="{x:Bind ViewModel.IsModuleGpoEnabled, Mode=OneWay}"
+ IsTabStop="{x:Bind ViewModel.IsModuleGpoEnabled, Mode=OneWay}"
+ Severity="Informational">
+
+
+
+
+
+
+
+
+
@@ -45,13 +58,17 @@
AutomationProperties.AccessibilityView="Raw"
Foreground="{ThemeResource SystemFillColorSuccessBrush}"
Glyph="" />
-
+
@@ -98,7 +115,10 @@
AutomationProperties.AccessibilityView="Raw"
Foreground="{ThemeResource SystemFillColorCriticalBrush}"
Glyph="" />
-
+
@@ -128,7 +148,10 @@
AutomationProperties.AccessibilityView="Raw"
Foreground="{ThemeResource SystemFillColorCriticalBrush}"
Glyph="" />
-
+
@@ -142,7 +165,6 @@
diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Views/ColorPickerPage.xaml b/src/settings-ui/Settings.UI/SettingsXAML/Views/ColorPickerPage.xaml
index 5762d03064..4d036a517a 100644
--- a/src/settings-ui/Settings.UI/SettingsXAML/Views/ColorPickerPage.xaml
+++ b/src/settings-ui/Settings.UI/SettingsXAML/Views/ColorPickerPage.xaml
@@ -37,7 +37,11 @@
IsClosable="False"
IsOpen="{x:Bind ViewModel.IsEnabledGpoConfigured, Mode=OneWay}"
IsTabStop="{x:Bind ViewModel.IsEnabledGpoConfigured, Mode=OneWay}"
- Severity="Informational" />
+ Severity="Informational">
+
+
+
+
diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Views/CropAndLockPage.xaml b/src/settings-ui/Settings.UI/SettingsXAML/Views/CropAndLockPage.xaml
index 1a3ceab533..ae14649480 100644
--- a/src/settings-ui/Settings.UI/SettingsXAML/Views/CropAndLockPage.xaml
+++ b/src/settings-ui/Settings.UI/SettingsXAML/Views/CropAndLockPage.xaml
@@ -27,7 +27,11 @@
IsClosable="False"
IsOpen="{x:Bind ViewModel.IsEnabledGpoConfigured, Mode=OneWay}"
IsTabStop="{x:Bind ViewModel.IsEnabledGpoConfigured, Mode=OneWay}"
- Severity="Informational" />
+ Severity="Informational">
+
+
+
+
diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Views/EnvironmentVariablesPage.xaml b/src/settings-ui/Settings.UI/SettingsXAML/Views/EnvironmentVariablesPage.xaml
index 3dc0b6bfcb..595710c0c4 100644
--- a/src/settings-ui/Settings.UI/SettingsXAML/Views/EnvironmentVariablesPage.xaml
+++ b/src/settings-ui/Settings.UI/SettingsXAML/Views/EnvironmentVariablesPage.xaml
@@ -23,7 +23,11 @@
IsClosable="False"
IsOpen="{x:Bind ViewModel.IsEnabledGpoConfigured, Mode=OneWay}"
IsTabStop="{x:Bind ViewModel.IsEnabledGpoConfigured, Mode=OneWay}"
- Severity="Informational" />
+ Severity="Informational">
+
+
+
+
+ Severity="Informational">
+
+
+
+
+ Severity="Informational">
+
+
+
+
diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Views/GeneralPage.xaml b/src/settings-ui/Settings.UI/SettingsXAML/Views/GeneralPage.xaml
index c9d284bfeb..6eee331171 100644
--- a/src/settings-ui/Settings.UI/SettingsXAML/Views/GeneralPage.xaml
+++ b/src/settings-ui/Settings.UI/SettingsXAML/Views/GeneralPage.xaml
@@ -63,7 +63,11 @@
IsClosable="False"
IsOpen="{x:Bind ViewModel.SomeUpdateSettingsAreGpoManaged, Mode=OneWay}"
IsTabStop="{x:Bind ViewModel.SomeUpdateSettingsAreGpoManaged, Mode=OneWay}"
- Severity="Informational" />
+ Severity="Informational">
+
+
+
+
+ Severity="Informational">
+
+
+
+
@@ -393,17 +401,24 @@
IsEnabled="{x:Bind ViewModel.IsDataDiagnosticsGPOManaged, Mode=OneWay, Converter={StaticResource BoolNegationConverter}}">
+
+
+
+
+
-
-
+
+
-
@@ -445,4 +454,4 @@
-
\ No newline at end of file
+
diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Views/HostsPage.xaml b/src/settings-ui/Settings.UI/SettingsXAML/Views/HostsPage.xaml
index 2dcc2cbca4..2d0a6d0c2d 100644
--- a/src/settings-ui/Settings.UI/SettingsXAML/Views/HostsPage.xaml
+++ b/src/settings-ui/Settings.UI/SettingsXAML/Views/HostsPage.xaml
@@ -23,7 +23,11 @@
IsClosable="False"
IsOpen="{x:Bind ViewModel.IsEnabledGpoConfigured, Mode=OneWay}"
IsTabStop="{x:Bind ViewModel.IsEnabledGpoConfigured, Mode=OneWay}"
- Severity="Informational" />
+ Severity="Informational">
+
+
+
+
+ Severity="Informational">
+
+
+
+
diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Views/KeyboardManagerPage.xaml b/src/settings-ui/Settings.UI/SettingsXAML/Views/KeyboardManagerPage.xaml
index 02624ca9f0..f6e7a3fddb 100644
--- a/src/settings-ui/Settings.UI/SettingsXAML/Views/KeyboardManagerPage.xaml
+++ b/src/settings-ui/Settings.UI/SettingsXAML/Views/KeyboardManagerPage.xaml
@@ -70,7 +70,11 @@
IsClosable="False"
IsOpen="{x:Bind ViewModel.IsEnabledGpoConfigured, Mode=OneWay}"
IsTabStop="{x:Bind ViewModel.IsEnabledGpoConfigured, Mode=OneWay}"
- Severity="Informational" />
+ Severity="Informational">
+
+
+
+
+ Severity="Informational">
+
+
+
+
diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Views/MouseUtilsPage.xaml b/src/settings-ui/Settings.UI/SettingsXAML/Views/MouseUtilsPage.xaml
index faf79f1092..dce59d6426 100644
--- a/src/settings-ui/Settings.UI/SettingsXAML/Views/MouseUtilsPage.xaml
+++ b/src/settings-ui/Settings.UI/SettingsXAML/Views/MouseUtilsPage.xaml
@@ -34,7 +34,11 @@
IsClosable="False"
IsOpen="{x:Bind ViewModel.IsFindMyMouseEnabledGpoConfigured, Mode=OneWay}"
IsTabStop="{x:Bind ViewModel.IsFindMyMouseEnabledGpoConfigured, Mode=OneWay}"
- Severity="Informational" />
+ Severity="Informational">
+
+
+
+
+ Severity="Informational">
+
+
+
+
+ Severity="Informational">
+
+
+
+
+ Severity="Informational">
+
+
+
+
-
+
+
+
@@ -337,9 +341,9 @@
IsOpen="True"
IsTabStop="{x:Bind ViewModel.ShowPolicyConfiguredInfoForName2IPSetting, Mode=OneWay}"
Severity="Informational">
-
+
+
+
-
+
diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Views/NewPlusPage.xaml b/src/settings-ui/Settings.UI/SettingsXAML/Views/NewPlusPage.xaml
index 7f4e427d65..85bfd8fc5e 100644
--- a/src/settings-ui/Settings.UI/SettingsXAML/Views/NewPlusPage.xaml
+++ b/src/settings-ui/Settings.UI/SettingsXAML/Views/NewPlusPage.xaml
@@ -22,13 +22,16 @@
IsEnabled="{x:Bind ViewModel.IsEnabledGpoConfigured, Mode=OneWay, Converter={StaticResource BoolNegationConverter}}">
-
+ Severity="Informational">
+
+
+
+
-
+
diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Views/PeekPage.xaml b/src/settings-ui/Settings.UI/SettingsXAML/Views/PeekPage.xaml
index b425ed132a..a0339f35cb 100644
--- a/src/settings-ui/Settings.UI/SettingsXAML/Views/PeekPage.xaml
+++ b/src/settings-ui/Settings.UI/SettingsXAML/Views/PeekPage.xaml
@@ -24,7 +24,11 @@
IsClosable="False"
IsOpen="{x:Bind ViewModel.IsEnabledGpoConfigured, Mode=OneWay}"
IsTabStop="{x:Bind ViewModel.IsEnabledGpoConfigured, Mode=OneWay}"
- Severity="Informational" />
+ Severity="Informational">
+
+
+
+
diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Views/PowerAccentPage.xaml b/src/settings-ui/Settings.UI/SettingsXAML/Views/PowerAccentPage.xaml
index 790d8182b3..8ad2d412a2 100644
--- a/src/settings-ui/Settings.UI/SettingsXAML/Views/PowerAccentPage.xaml
+++ b/src/settings-ui/Settings.UI/SettingsXAML/Views/PowerAccentPage.xaml
@@ -38,7 +38,11 @@
IsClosable="False"
IsOpen="{x:Bind ViewModel.IsEnabledGpoConfigured, Mode=OneWay}"
IsTabStop="{x:Bind ViewModel.IsEnabledGpoConfigured, Mode=OneWay}"
- Severity="Informational" />
+ Severity="Informational">
+
+
+
+
+ Severity="Informational">
+
+
+
+
+ Severity="Informational">
+
+
+
+
+
-
+ Severity="Informational">
+
+
+
+
+ Severity="Informational">
+
+
+
+
+ Severity="Informational">
+
+
+
+
+ Severity="Informational">
+
+
+
+
diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Views/RegistryPreviewPage.xaml b/src/settings-ui/Settings.UI/SettingsXAML/Views/RegistryPreviewPage.xaml
index 3e3dc209f4..fb56c82208 100644
--- a/src/settings-ui/Settings.UI/SettingsXAML/Views/RegistryPreviewPage.xaml
+++ b/src/settings-ui/Settings.UI/SettingsXAML/Views/RegistryPreviewPage.xaml
@@ -25,7 +25,11 @@
IsClosable="False"
IsOpen="{x:Bind ViewModel.IsEnabledGpoConfigured, Mode=OneWay}"
IsTabStop="{x:Bind ViewModel.IsEnabledGpoConfigured, Mode=OneWay}"
- Severity="Informational" />
+ Severity="Informational">
+
+
+
+
+ Severity="Informational">
+
+
+
+
diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Views/WorkspacesPage.xaml b/src/settings-ui/Settings.UI/SettingsXAML/Views/WorkspacesPage.xaml
index c8280b33bc..cb13ecc8ce 100644
--- a/src/settings-ui/Settings.UI/SettingsXAML/Views/WorkspacesPage.xaml
+++ b/src/settings-ui/Settings.UI/SettingsXAML/Views/WorkspacesPage.xaml
@@ -26,7 +26,11 @@
IsClosable="False"
IsOpen="{x:Bind ViewModel.IsEnabledGpoConfigured, Mode=OneWay}"
IsTabStop="{x:Bind ViewModel.IsEnabledGpoConfigured, Mode=OneWay}"
- Severity="Informational" />
+ Severity="Informational">
+
+
+
+
diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Views/ZoomItPage.xaml b/src/settings-ui/Settings.UI/SettingsXAML/Views/ZoomItPage.xaml
index 16f20689b7..5a483380c6 100644
--- a/src/settings-ui/Settings.UI/SettingsXAML/Views/ZoomItPage.xaml
+++ b/src/settings-ui/Settings.UI/SettingsXAML/Views/ZoomItPage.xaml
@@ -22,6 +22,13 @@
ModuleImageSource="ms-appx:///Assets/Settings/Modules/ZoomIt.png">
+
-
+ Severity="Informational">
+
+
+
+
@@ -177,11 +182,8 @@
IsEnabled="{x:Bind ViewModel.BreakShowBackgroundFile, Mode=OneWay}">
-
-
+
+
diff --git a/src/settings-ui/Settings.UI/Strings/en-us/Resources.resw b/src/settings-ui/Settings.UI/Strings/en-us/Resources.resw
index 080009b6af..58aa6816b4 100644
--- a/src/settings-ui/Settings.UI/Strings/en-us/Resources.resw
+++ b/src/settings-ui/Settings.UI/Strings/en-us/Resources.resw
@@ -4277,6 +4277,9 @@ Activate by holding the key for the character you want to add an accent to, then
Some settings are managed by your organization.
+
+ AI features are managed by your organization.
+
This setting is managed by your organization.
@@ -4340,6 +4343,14 @@ Activate by holding the key for the character you want to add an accent to, then
Automatically close the AdvancedPaste window after it loses focus
AdvancedPaste is a product name, do not loc
+
+ The Command Not Found module is disabled by your organization.
+ "Command Not Found" is a product name
+
+
+ The Command Not Found module is enabled by your organization.
+ "Command Not Found" is a product name
+
New+
New+ is the name of the utility. Localize product name in accordance with Windows New
diff --git a/src/settings-ui/Settings.UI/ViewModels/AwakeViewModel.cs b/src/settings-ui/Settings.UI/ViewModels/AwakeViewModel.cs
index 2042015717..9de0c269b6 100644
--- a/src/settings-ui/Settings.UI/ViewModels/AwakeViewModel.cs
+++ b/src/settings-ui/Settings.UI/ViewModels/AwakeViewModel.cs
@@ -33,7 +33,18 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
public bool IsEnabled
{
- get => _isEnabled;
+ get
+ {
+ if (_enabledStateIsGPOConfigured)
+ {
+ return _enabledGPOConfiguration;
+ }
+ else
+ {
+ return _isEnabled;
+ }
+ }
+
set
{
if (_isEnabled != value)
@@ -66,6 +77,19 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
}
}
+ public bool EnabledGPOConfiguration
+ {
+ get => _enabledGPOConfiguration;
+ set
+ {
+ if (_enabledGPOConfiguration != value)
+ {
+ _enabledGPOConfiguration = value;
+ NotifyPropertyChanged();
+ }
+ }
+ }
+
public bool IsExpirationConfigurationEnabled => ModuleSettings.Properties.Mode == AwakeMode.EXPIRABLE && IsEnabled;
public bool IsTimeConfigurationEnabled => ModuleSettings.Properties.Mode == AwakeMode.TIMED && IsEnabled;
@@ -198,6 +222,7 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
}
private bool _enabledStateIsGPOConfigured;
+ private bool _enabledGPOConfiguration;
private AwakeSettings _moduleSettings;
private bool _isEnabled;
}
diff --git a/src/settings-ui/Settings.UI/ViewModels/CmdNotFoundViewModel.cs b/src/settings-ui/Settings.UI/ViewModels/CmdNotFoundViewModel.cs
index f0fd6a4ab8..37ad090abf 100644
--- a/src/settings-ui/Settings.UI/ViewModels/CmdNotFoundViewModel.cs
+++ b/src/settings-ui/Settings.UI/ViewModels/CmdNotFoundViewModel.cs
@@ -32,7 +32,8 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
public ButtonClickCommand UninstallModuleEventHandler => new ButtonClickCommand(UninstallModule);
private GpoRuleConfigured _enabledGpoRuleConfiguration;
- private bool _enabledStateIsGPOConfigured;
+ private bool _moduleIsGpoEnabled;
+ private bool _moduleIsGpoDisabled;
public static string AssemblyDirectory
{
@@ -53,11 +54,8 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
private void InitializeEnabledValue()
{
_enabledGpoRuleConfiguration = GPOWrapper.GetConfiguredCmdNotFoundEnabledValue();
- if (_enabledGpoRuleConfiguration == GpoRuleConfigured.Disabled || _enabledGpoRuleConfiguration == GpoRuleConfigured.Enabled)
- {
- // Get the enabled state from GPO.
- _enabledStateIsGPOConfigured = true;
- }
+ _moduleIsGpoEnabled = _enabledGpoRuleConfiguration == GpoRuleConfigured.Enabled;
+ _moduleIsGpoDisabled = _enabledGpoRuleConfiguration == GpoRuleConfigured.Disabled;
// Update PATH environment variable to get pwsh.exe on further calls.
Environment.SetEnvironmentVariable("PATH", (Environment.GetEnvironmentVariable("PATH", EnvironmentVariableTarget.Machine) ?? string.Empty) + ";" + (Environment.GetEnvironmentVariable("PATH", EnvironmentVariableTarget.User) ?? string.Empty), EnvironmentVariableTarget.Process);
@@ -128,9 +126,14 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
}
}
- public bool IsEnabledGpoConfigured
+ public bool IsModuleGpoEnabled
{
- get => _enabledStateIsGPOConfigured;
+ get => _moduleIsGpoEnabled;
+ }
+
+ public bool IsModuleGpoDisabled
+ {
+ get => _moduleIsGpoDisabled;
}
public string RunPowerShellOrPreviewScript(string powershellExecutable, string powershellArguments, bool hidePowerShellWindow = false)
diff --git a/src/settings-ui/Settings.UI/ViewModels/PowerOcrViewModel.cs b/src/settings-ui/Settings.UI/ViewModels/PowerOcrViewModel.cs
index e64db72614..f7b81de07a 100644
--- a/src/settings-ui/Settings.UI/ViewModels/PowerOcrViewModel.cs
+++ b/src/settings-ui/Settings.UI/ViewModels/PowerOcrViewModel.cs
@@ -264,6 +264,12 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
GC.SuppressFinalize(this);
}
+ public string SnippingToolInfoBarMargin
+ {
+ // Workaround for wrong StackPanel behavior: On hidden controls the margin is still reserved.
+ get => IsWin11OrGreater ? "0,0,0,25" : "0,0,0,0";
+ }
+
private string EnsureStartUpper(string input)
{
if (string.IsNullOrEmpty(input))