[Settings][PTRun]Grey out score adjustment when plugin is not global (#19301)

This commit is contained in:
Jeff Lord
2022-07-15 05:26:08 -04:00
committed by GitHub
parent c08135d6e3
commit 8e2570033c
2 changed files with 11 additions and 1 deletions

View File

@@ -59,6 +59,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
NotifyPropertyChanged(nameof(ShowNotAllowedKeywordWarning));
NotifyPropertyChanged(nameof(Enabled));
NotifyPropertyChanged(nameof(DisabledOpacity));
NotifyPropertyChanged(nameof(IsGlobalAndEnabled));
}
}
}
@@ -67,6 +68,14 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
public double DisabledOpacity => Disabled ? 0.5 : 1;
public bool IsGlobalAndEnabled
{
get
{
return IsGlobal && Enabled;
}
}
public bool IsGlobal
{
get
@@ -81,6 +90,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
settings.IsGlobal = value;
NotifyPropertyChanged();
NotifyPropertyChanged(nameof(ShowNotAccessibleWarning));
NotifyPropertyChanged(nameof(IsGlobalAndEnabled));
}
}
}