File tree Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Original file line number Diff line number Diff line change 197
197
Margin =" 0"
198
198
Data =" {DynamicResource SearchIconImg}"
199
199
Stretch =" Fill"
200
- Style =" {DynamicResource SearchIconStyle}" />
200
+ Style =" {DynamicResource SearchIconStyle}"
201
+ Visibility =" {Binding SearchIconVisibility}" />
201
202
</Canvas >
202
203
</Grid >
203
204
Original file line number Diff line number Diff line change @@ -393,6 +393,8 @@ private ResultsViewModel SelectedResults
393
393
// because it is more accurate and reliable representation than using Visibility as a condition check
394
394
public bool MainWindowVisibilityStatus { get ; set ; } = true ;
395
395
396
+ public Visibility SearchIconVisibility { get ; set ; }
397
+
396
398
public double MainWindowWidth => _settings . WindowSize ;
397
399
398
400
public string PluginIconPath { get ; set ; } = null ;
@@ -531,6 +533,7 @@ private async void QueryResults()
531
533
Results . Clear ( ) ;
532
534
Results . Visbility = Visibility . Collapsed ;
533
535
PluginIconPath = null ;
536
+ SearchIconVisibility = Visibility . Visible ;
534
537
return ;
535
538
}
536
539
@@ -559,9 +562,17 @@ private async void QueryResults()
559
562
560
563
var plugins = PluginManager . ValidPluginsForQuery ( query ) ;
561
564
562
-
563
- PluginIconPath = plugins . Count == 1 ? plugins . Single ( ) . Metadata . IcoPath : PluginIconPath = null ;
564
-
565
+ if ( plugins . Count == 1 )
566
+ {
567
+ PluginIconPath = plugins . Single ( ) . Metadata . IcoPath ;
568
+ SearchIconVisibility = Visibility . Hidden ;
569
+ }
570
+ else
571
+ {
572
+ PluginIconPath = null ;
573
+ SearchIconVisibility = Visibility . Visible ;
574
+ }
575
+
565
576
566
577
if ( query . ActionKeyword == Plugin . Query . GlobalPluginWildcardSign )
567
578
{
You can’t perform that action at this time.
0 commit comments