mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Add back field to avoid duplicate plugin control loading
This commit is contained in:
parent
8a59e87f99
commit
5487834ed0
2 changed files with 4 additions and 3 deletions
|
|
@ -774,7 +774,7 @@
|
|||
<Style TargetType="{x:Type Border}">
|
||||
<Setter Property="Visibility" Value="Visible" />
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding ElementName=SettingControl, Path=ActualHeight}" Value="0">
|
||||
<DataTrigger Binding="{Binding ElementName=PluginSettingControl, Path=ActualHeight}" Value="0">
|
||||
<Setter Property="Visibility" Value="Collapsed" />
|
||||
<Setter Property="BorderThickness" Value="0" />
|
||||
<Setter Property="Padding" Value="0" />
|
||||
|
|
@ -784,7 +784,7 @@
|
|||
</Border.Style>
|
||||
</Border>
|
||||
<!--#endregion-->
|
||||
<ContentControl x:Name="SettingControl"
|
||||
<ContentControl x:Name="PluginSettingControl"
|
||||
Content="{Binding SettingControl}"
|
||||
Padding="1" Margin="0" VerticalAlignment="Stretch"
|
||||
MaxWidth="750" MaxHeight="550">
|
||||
|
|
|
|||
|
|
@ -31,7 +31,8 @@ namespace Flow.Launcher.ViewModel
|
|||
set => PluginPair.Metadata.Disabled = !value;
|
||||
}
|
||||
|
||||
public Control SettingControl => PluginPair.Plugin is not ISettingProvider settingProvider ? new Control() : settingProvider.CreateSettingPanel();
|
||||
private Control _settingControl;
|
||||
public Control SettingControl => _settingControl ??= PluginPair.Plugin is not ISettingProvider settingProvider ? new Control() : settingProvider.CreateSettingPanel();
|
||||
|
||||
public Visibility ActionKeywordsVisibility => PluginPair.Metadata.ActionKeywords.Count == 1 ? Visibility.Visible : Visibility.Collapsed;
|
||||
public string InitilizaTime => PluginPair.Metadata.InitTime + "ms";
|
||||
|
|
|
|||
Loading…
Reference in a new issue