mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Hide SearchIcon if plugin activated
This commit is contained in:
parent
82419508c8
commit
861e5cb5c9
2 changed files with 16 additions and 4 deletions
|
|
@ -197,7 +197,8 @@
|
|||
Margin="0"
|
||||
Data="{DynamicResource SearchIconImg}"
|
||||
Stretch="Fill"
|
||||
Style="{DynamicResource SearchIconStyle}" />
|
||||
Style="{DynamicResource SearchIconStyle}"
|
||||
Visibility="{Binding SearchIconVisibility}" />
|
||||
</Canvas>
|
||||
</Grid>
|
||||
|
||||
|
|
|
|||
|
|
@ -393,6 +393,8 @@ namespace Flow.Launcher.ViewModel
|
|||
// because it is more accurate and reliable representation than using Visibility as a condition check
|
||||
public bool MainWindowVisibilityStatus { get; set; } = true;
|
||||
|
||||
public Visibility SearchIconVisibility { get; set; }
|
||||
|
||||
public double MainWindowWidth => _settings.WindowSize;
|
||||
|
||||
public string PluginIconPath { get; set; } = null;
|
||||
|
|
@ -531,6 +533,7 @@ namespace Flow.Launcher.ViewModel
|
|||
Results.Clear();
|
||||
Results.Visbility = Visibility.Collapsed;
|
||||
PluginIconPath = null;
|
||||
SearchIconVisibility = Visibility.Visible;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -559,9 +562,17 @@ namespace Flow.Launcher.ViewModel
|
|||
|
||||
var plugins = PluginManager.ValidPluginsForQuery(query);
|
||||
|
||||
|
||||
PluginIconPath = plugins.Count == 1 ? plugins.Single().Metadata.IcoPath : PluginIconPath = null;
|
||||
|
||||
if (plugins.Count == 1)
|
||||
{
|
||||
PluginIconPath = plugins.Single().Metadata.IcoPath;
|
||||
SearchIconVisibility = Visibility.Hidden;
|
||||
}
|
||||
else
|
||||
{
|
||||
PluginIconPath = null;
|
||||
SearchIconVisibility = Visibility.Visible;
|
||||
}
|
||||
|
||||
|
||||
if (query.ActionKeyword == Plugin.Query.GlobalPluginWildcardSign)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue