mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Remove CollapsedWhen/VisibleWhen extension constructors with two arguments, forcing the user to explicitly specify IsEqualTo for clarity
This commit is contained in:
parent
88e7000155
commit
61d3758359
4 changed files with 4 additions and 12 deletions
|
|
@ -39,12 +39,6 @@ public class CollapsedWhenExtension : MarkupExtension {
|
|||
When = when;
|
||||
}
|
||||
|
||||
public CollapsedWhenExtension(Binding when, object? isEqualTo)
|
||||
{
|
||||
When = when;
|
||||
IsEqualTo = isEqualTo;
|
||||
}
|
||||
|
||||
public override object ProvideValue(IServiceProvider serviceProvider) {
|
||||
if (serviceProvider.GetService(typeof(IProvideValueTarget)) is not IProvideValueTarget provideValueTarget)
|
||||
return DependencyProperty.UnsetValue;
|
||||
|
|
|
|||
|
|
@ -11,6 +11,4 @@ public class VisibleWhenExtension : CollapsedWhenExtension
|
|||
protected override Visibility InvertedVisibility => Visibility.Visible;
|
||||
|
||||
public VisibleWhenExtension(Binding when) : base(when) { }
|
||||
|
||||
public VisibleWhenExtension(Binding when, object? isEqualTo) : base(when, isEqualTo) { }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@
|
|||
SelectedValue="{Binding Settings.CustomScreenNumber}"
|
||||
Visibility="{ext:VisibleWhen
|
||||
{Binding Settings.SearchWindowScreen},
|
||||
{x:Static userSettings:SearchWindowScreens.Custom}}"
|
||||
IsEqualTo={x:Static userSettings:SearchWindowScreens.Custom}}"
|
||||
/>
|
||||
</StackPanel>
|
||||
</cc:Card>
|
||||
|
|
@ -75,7 +75,7 @@
|
|||
Title="{DynamicResource SearchWindowAlign}"
|
||||
Visibility="{ext:CollapsedWhen
|
||||
{Binding Settings.SearchWindowScreen},
|
||||
{x:Static userSettings:SearchWindowScreens.RememberLastLaunchLocation}}">
|
||||
IsEqualTo={x:Static userSettings:SearchWindowScreens.RememberLastLaunchLocation}}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<ComboBox
|
||||
MinWidth="160"
|
||||
|
|
@ -92,7 +92,7 @@
|
|||
VerticalAlignment="Center"
|
||||
Visibility="{ext:VisibleWhen
|
||||
{Binding Settings.SearchWindowAlign},
|
||||
{x:Static userSettings:SearchWindowAligns.Custom}}">
|
||||
IsEqualTo={x:Static userSettings:SearchWindowAligns.Custom}}">
|
||||
<TextBox VerticalAlignment="Center" MinWidth="80"
|
||||
Text="{Binding Settings.CustomWindowLeft}" />
|
||||
<TextBlock VerticalAlignment="Center" Margin="10" Text="x" />
|
||||
|
|
|
|||
|
|
@ -425,7 +425,7 @@
|
|||
TextWrapping="NoWrap"
|
||||
Visibility="{ext:VisibleWhen
|
||||
{Binding Settings.AnimationSpeed},
|
||||
{x:Static userSettings:AnimationSpeeds.Custom}}" />
|
||||
IsEqualTo={x:Static userSettings:AnimationSpeeds.Custom}}" />
|
||||
</StackPanel>
|
||||
</cc:Card>
|
||||
</cc:CardGroup>
|
||||
|
|
|
|||
Loading…
Reference in a new issue