Skip to content

Commit 672649c

Browse files
Merge branch 'dev' into double-pin
2 parents e07b33c + 34f2b7d commit 672649c

File tree

5 files changed

+51
-9
lines changed

5 files changed

+51
-9
lines changed

Flow.Launcher.Infrastructure/UserSettings/Settings.cs

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,11 @@ public string Language
5959
get => _language;
6060
set
6161
{
62-
_language = value;
63-
OnPropertyChanged();
62+
if (_language != value)
63+
{
64+
_language = value;
65+
OnPropertyChanged();
66+
}
6467
}
6568
}
6669
private string _theme = Constant.DefaultTheme;
@@ -69,7 +72,7 @@ public string Theme
6972
get => _theme;
7073
set
7174
{
72-
if (value != _theme)
75+
if (_theme != value)
7376
{
7477
_theme = value;
7578
OnPropertyChanged();
@@ -300,9 +303,12 @@ public SearchPrecisionScore QuerySearchPrecision
300303
get => _querySearchPrecision;
301304
set
302305
{
303-
_querySearchPrecision = value;
304-
if (_stringMatcher != null)
305-
_stringMatcher.UserSettingSearchPrecision = value;
306+
if (_querySearchPrecision != value)
307+
{
308+
_querySearchPrecision = value;
309+
if (_stringMatcher != null)
310+
_stringMatcher.UserSettingSearchPrecision = value;
311+
}
306312
}
307313
}
308314

@@ -369,13 +375,30 @@ public bool HideNotifyIcon
369375
get => _hideNotifyIcon;
370376
set
371377
{
372-
_hideNotifyIcon = value;
373-
OnPropertyChanged();
378+
if (_hideNotifyIcon != value)
379+
{
380+
_hideNotifyIcon = value;
381+
OnPropertyChanged();
382+
}
374383
}
375384
}
376385
public bool LeaveCmdOpen { get; set; }
377386
public bool HideWhenDeactivated { get; set; } = true;
378387

388+
private bool _showAtTopmost = true;
389+
public bool ShowAtTopmost
390+
{
391+
get => _showAtTopmost;
392+
set
393+
{
394+
if (_showAtTopmost != value)
395+
{
396+
_showAtTopmost = value;
397+
OnPropertyChanged();
398+
}
399+
}
400+
}
401+
379402
public bool SearchQueryResultsWithDelay { get; set; }
380403
public int SearchDelayTime { get; set; } = 150;
381404

Flow.Launcher/Languages/en.xaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,8 @@
131131
<system:String x:Key="historyResultsForHomePage">Show History Results in Home Page</system:String>
132132
<system:String x:Key="historyResultsCountForHomePage">Maximum History Results Shown in Home Page</system:String>
133133
<system:String x:Key="homeToggleBoxToolTip">This can only be edited if plugin supports Home feature and Home Page is enabled.</system:String>
134+
<system:String x:Key="showAtTopmost">Show Search Window at Topmost</system:String>
135+
<system:String x:Key="showAtTopmostToolTip">Show search window above other windows</system:String>
134136

135137
<!-- Setting Plugin -->
136138
<system:String x:Key="searchplugin">Search Plugin</system:String>

Flow.Launcher/MainWindow.xaml.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ public MainWindow()
8484
_viewModel = Ioc.Default.GetRequiredService<MainViewModel>();
8585
DataContext = _viewModel;
8686

87+
Topmost = _settings.ShowAtTopmost;
88+
8789
InitializeComponent();
8890
UpdatePosition();
8991

@@ -311,6 +313,9 @@ private void OnLoaded(object sender, RoutedEventArgs _)
311313
_viewModel.QueryResults();
312314
}
313315
break;
316+
case nameof(Settings.ShowAtTopmost):
317+
Topmost = _settings.ShowAtTopmost;
318+
break;
314319
}
315320
};
316321

Flow.Launcher/Resources/Controls/InstalledPluginDisplayKeyword.xaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@
3636
Text="{DynamicResource actionKeywords}" />
3737
<!-- Here Margin="0 -4.5 0 -4.5" is to remove redundant top bottom margin from Margin="{StaticResource SettingPanelMargin}" -->
3838
<Button
39-
Width="100"
39+
Width="auto"
40+
MinWidth="100"
4041
Margin="0 -4.5 0 -4.5"
4142
HorizontalAlignment="Right"
4243
Command="{Binding SetActionKeywordsCommand}"

Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,17 @@
7777
OnContent="{DynamicResource enable}" />
7878
</cc:Card>
7979

80+
<cc:Card
81+
Title="{DynamicResource showAtTopmost}"
82+
Margin="0 14 0 0"
83+
Icon="&#xE923;"
84+
Sub="{DynamicResource showAtTopmostToolTip}">
85+
<ui:ToggleSwitch
86+
IsOn="{Binding Settings.ShowAtTopmost}"
87+
OffContent="{DynamicResource disable}"
88+
OnContent="{DynamicResource enable}" />
89+
</cc:Card>
90+
8091
<cc:CardGroup Margin="0 14 0 0">
8192
<cc:Card Title="{DynamicResource SearchWindowPosition}" Icon="&#xe7f4;">
8293
<StackPanel Orientation="Horizontal">

0 commit comments

Comments
 (0)