From e6a1dd586ad2b8da8d6e6e11b84721559b5856ea Mon Sep 17 00:00:00 2001 From: Heiko <61519853+htcfreek@users.noreply.github.com> Date: Thu, 25 Jan 2024 14:59:00 +0100 Subject: [PATCH] [GPO][Settings]Improve UI messages and fixes (#31073) * Changes Part 1 * Changes Part 2 * Changes Part 3 * General page --- .../SettingsXAML/Flyout/AppsListPage.xaml | 2 +- .../SettingsXAML/Views/AlwaysOnTopPage.xaml | 2 +- .../SettingsXAML/Views/AwakePage.xaml | 2 +- .../SettingsXAML/Views/CmdNotFoundPage.xaml | 2 +- .../SettingsXAML/Views/ColorPickerPage.xaml | 2 +- .../SettingsXAML/Views/CropAndLockPage.xaml | 2 +- .../SettingsXAML/Views/DashboardPage.xaml | 4 +- .../Views/EnvironmentVariablesPage.xaml | 2 +- .../SettingsXAML/Views/FancyZonesPage.xaml | 2 +- .../SettingsXAML/Views/FileLocksmithPage.xaml | 2 +- .../SettingsXAML/Views/GeneralPage.xaml | 8 +- .../SettingsXAML/Views/HostsPage.xaml | 2 +- .../SettingsXAML/Views/ImageResizerPage.xaml | 2 +- .../Views/KeyboardManagerPage.xaml | 2 +- .../SettingsXAML/Views/MeasureToolPage.xaml | 2 +- .../SettingsXAML/Views/MouseUtilsPage.xaml | 8 +- .../Views/MouseWithoutBordersPage.xaml | 2 +- .../SettingsXAML/Views/PastePlainPage.xaml | 2 +- .../SettingsXAML/Views/PeekPage.xaml | 2 +- .../SettingsXAML/Views/PowerAccentPage.xaml | 2 +- .../SettingsXAML/Views/PowerLauncherPage.xaml | 4 +- .../SettingsXAML/Views/PowerOcrPage.xaml | 2 +- .../SettingsXAML/Views/PowerPreviewPage.xaml | 167 +++++------ .../SettingsXAML/Views/PowerRenamePage.xaml | 2 +- .../Views/RegistryPreviewPage.xaml | 2 +- .../SettingsXAML/Views/ShortcutGuidePage.xaml | 2 +- .../SettingsXAML/Views/VideoConference.xaml | 2 +- .../Settings.UI/Strings/en-us/Resources.resw | 27 +- .../ViewModels/PowerPreviewViewModel.cs | 275 +++++++++++++++--- 29 files changed, 364 insertions(+), 173 deletions(-) diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Flyout/AppsListPage.xaml b/src/settings-ui/Settings.UI/SettingsXAML/Flyout/AppsListPage.xaml index ae8bd5e077..54a2c096be 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/Flyout/AppsListPage.xaml +++ b/src/settings-ui/Settings.UI/SettingsXAML/Flyout/AppsListPage.xaml @@ -91,7 +91,7 @@ Glyph="" Visibility="{x:Bind IsLocked, Converter={StaticResource BoolToInvertedVisibilityConverter}, ConverterParameter=True, Mode=OneWay}"> - + - + - + + + + - + IsEnabled="{x:Bind ViewModel.SVGRenderIsGpoDisabled, Mode=OneWay, Converter={StaticResource BoolNegationConverter}}"> + - - - + IsEnabled="{x:Bind ViewModel.MDRenderIsGpoDisabled, Mode=OneWay, Converter={StaticResource BoolNegationConverter}}"> + - - - - + IsEnabled="{x:Bind ViewModel.MonacoRenderIsGpoDisabled, Mode=OneWay, Converter={StaticResource BoolNegationConverter}}"> + @@ -100,49 +102,35 @@ - - - + IsEnabled="{x:Bind ViewModel.PDFRenderIsGpoDisabled, Mode=OneWay, Converter={StaticResource BoolNegationConverter}}"> + - + - + IsEnabled="{x:Bind ViewModel.GCODERenderIsGpoDisabled, Mode=OneWay, Converter={StaticResource BoolNegationConverter}}"> + - + - + IsEnabled="{x:Bind ViewModel.QOIRenderIsGpoDisabled, Mode=OneWay, Converter={StaticResource BoolNegationConverter}}"> + - @@ -158,74 +146,67 @@ IsOpen="True" IsTabStop="True" Severity="Warning" /> + + - + IsEnabled="{x:Bind ViewModel.SVGThumbnailIsGpoDisabled, Mode=OneWay, Converter={StaticResource BoolNegationConverter}}"> + - + - + IsEnabled="{x:Bind ViewModel.PDFThumbnailIsGpoDisabled, Mode=OneWay, Converter={StaticResource BoolNegationConverter}}"> + - + - + IsEnabled="{x:Bind ViewModel.GCODEThumbnailIsGpoDisabled, Mode=OneWay, Converter={StaticResource BoolNegationConverter}}"> + - - - + IsEnabled="{x:Bind ViewModel.STLThumbnailIsGpoDisabled, Mode=OneWay, Converter={StaticResource BoolNegationConverter}}"> + - - + IsEnabled="{x:Bind ViewModel.QOIThumbnailIsGpoDisabled, Mode=OneWay, Converter={StaticResource BoolNegationConverter}}"> + - diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Views/PowerRenamePage.xaml b/src/settings-ui/Settings.UI/SettingsXAML/Views/PowerRenamePage.xaml index bcb784c1e6..31a5c8accf 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/Views/PowerRenamePage.xaml +++ b/src/settings-ui/Settings.UI/SettingsXAML/Views/PowerRenamePage.xaml @@ -23,7 +23,7 @@ Shell integration This refers to directly integrating in with Windows - - This setting is enforced by your System Administrator. + + This setting is managed by your organization. Additional content includes the file header and lines that can't parse @@ -3650,9 +3650,6 @@ Activate by holding the key for the character you want to add an accent to, then Allow experimentation with new features - - The system administrator has disabled experimentation. - Paste As Plain Text Product name: Navigation view item name for Paste as Plain Text @@ -3848,9 +3845,6 @@ Activate by holding the key for the character you want to add an accent to, then Enable Mouse Jump "Mouse Jump" is the name of the utility. - - The system administrator has disabled the automatic download of updates. - 127.0.0.1, ::1, ... "127.0.0.1 and ::1" are well known loopback addresses, do not loc @@ -3937,8 +3931,8 @@ Activate by holding the key for the character you want to add an accent to, then Find more plugins - - The system administrator is managing the enabled state of some plugins. + + The enabled state of some plugins is managed by your organization. Opacity (%) @@ -3966,8 +3960,8 @@ Activate by holding the key for the character you want to add an accent to, then Dashboard - - This setting is enforced by your System Administrator. + + Some settings are managed by your organization. Disabled modules @@ -4027,4 +4021,13 @@ Activate by holding the key for the character you want to add an accent to, then Show notifications for new updates + + This setting is managed by your organization. + + + The enabled state of some preview handlers is managed by your organization. + + + The enabled state of some thumbnail handlers is managed by your organization. + \ No newline at end of file diff --git a/src/settings-ui/Settings.UI/ViewModels/PowerPreviewViewModel.cs b/src/settings-ui/Settings.UI/ViewModels/PowerPreviewViewModel.cs index 6179677d29..43e0c54cfd 100644 --- a/src/settings-ui/Settings.UI/ViewModels/PowerPreviewViewModel.cs +++ b/src/settings-ui/Settings.UI/ViewModels/PowerPreviewViewModel.cs @@ -49,6 +49,8 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels // Get the enabled state from GPO. _svgRenderEnabledStateIsGPOConfigured = true; _svgRenderIsEnabled = _svgRenderEnabledGpoRuleConfiguration == GpoRuleConfigured.Enabled; + _svgRenderIsGpoEnabled = _svgRenderEnabledGpoRuleConfiguration == GpoRuleConfigured.Enabled; + _svgRenderIsGpoDisabled = _svgRenderEnabledGpoRuleConfiguration == GpoRuleConfigured.Disabled; } else { @@ -59,24 +61,14 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels _svgBackgroundSolidColor = Settings.Properties.SvgBackgroundSolidColor.Value; _svgBackgroundCheckeredShade = Settings.Properties.SvgBackgroundCheckeredShade.Value; - _svgThumbnailEnabledGpoRuleConfiguration = GPOWrapper.GetConfiguredSvgThumbnailsEnabledValue(); - if (_svgThumbnailEnabledGpoRuleConfiguration == GpoRuleConfigured.Disabled || _svgThumbnailEnabledGpoRuleConfiguration == GpoRuleConfigured.Enabled) - { - // Get the enabled state from GPO. - _svgThumbnailEnabledStateIsGPOConfigured = true; - _svgThumbnailIsEnabled = _svgThumbnailEnabledGpoRuleConfiguration == GpoRuleConfigured.Enabled; - } - else - { - _svgThumbnailIsEnabled = Settings.Properties.EnableSvgThumbnail; - } - _mdRenderEnabledGpoRuleConfiguration = GPOWrapper.GetConfiguredMarkdownPreviewEnabledValue(); if (_mdRenderEnabledGpoRuleConfiguration == GpoRuleConfigured.Disabled || _mdRenderEnabledGpoRuleConfiguration == GpoRuleConfigured.Enabled) { // Get the enabled state from GPO. _mdRenderEnabledStateIsGPOConfigured = true; _mdRenderIsEnabled = _mdRenderEnabledGpoRuleConfiguration == GpoRuleConfigured.Enabled; + _mdRenderIsGpoEnabled = _mdRenderEnabledGpoRuleConfiguration == GpoRuleConfigured.Enabled; + _mdRenderIsGpoDisabled = _mdRenderEnabledGpoRuleConfiguration == GpoRuleConfigured.Disabled; } else { @@ -89,6 +81,8 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels // Get the enabled state from GPO. _monacoRenderEnabledStateIsGPOConfigured = true; _monacoRenderIsEnabled = _monacoRenderEnabledGpoRuleConfiguration == GpoRuleConfigured.Enabled; + _monacoRenderIsGpoEnabled = _monacoRenderEnabledGpoRuleConfiguration == GpoRuleConfigured.Enabled; + _monacoRenderIsGpoDisabled = _monacoRenderEnabledGpoRuleConfiguration == GpoRuleConfigured.Disabled; } else { @@ -105,6 +99,8 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels // Get the enabled state from GPO. _pdfRenderEnabledStateIsGPOConfigured = true; _pdfRenderIsEnabled = _pdfRenderEnabledGpoRuleConfiguration == GpoRuleConfigured.Enabled; + _pdfRenderIsGpoEnabled = _pdfRenderEnabledGpoRuleConfiguration == GpoRuleConfigured.Enabled; + _pdfRenderIsGpoDisabled = _pdfRenderEnabledGpoRuleConfiguration == GpoRuleConfigured.Disabled; } else { @@ -117,6 +113,8 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels // Get the enabled state from GPO. _gcodeRenderEnabledStateIsGPOConfigured = true; _gcodeRenderIsEnabled = _gcodeRenderEnabledGpoRuleConfiguration == GpoRuleConfigured.Enabled; + _gcodeRenderIsGpoEnabled = _gcodeRenderEnabledGpoRuleConfiguration == GpoRuleConfigured.Enabled; + _gcodeRenderIsGpoDisabled = _gcodeRenderEnabledGpoRuleConfiguration == GpoRuleConfigured.Disabled; } else { @@ -129,18 +127,36 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels // Get the enabled state from GPO. _qoiRenderEnabledStateIsGPOConfigured = true; _qoiRenderIsEnabled = _qoiRenderEnabledGpoRuleConfiguration == GpoRuleConfigured.Enabled; + _qoiRenderIsGpoEnabled = _qoiRenderEnabledGpoRuleConfiguration == GpoRuleConfigured.Enabled; + _qoiRenderIsGpoDisabled = _qoiRenderEnabledGpoRuleConfiguration == GpoRuleConfigured.Disabled; } else { _qoiRenderIsEnabled = Settings.Properties.EnableQoiPreview; } + _svgThumbnailEnabledGpoRuleConfiguration = GPOWrapper.GetConfiguredSvgThumbnailsEnabledValue(); + if (_svgThumbnailEnabledGpoRuleConfiguration == GpoRuleConfigured.Disabled || _svgThumbnailEnabledGpoRuleConfiguration == GpoRuleConfigured.Enabled) + { + // Get the enabled state from GPO. + _svgThumbnailEnabledStateIsGPOConfigured = true; + _svgThumbnailIsEnabled = _svgThumbnailEnabledGpoRuleConfiguration == GpoRuleConfigured.Enabled; + _svgThumbnailIsGpoEnabled = _svgThumbnailEnabledGpoRuleConfiguration == GpoRuleConfigured.Enabled; + _svgThumbnailIsGpoDisabled = _svgThumbnailEnabledGpoRuleConfiguration == GpoRuleConfigured.Disabled; + } + else + { + _svgThumbnailIsEnabled = Settings.Properties.EnableSvgThumbnail; + } + _pdfThumbnailEnabledGpoRuleConfiguration = GPOWrapper.GetConfiguredPdfThumbnailsEnabledValue(); if (_pdfThumbnailEnabledGpoRuleConfiguration == GpoRuleConfigured.Disabled || _pdfThumbnailEnabledGpoRuleConfiguration == GpoRuleConfigured.Enabled) { // Get the enabled state from GPO. _pdfThumbnailEnabledStateIsGPOConfigured = true; _pdfThumbnailIsEnabled = _pdfThumbnailEnabledGpoRuleConfiguration == GpoRuleConfigured.Enabled; + _pdfThumbnailIsGpoEnabled = _pdfThumbnailEnabledGpoRuleConfiguration == GpoRuleConfigured.Enabled; + _pdfThumbnailIsGpoDisabled = _pdfThumbnailEnabledGpoRuleConfiguration == GpoRuleConfigured.Disabled; } else { @@ -153,6 +169,8 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels // Get the enabled state from GPO. _gcodeThumbnailEnabledStateIsGPOConfigured = true; _gcodeThumbnailIsEnabled = _gcodeThumbnailEnabledGpoRuleConfiguration == GpoRuleConfigured.Enabled; + _gcodeThumbnailIsGpoEnabled = _gcodeThumbnailEnabledGpoRuleConfiguration == GpoRuleConfigured.Enabled; + _gcodeThumbnailIsGpoDisabled = _gcodeThumbnailEnabledGpoRuleConfiguration == GpoRuleConfigured.Disabled; } else { @@ -165,6 +183,8 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels // Get the enabled state from GPO. _stlThumbnailEnabledStateIsGPOConfigured = true; _stlThumbnailIsEnabled = _stlThumbnailEnabledGpoRuleConfiguration == GpoRuleConfigured.Enabled; + _stlThumbnailIsGpoEnabled = _stlThumbnailEnabledGpoRuleConfiguration == GpoRuleConfigured.Enabled; + _stlThumbnailIsGpoDisabled = _stlThumbnailEnabledGpoRuleConfiguration == GpoRuleConfigured.Disabled; } else { @@ -179,6 +199,8 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels // Get the enabled state from GPO. _qoiThumbnailEnabledStateIsGPOConfigured = true; _qoiThumbnailIsEnabled = _qoiThumbnailEnabledGpoRuleConfiguration == GpoRuleConfigured.Enabled; + _qoiThumbnailIsGpoEnabled = _qoiThumbnailEnabledGpoRuleConfiguration == GpoRuleConfigured.Enabled; + _qoiThumbnailIsGpoDisabled = _qoiThumbnailEnabledGpoRuleConfiguration == GpoRuleConfigured.Disabled; } else { @@ -188,6 +210,8 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels private GpoRuleConfigured _svgRenderEnabledGpoRuleConfiguration; private bool _svgRenderEnabledStateIsGPOConfigured; + private bool _svgRenderIsGpoEnabled; + private bool _svgRenderIsGpoDisabled; private bool _svgRenderIsEnabled; private int _svgBackgroundColorMode; private string _svgBackgroundSolidColor; @@ -195,10 +219,14 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels private GpoRuleConfigured _mdRenderEnabledGpoRuleConfiguration; private bool _mdRenderEnabledStateIsGPOConfigured; + private bool _mdRenderIsGpoEnabled; + private bool _mdRenderIsGpoDisabled; private bool _mdRenderIsEnabled; private GpoRuleConfigured _monacoRenderEnabledGpoRuleConfiguration; private bool _monacoRenderEnabledStateIsGPOConfigured; + private bool _monacoRenderIsGpoEnabled; + private bool _monacoRenderIsGpoDisabled; private bool _monacoRenderIsEnabled; private bool _monacoWrapText; private bool _monacoPreviewTryFormat; @@ -206,37 +234,73 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels private GpoRuleConfigured _pdfRenderEnabledGpoRuleConfiguration; private bool _pdfRenderEnabledStateIsGPOConfigured; + private bool _pdfRenderIsGpoEnabled; + private bool _pdfRenderIsGpoDisabled; private bool _pdfRenderIsEnabled; private GpoRuleConfigured _gcodeRenderEnabledGpoRuleConfiguration; private bool _gcodeRenderEnabledStateIsGPOConfigured; + private bool _gcodeRenderIsGpoEnabled; + private bool _gcodeRenderIsGpoDisabled; private bool _gcodeRenderIsEnabled; private GpoRuleConfigured _qoiRenderEnabledGpoRuleConfiguration; private bool _qoiRenderEnabledStateIsGPOConfigured; + private bool _qoiRenderIsGpoEnabled; + private bool _qoiRenderIsGpoDisabled; private bool _qoiRenderIsEnabled; private GpoRuleConfigured _svgThumbnailEnabledGpoRuleConfiguration; private bool _svgThumbnailEnabledStateIsGPOConfigured; + private bool _svgThumbnailIsGpoEnabled; + private bool _svgThumbnailIsGpoDisabled; private bool _svgThumbnailIsEnabled; private GpoRuleConfigured _pdfThumbnailEnabledGpoRuleConfiguration; private bool _pdfThumbnailEnabledStateIsGPOConfigured; + private bool _pdfThumbnailIsGpoEnabled; + private bool _pdfThumbnailIsGpoDisabled; private bool _pdfThumbnailIsEnabled; private GpoRuleConfigured _gcodeThumbnailEnabledGpoRuleConfiguration; private bool _gcodeThumbnailEnabledStateIsGPOConfigured; + private bool _gcodeThumbnailIsGpoEnabled; + private bool _gcodeThumbnailIsGpoDisabled; private bool _gcodeThumbnailIsEnabled; private GpoRuleConfigured _stlThumbnailEnabledGpoRuleConfiguration; private bool _stlThumbnailEnabledStateIsGPOConfigured; + private bool _stlThumbnailIsGpoEnabled; + private bool _stlThumbnailIsGpoDisabled; private bool _stlThumbnailIsEnabled; private string _stlThumbnailColor; private GpoRuleConfigured _qoiThumbnailEnabledGpoRuleConfiguration; private bool _qoiThumbnailEnabledStateIsGPOConfigured; + private bool _qoiThumbnailIsGpoEnabled; + private bool _qoiThumbnailIsGpoDisabled; private bool _qoiThumbnailIsEnabled; + public bool SomePreviewPaneEnabledGposConfigured + { + get + { + return _svgRenderEnabledStateIsGPOConfigured || _mdRenderEnabledStateIsGPOConfigured + || _monacoRenderEnabledStateIsGPOConfigured || _pdfRenderEnabledStateIsGPOConfigured + || _gcodeRenderEnabledStateIsGPOConfigured || _qoiRenderEnabledStateIsGPOConfigured; + } + } + + public bool SomeThumbnailEnabledGposConfigured + { + get + { + return _svgThumbnailEnabledStateIsGPOConfigured || _pdfThumbnailEnabledStateIsGPOConfigured + || _gcodeThumbnailEnabledStateIsGPOConfigured || _stlThumbnailEnabledStateIsGPOConfigured + || _qoiThumbnailEnabledStateIsGPOConfigured; + } + } + public bool SVGRenderIsEnabled { get @@ -333,9 +397,22 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels } } - public bool IsSVGRenderEnabledGpoConfigured + // Used to only disable enabled button on forced enabled state. (With this users still able to change the utility properties.) + public bool SVGRenderIsGpoEnabled { - get => _svgRenderEnabledStateIsGPOConfigured; + get + { + return _svgRenderIsGpoEnabled; + } + } + + // Used to disable the settings card on forced disabled state. + public bool SVGRenderIsGpoDisabled + { + get + { + return _svgRenderIsGpoDisabled; + } } public bool SVGThumbnailIsEnabled @@ -362,9 +439,22 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels } } - public bool IsSVGThumbnailEnabledGpoConfigured + // Used to only disable enabled button on forced enabled state. (With this users still able to change the utility properties.) + public bool SVGThumbnailIsGpoEnabled { - get => _svgThumbnailEnabledStateIsGPOConfigured; + get + { + return _svgThumbnailIsGpoEnabled; + } + } + + // Used to disable the settings card on forced disabled state. + public bool SVGThumbnailIsGpoDisabled + { + get + { + return _svgThumbnailIsGpoDisabled; + } } public bool MDRenderIsEnabled @@ -391,9 +481,22 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels } } - public bool IsMDRenderEnabledGpoConfigured + // Used to only disable enabled button on forced enabled state. (With this users still able to change the utility properties.) + public bool MDRenderIsGpoEnabled { - get => _mdRenderEnabledStateIsGPOConfigured; + get + { + return _mdRenderIsGpoEnabled; + } + } + + // Used to disable the settings card on forced disabled state. + public bool MDRenderIsGpoDisabled + { + get + { + return _mdRenderIsGpoDisabled; + } } public bool MonacoRenderIsEnabled @@ -420,9 +523,22 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels } } - public bool IsMonacoRenderEnabledGpoConfigured + // Used to only disable enabled button on forced enabled state. (With this users still able to change the utility properties.) + public bool MonacoRenderIsGpoEnabled { - get => _monacoRenderEnabledStateIsGPOConfigured; + get + { + return _monacoRenderIsGpoEnabled; + } + } + + // Used to disable the settings card on forced disabled state. + public bool MonacoRenderIsGpoDisabled + { + get + { + return _monacoRenderIsGpoDisabled; + } } public bool MonacoWrapText @@ -503,9 +619,22 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels } } - public bool IsPDFRenderEnabledGpoConfigured + // Used to only disable enabled button on forced enabled state. (With this users still able to change the utility properties.) + public bool PDFRenderIsGpoEnabled { - get => _pdfRenderEnabledStateIsGPOConfigured; + get + { + return _pdfRenderIsGpoEnabled; + } + } + + // Used to disable the settings card on forced disabled state. + public bool PDFRenderIsGpoDisabled + { + get + { + return _pdfRenderIsGpoDisabled; + } } public bool PDFThumbnailIsEnabled @@ -532,9 +661,22 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels } } - public bool IsPDFThumbnailEnabledGpoConfigured + // Used to only disable enabled button on forced enabled state. (With this users still able to change the utility properties.) + public bool PDFThumbnailIsGpoEnabled { - get => _pdfThumbnailEnabledStateIsGPOConfigured; + get + { + return _pdfThumbnailIsGpoEnabled; + } + } + + // Used to disable the settings card on forced disabled state. + public bool PDFThumbnailIsGpoDisabled + { + get + { + return _pdfThumbnailIsGpoDisabled; + } } public bool GCODERenderIsEnabled @@ -561,9 +703,22 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels } } - public bool IsGCODERenderEnabledGpoConfigured + // Used to only disable enabled button on forced enabled state. (With this users still able to change the utility properties.) + public bool GCODERenderIsGpoEnabled { - get => _gcodeRenderEnabledStateIsGPOConfigured; + get + { + return _gcodeRenderIsGpoEnabled; + } + } + + // Used to disable the settings card on forced disabled state. + public bool GCODERenderIsGpoDisabled + { + get + { + return _gcodeRenderIsGpoDisabled; + } } public bool GCODEThumbnailIsEnabled @@ -590,9 +745,22 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels } } - public bool IsGCODEThumbnailEnabledGpoConfigured + // Used to only disable enabled button on forced enabled state. (With this users still able to change the utility properties.) + public bool GCODEThumbnailIsGpoEnabled { - get => _gcodeThumbnailEnabledStateIsGPOConfigured; + get + { + return _gcodeThumbnailIsGpoEnabled; + } + } + + // Used to disable the settings card on forced disabled state. + public bool GCODEThumbnailIsGpoDisabled + { + get + { + return _gcodeThumbnailIsGpoDisabled; + } } public bool STLThumbnailIsEnabled @@ -619,9 +787,22 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels } } - public bool IsSTLThumbnailEnabledGpoConfigured + // Used to only disable enabled button on forced enabled state. (With this users still able to change the utility properties.) + public bool STLThumbnailIsGpoEnabled { - get => _stlThumbnailEnabledStateIsGPOConfigured; + get + { + return _stlThumbnailIsGpoEnabled; + } + } + + // Used to disable the settings card on forced disabled state. + public bool STLThumbnailIsGpoDisabled + { + get + { + return _stlThumbnailIsGpoDisabled; + } } public string STLThumbnailColor @@ -666,9 +847,22 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels } } - public bool IsQOIRenderEnabledGpoConfigured + // Used to only disable enabled button on forced enabled state. (With this users still able to change the utility properties.) + public bool QOIRenderIsGpoEnabled { - get => _qoiRenderEnabledStateIsGPOConfigured; + get + { + return _qoiRenderIsGpoEnabled; + } + } + + // Used to disable the settings card on forced disabled state. + public bool QOIRenderIsGpoDisabled + { + get + { + return _qoiRenderIsGpoDisabled; + } } public bool QOIThumbnailIsEnabled @@ -695,9 +889,22 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels } } - public bool IsQOIThumbnailEnabledGpoConfigured + // Used to only disable enabled button on forced enabled state. (With this users still able to change the utility properties.) + public bool QOIThumbnailIsGpoEnabled { - get => _qoiThumbnailEnabledStateIsGPOConfigured; + get + { + return _qoiRenderIsGpoEnabled; + } + } + + // Used to disable the settings card on forced disabled state. + public bool QOIThumbnailIsGpoDisabled + { + get + { + return _qoiThumbnailIsGpoDisabled; + } } public string GetSettingsSubPath()