File tree Expand file tree Collapse file tree 4 files changed +28
-9
lines changed
Flow.Launcher.Infrastructure/UserSettings Expand file tree Collapse file tree 4 files changed +28
-9
lines changed Original file line number Diff line number Diff line change @@ -102,6 +102,7 @@ public string Theme
102
102
public bool UseSound { get ; set ; } = true ;
103
103
public double SoundVolume { get ; set ; } = 50 ;
104
104
public bool ShowBadges { get ; set ; } = false ;
105
+ public bool ShowBadgesGlobalOnly { get ; set ; } = false ;
105
106
106
107
public bool UseClock { get ; set ; } = true ;
107
108
public bool UseDate { get ; set ; } = false ;
Original file line number Diff line number Diff line change 285
285
<system : String x : Key =" flowlauncherPressHotkey" >Press Key</system : String >
286
286
<system : String x : Key =" showBadges" >Show Result Badges</system : String >
287
287
<system : String x : Key =" showBadgesToolTip" >Show badges for query results where supported</system : String >
288
+ <system : String x : Key =" showBadgesGlobalOnly" >Show Result Badges Only for Global Query</system : String >
289
+ <system : String x : Key =" showBadgesGlobalOnlyToolTip" >Show badges only for global query results</system : String >
288
290
289
291
<!-- Setting Proxy -->
290
292
<system : String x : Key =" proxy" >HTTP Proxy</system : String >
Original file line number Diff line number Diff line change 711
711
</cc : Card >
712
712
713
713
<!-- Badges -->
714
- <cc : Card
714
+ <cc : ExCard
715
715
Title =" {DynamicResource showBadges}"
716
716
Margin =" 0 0 0 0"
717
717
Icon ="  "
718
718
Sub =" {DynamicResource showBadgesToolTip}" >
719
- <ui : ToggleSwitch
720
- IsOn =" {Binding Settings.ShowBadges}"
721
- OffContent =" {DynamicResource disable}"
722
- OnContent =" {DynamicResource enable}" />
723
- </cc : Card >
719
+ <cc : ExCard .SideContent>
720
+ <ui : ToggleSwitch
721
+ IsOn =" {Binding Settings.ShowBadges}"
722
+ OffContent =" {DynamicResource disable}"
723
+ OnContent =" {DynamicResource enable}" />
724
+ </cc : ExCard .SideContent>
725
+ <cc : Card
726
+ Title =" {DynamicResource showBadgesGlobalOnly}"
727
+ Sub =" {DynamicResource showBadgesGlobalOnlyToolTip}"
728
+ Type =" InsideFit" >
729
+ <ui : ToggleSwitch
730
+ IsOn =" {Binding Settings.ShowBadgesGlobalOnly}"
731
+ OffContent =" {DynamicResource disable}"
732
+ OnContent =" {DynamicResource enable}" />
733
+ </cc : Card >
734
+ </cc : ExCard >
724
735
725
736
<!-- Settings color scheme -->
726
737
<cc : Card
Original file line number Diff line number Diff line change @@ -127,13 +127,18 @@ public Visibility ShowBadge
127
127
{
128
128
get
129
129
{
130
- if ( Settings . ShowBadges && BadgeIconAvailable )
131
- return Visibility . Visible ;
130
+ if ( ! Settings . ShowBadges || ! BadgeIconAvailable )
131
+ return Visibility . Collapsed ;
132
+
133
+ if ( Settings . ShowBadgesGlobalOnly && ! IsGlobalQuery )
134
+ return Visibility . Collapsed ;
132
135
133
- return Visibility . Collapsed ;
136
+ return Visibility . Visible ;
134
137
}
135
138
}
136
139
140
+ public bool IsGlobalQuery => Result . OriginQuery . ActionKeyword == Query . GlobalPluginWildcardSign ;
141
+
137
142
private bool GlyphAvailable => Glyph is not null ;
138
143
139
144
private bool ImgIconAvailable => ! string . IsNullOrEmpty ( Result . IcoPath ) || Result . Icon is not null ;
You can’t perform that action at this time.
0 commit comments