mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 11:48:06 +01:00
[Settings][PTRun]Grey out score adjustment when plugin is not global (#19301)
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -319,7 +319,7 @@
|
||||
|
||||
<controls:Setting x:Uid="PowerLauncher_PluginWeightBoost"
|
||||
Style="{StaticResource ExpanderContentSettingStyleTight}"
|
||||
IsEnabled="{x:Bind Enabled, Mode=OneWay}">
|
||||
IsEnabled="{x:Bind IsGlobalAndEnabled, Mode=OneWay}">
|
||||
<controls:Setting.ActionContent>
|
||||
<TextBox Text="{x:Bind Path=WeightBoost, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
MinWidth="{StaticResource SettingActionControlMinWidth}" />
|
||||
|
||||
Reference in New Issue
Block a user