diff --git a/Flow.Launcher/Resources/CustomControlTemplate.xaml b/Flow.Launcher/Resources/CustomControlTemplate.xaml
index 08b239c4159..cdaadd45a7b 100644
--- a/Flow.Launcher/Resources/CustomControlTemplate.xaml
+++ b/Flow.Launcher/Resources/CustomControlTemplate.xaml
@@ -2407,6 +2407,79 @@
+
+
+
+
-
@@ -163,653 +78,761 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
-
-
-
-
-
-
-
+
+ Command="{Binding OpenFileEditorPathCommand}"
+ Content="{DynamicResource select}" />
+
-
-
+
+
-
-
-
+
+ Command="{Binding OpenFolderEditorPathCommand}"
+ Content="{DynamicResource select}" />
+
-
+
+
-
-
-
+
+ Command="{Binding OpenShellPathCommand}"
+ Content="{DynamicResource select}" />
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
+
-
+
+
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
+ Text="{DynamicResource plugin_explorer_previewpanel_file_info_label}" />
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ DockPanel.Dock="Right"
+ IsEnabled="{Binding ShowPreviewPanelDateTimeChoices}"
+ Visibility="{Binding PreviewPanelDateTimeChoicesVisibility}">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Views/ExplorerSettings.xaml.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Views/ExplorerSettings.xaml.cs
index 9203ece9ae5..2c50f1c6f21 100644
--- a/Plugins/Flow.Launcher.Plugin.Explorer/Views/ExplorerSettings.xaml.cs
+++ b/Plugins/Flow.Launcher.Plugin.Explorer/Views/ExplorerSettings.xaml.cs
@@ -1,4 +1,5 @@
-using System.ComponentModel;
+using System.Collections.Generic;
+using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Windows;
@@ -11,28 +12,32 @@
namespace Flow.Launcher.Plugin.Explorer.Views
{
- ///
- /// Interaction logic for ExplorerSettings.xaml
- ///
public partial class ExplorerSettings
{
- private readonly SettingsViewModel viewModel;
+ private readonly SettingsViewModel _viewModel;
+ private readonly List _expanders;
public ExplorerSettings(SettingsViewModel viewModel)
{
+ _viewModel = viewModel;
DataContext = viewModel;
InitializeComponent();
- this.viewModel = viewModel;
-
DataContext = viewModel;
ActionKeywordModel.Init(viewModel.Settings);
- lbxAccessLinks.Items.SortDescriptions.Add(new SortDescription("Path", ListSortDirection.Ascending));
-
- lbxExcludedPaths.Items.SortDescriptions.Add(new SortDescription("Path", ListSortDirection.Ascending));
+ _expanders = new List
+ {
+ GeneralSettingsExpander,
+ ContextMenuExpander,
+ PreviewPanelExpander,
+ EverythingExpander,
+ ActionKeywordsExpander,
+ QuickAccessExpander,
+ ExcludedPathsExpander
+ };
}
private void AccessLinkDragDrop(string containerName, DragEventArgs e)
@@ -51,7 +56,7 @@ private void AccessLinkDragDrop(string containerName, DragEventArgs e)
{
Path = s
};
- viewModel.AppendLink(containerName, newFolderLink);
+ _viewModel.AppendLink(containerName, newFolderLink);
}
}
}
@@ -76,8 +81,8 @@ private void EverythingSortOptionChanged(object sender, SelectionChangedEventArg
{
if (tbFastSortWarning is not null)
{
- tbFastSortWarning.Visibility = viewModel.FastSortWarningVisibility;
- tbFastSortWarning.Text = viewModel.SortOptionWarningMessage;
+ tbFastSortWarning.Visibility = _viewModel.FastSortWarningVisibility;
+ tbFastSortWarning.Text = _viewModel.SortOptionWarningMessage;
}
}
private void LbxAccessLinks_OnDrop(object sender, DragEventArgs e)
@@ -93,5 +98,32 @@ private void AllowOnlyNumericInput(object sender, System.Windows.Input.TextCompo
{
e.Handled = e.Text.ToCharArray().Any(c => !char.IsDigit(c));
}
+
+ private void Expander_Expanded(object sender, RoutedEventArgs e)
+ {
+ if (sender is Expander expandedExpander)
+ {
+ // Ensure _expanders is not null and contains items
+ if (_expanders == null || !_expanders.Any()) return;
+
+ foreach (var expander in _expanders)
+ {
+ if (expander != null && expander != expandedExpander && expander.IsExpanded)
+ {
+ expander.IsExpanded = false;
+ }
+ }
+ }
+ }
+
+ private void lbxAccessLinks_Loaded(object sender, RoutedEventArgs e)
+ {
+ lbxAccessLinks.Items.SortDescriptions.Add(new SortDescription("Path", ListSortDirection.Ascending));
+ }
+
+ private void lbxExcludedPaths_Loaded(object sender, RoutedEventArgs e)
+ {
+ lbxExcludedPaths.Items.SortDescriptions.Add(new SortDescription("Path", ListSortDirection.Ascending));
+ }
}
}