Move to iNKORE.UI.WPF.Modern UI Framework (#3593)

This commit is contained in:
Jack Ye 2025-10-05 18:44:40 +08:00 committed by GitHub
parent 8c98aedac2
commit 5ae159de5b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
77 changed files with 2846 additions and 9083 deletions

View file

@ -1,24 +0,0 @@
using System.ComponentModel;
namespace Flow.Launcher.Core.Resource
{
public class LocalizedDescriptionAttribute : DescriptionAttribute
{
private readonly string _resourceKey;
public LocalizedDescriptionAttribute(string resourceKey)
{
_resourceKey = resourceKey;
}
public override string Description
{
get
{
string description = PublicApi.Instance.GetTranslation(_resourceKey);
return string.IsNullOrWhiteSpace(description) ?
string.Format("[[{0}]]", _resourceKey) : description;
}
}
}
}

View file

@ -449,9 +449,19 @@ namespace Flow.Launcher.Core.Resource
}
return false;
}
catch (XamlParseException)
catch (XamlParseException e)
{
_api.LogError(ClassName, $"Theme <{theme}> fail to parse");
_api.LogException(ClassName, $"Theme <{theme}> fail to parse xaml", e);
if (theme != Constant.DefaultTheme)
{
_api.ShowMsgBox(Localize.theme_load_failure_parse_error(theme));
ChangeTheme(Constant.DefaultTheme);
}
return false;
}
catch (Exception e)
{
_api.LogException(ClassName, $"Theme <{theme}> fail to load", e);
if (theme != Constant.DefaultTheme)
{
_api.ShowMsgBox(Localize.theme_load_failure_parse_error(theme));

View file

@ -2,7 +2,8 @@
x:Class="Flow.Launcher.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ui="http://schemas.modernwpf.com/2019"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
ShutdownMode="OnMainWindowClose"
Startup="OnStartup">
<Application.Resources>
@ -10,17 +11,17 @@
<ResourceDictionary.MergedDictionaries>
<ui:ThemeResources>
<ui:ThemeResources.ThemeDictionaries>
<ResourceDictionary x:Key="Light">
<ResourceDictionary x:Key="Light" ui:ThemeDictionary.Key="Light">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/Resources/Light.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
<ResourceDictionary x:Key="Dark">
<ResourceDictionary x:Key="Dark" ui:ThemeDictionary.Key="Dark">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/Resources/Dark.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
<ResourceDictionary x:Key="HighContrast">
<ResourceDictionary x:Key="HighContrast" ui:ThemeDictionary.Key="HighContrast">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/Resources/Dark.xaml" />
</ResourceDictionary.MergedDictionaries>
@ -33,6 +34,15 @@
<ResourceDictionary Source="pack://application:,,,/Themes/Win11Light.xaml" />
<ResourceDictionary Source="pack://application:,,,/Languages/en.xaml" />
</ResourceDictionary.MergedDictionaries>
<!-- Override styles in UI.Modern.WPF -->
<Thickness x:Key="ListViewItemCompactSelectedBorderThemeThickness">2</Thickness>
<sys:Double x:Key="CheckBoxMinWidth">0</sys:Double>
<sys:Double x:Key="GridViewItemMinWidth">0</sys:Double>
<sys:Double x:Key="GridViewItemMinHeight">40</sys:Double>
<sys:Double x:Key="ListViewItemMinWidth">0</sys:Double>
<sys:Double x:Key="ListViewItemMinHeight">36</sys:Double>
<SolidColorBrush x:Key="NavigationViewSelectionIndicatorForeground" Color="#FF0063B1" />
</ResourceDictionary>
</Application.Resources>
</Application>

View file

@ -22,6 +22,7 @@ using Flow.Launcher.Infrastructure.UserSettings;
using Flow.Launcher.Plugin;
using Flow.Launcher.SettingPages.ViewModels;
using Flow.Launcher.ViewModel;
using iNKORE.UI.WPF.Modern.Common;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.VisualStudio.Threading;
@ -56,6 +57,9 @@ namespace Flow.Launcher
public App()
{
// Do not use bitmap cache since it can cause WPF second window freezing issue
ShadowAssist.UseBitmapCache = false;
// Initialize settings
_settings.WMPInstalled = WindowsMediaPlayerHelper.IsWindowsMediaPlayerInstalled();

View file

@ -5,7 +5,7 @@ using System.Windows.Input;
namespace Flow.Launcher.Converters;
internal class BoolToIMEConversionModeConverter : IValueConverter
public class BoolToIMEConversionModeConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
@ -22,7 +22,7 @@ internal class BoolToIMEConversionModeConverter : IValueConverter
}
}
internal class BoolToIMEStateConverter : IValueConverter
public class BoolToIMEStateConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{

View file

@ -0,0 +1,91 @@
using System;
using System.Globalization;
using System.Windows;
using System.Windows.Data;
namespace Flow.Launcher.Converters;
public class CornerRadiusFilterConverter : DependencyObject, IValueConverter
{
public CornerRadiusFilterKind Filter { get; set; }
public double Scale { get; set; } = 1.0;
public static CornerRadius Convert(CornerRadius radius, CornerRadiusFilterKind filterKind)
{
CornerRadius result = radius;
switch (filterKind)
{
case CornerRadiusFilterKind.Top:
result.BottomLeft = 0;
result.BottomRight = 0;
break;
case CornerRadiusFilterKind.Right:
result.TopLeft = 0;
result.BottomLeft = 0;
break;
case CornerRadiusFilterKind.Bottom:
result.TopLeft = 0;
result.TopRight = 0;
break;
case CornerRadiusFilterKind.Left:
result.TopRight = 0;
result.BottomRight = 0;
break;
}
return result;
}
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
var cornerRadius = (CornerRadius)value;
var scale = Scale;
if (!double.IsNaN(scale))
{
cornerRadius.TopLeft *= scale;
cornerRadius.TopRight *= scale;
cornerRadius.BottomRight *= scale;
cornerRadius.BottomLeft *= scale;
}
var filterType = Filter;
if (filterType == CornerRadiusFilterKind.TopLeftValue ||
filterType == CornerRadiusFilterKind.BottomRightValue)
{
return GetDoubleValue(cornerRadius, filterType);
}
return Convert(cornerRadius, filterType);
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
private static double GetDoubleValue(CornerRadius radius, CornerRadiusFilterKind filterKind)
{
switch (filterKind)
{
case CornerRadiusFilterKind.TopLeftValue:
return radius.TopLeft;
case CornerRadiusFilterKind.BottomRightValue:
return radius.BottomRight;
}
return 0;
}
}
public enum CornerRadiusFilterKind
{
None,
Top,
Right,
Bottom,
Left,
TopLeftValue,
BottomRightValue
}

View file

@ -0,0 +1,32 @@
using System;
using System.Globalization;
using System.Windows;
using System.Windows.Data;
namespace Flow.Launcher.Converters;
public class PlacementRectangleConverter : IMultiValueConverter
{
public Thickness Margin { get; set; }
public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
{
if (values.Length == 2 &&
values[0] is double width &&
values[1] is double height)
{
var margin = Margin;
var topLeft = new Point(margin.Left, margin.Top);
var bottomRight = new Point(width - margin.Right, height - margin.Bottom);
var rect = new Rect(topLeft, bottomRight);
return rect;
}
return Rect.Empty;
}
public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}

View file

@ -0,0 +1,19 @@
using System;
using System.Globalization;
using System.Windows;
using System.Windows.Data;
namespace Flow.Launcher.Converters;
public class SharedSizeGroupConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
return (Visibility)value != Visibility.Collapsed ? (string)parameter : null;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}

View file

@ -5,7 +5,7 @@ using System.Windows.Input;
namespace Flow.Launcher.Converters;
class StringToKeyBindingConverter : IValueConverter
public class StringToKeyBindingConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{

View file

@ -138,6 +138,7 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="iNKORE.UI.WPF.Modern" Version="0.10.1" />
<PackageReference Include="MdXaml" Version="1.27.0" />
<PackageReference Include="MdXaml.AnimatedGif" Version="1.27.0" />
<PackageReference Include="MdXaml.Html" Version="1.27.0" />
@ -146,9 +147,6 @@
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.9" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="9.0.9" />
<PackageReference Include="Microsoft.Toolkit.Uwp.Notifications" Version="7.1.3" />
<!-- ModernWpfUI v0.9.5 introduced WinRT changes that causes Notification platform unavailable error on some machines -->
<!-- https://github.com/Flow-Launcher/Flow.Launcher/issues/1772#issuecomment-1502440801 -->
<PackageReference Include="ModernWpfUI" Version="0.9.4" />
<PackageReference Include="PropertyChanged.Fody" Version="4.1.0">
<PrivateAssets>all</PrivateAssets>
</PackageReference>

View file

@ -0,0 +1,33 @@
using System.Windows;
using System.Windows.Controls;
namespace Flow.Launcher.Helper;
public static class BorderHelper
{
#region Child
public static readonly DependencyProperty ChildProperty =
DependencyProperty.RegisterAttached(
"Child",
typeof(UIElement),
typeof(BorderHelper),
new PropertyMetadata(default(UIElement), OnChildChanged));
public static UIElement GetChild(Border border)
{
return (UIElement)border.GetValue(ChildProperty);
}
public static void SetChild(Border border, UIElement value)
{
border.SetValue(ChildProperty, value);
}
private static void OnChildChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
((Border)d).Child = (UIElement)e.NewValue;
}
#endregion
}

View file

@ -2,7 +2,7 @@
x:Class="Flow.Launcher.HotkeyControlDialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ui="http://schemas.modernwpf.com/2019"
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
Background="{DynamicResource PopuBGColor}"
BorderBrush="{DynamicResource PopupButtonAreaBorderColor}"
BorderThickness="0 1 0 0"

View file

@ -9,7 +9,7 @@ using Flow.Launcher.Helper;
using Flow.Launcher.Infrastructure.Hotkey;
using Flow.Launcher.Infrastructure.UserSettings;
using Flow.Launcher.Plugin;
using ModernWpf.Controls;
using iNKORE.UI.WPF.Modern.Controls;
namespace Flow.Launcher;

View file

@ -6,7 +6,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:flowlauncher="clr-namespace:Flow.Launcher"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="http://schemas.modernwpf.com/2019"
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
xmlns:vm="clr-namespace:Flow.Launcher.ViewModel"
Name="FlowMainWindow"
Title="Flow Launcher"

View file

@ -25,7 +25,8 @@ using Flow.Launcher.Plugin;
using Flow.Launcher.Plugin.SharedCommands;
using Flow.Launcher.Plugin.SharedModels;
using Flow.Launcher.ViewModel;
using ModernWpf.Controls;
using iNKORE.UI.WPF.Modern;
using iNKORE.UI.WPF.Modern.Controls;
using DataObject = System.Windows.DataObject;
using Key = System.Windows.Input.Key;
using MouseButtons = System.Windows.Forms.MouseButtons;
@ -191,11 +192,11 @@ namespace Flow.Launcher
// Initialize color scheme
if (_settings.ColorScheme == Constant.Light)
{
ModernWpf.ThemeManager.Current.ApplicationTheme = ModernWpf.ApplicationTheme.Light;
ThemeManager.Current.ApplicationTheme = ApplicationTheme.Light;
}
else if (_settings.ColorScheme == Constant.Dark)
{
ModernWpf.ThemeManager.Current.ApplicationTheme = ModernWpf.ApplicationTheme.Dark;
ThemeManager.Current.ApplicationTheme = ApplicationTheme.Dark;
}
// Initialize position

View file

@ -4,6 +4,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:flowlauncher="clr-namespace:Flow.Launcher"
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
Title="{DynamicResource updateAllPluginsButtonContent}"
Width="530"
Background="{DynamicResource PopuBGColor}"
@ -66,13 +67,13 @@
Text="{DynamicResource updateAllPluginsButtonContent}"
TextAlignment="Left" />
<ScrollViewer
<ui:ScrollViewerEx
MaxHeight="300"
Margin="0 5 0 5"
HorizontalScrollBarVisibility="Disabled"
VerticalScrollBarVisibility="Auto">
<StackPanel x:Name="UpdatePluginStackPanel" />
</ScrollViewer>
</ui:ScrollViewerEx>
<Rectangle
Height="1"

View file

@ -31,8 +31,8 @@ using Flow.Launcher.Plugin;
using Flow.Launcher.Plugin.SharedCommands;
using Flow.Launcher.Plugin.SharedModels;
using Flow.Launcher.ViewModel;
using iNKORE.UI.WPF.Modern;
using JetBrains.Annotations;
using ModernWpf;
using Squirrel;
using Stopwatch = Flow.Launcher.Infrastructure.Stopwatch;

View file

@ -7,7 +7,7 @@
xmlns:local="clr-namespace:Flow.Launcher"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:mdxam="clr-namespace:MdXaml;assembly=MdXaml"
xmlns:ui="http://schemas.modernwpf.com/2019"
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
xmlns:vm="clr-namespace:Flow.Launcher.ViewModel"
Title="{DynamicResource releaseNotes}"
Width="940"
@ -16,6 +16,7 @@
MinHeight="600"
Background="{DynamicResource PopuBGColor}"
Closed="Window_Closed"
DataContext="{Binding RelativeSource={RelativeSource Self}}"
Foreground="{DynamicResource PopupTextColor}"
Loaded="Window_Loaded"
ResizeMode="CanResize"
@ -44,7 +45,7 @@
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="32" />
<RowDefinition Height="24" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<!-- TitleBar and Control -->
@ -161,18 +162,23 @@
Grid.Row="1"
Grid.Column="0"
Grid.ColumnSpan="5"
Margin="18 0 18 0">
<cc:HyperLink x:Name="SeeMore" Text="{DynamicResource seeMoreReleaseNotes}" />
Margin="6 0 18 0">
<ui:HyperlinkButton
x:Name="SeeMore"
Content="{DynamicResource seeMoreReleaseNotes}"
NavigateUri="{Binding ReleaseNotes}" />
</Grid>
<!-- Do not use scroll function of MarkdownViewer because it does not support smooth scroll -->
<ScrollViewer
<ui:ScrollViewerEx
x:Name="MarkdownScrollViewer"
Grid.Row="2"
Grid.Column="0"
Grid.ColumnSpan="5"
Width="500"
Height="500">
Height="500"
Margin="15 0 0 0"
Padding="0 0 15 0"
HorizontalAlignment="Stretch">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
@ -193,11 +199,11 @@
VerticalScrollBarVisibility="Disabled"
Visibility="Collapsed" />
</Grid>
</ScrollViewer>
</ui:ScrollViewerEx>
<!-- This Grid is for display progress ring and refresh button. -->
<!-- And it is also for changing the size of the MarkdownViewer. -->
<!-- Because VerticalAlignment="Stretch" can cause size issue with MarkdownScrollViewer. -->
<!-- Because VerticalAlignment="Stretch" can cause height issue with MarkdownScrollViewer. -->
<Grid
Grid.Row="2"
Grid.Column="0"

View file

@ -10,27 +10,27 @@ using System.Windows;
using System.Windows.Input;
using System.Windows.Media;
using Flow.Launcher.Infrastructure.Http;
using iNKORE.UI.WPF.Modern;
namespace Flow.Launcher
{
public partial class ReleaseNotesWindow : Window
{
private static readonly string ReleaseNotes = Properties.Settings.Default.GithubRepo + "/releases";
public string ReleaseNotes => Properties.Settings.Default.GithubRepo + "/releases";
public ReleaseNotesWindow()
{
InitializeComponent();
SeeMore.Uri = ReleaseNotes;
ModernWpf.ThemeManager.Current.ActualApplicationThemeChanged += ThemeManager_ActualApplicationThemeChanged;
ThemeManager.Current.ActualApplicationThemeChanged += ThemeManager_ActualApplicationThemeChanged;
}
#region Window Events
private void ThemeManager_ActualApplicationThemeChanged(ModernWpf.ThemeManager sender, object args)
private void ThemeManager_ActualApplicationThemeChanged(ThemeManager sender, object args)
{
Application.Current.Dispatcher.Invoke(() =>
{
if (ModernWpf.ThemeManager.Current.ActualApplicationTheme == ModernWpf.ApplicationTheme.Light)
if (ThemeManager.Current.ActualApplicationTheme == ApplicationTheme.Light)
{
MarkdownViewer.MarkdownStyle = (Style)Application.Current.Resources["DocumentStyleGithubLikeLight"];
MarkdownViewer.Foreground = Brushes.Black;
@ -58,7 +58,7 @@ namespace Flow.Launcher
private void Window_Closed(object sender, EventArgs e)
{
ModernWpf.ThemeManager.Current.ActualApplicationThemeChanged -= ThemeManager_ActualApplicationThemeChanged;
ThemeManager.Current.ActualApplicationThemeChanged -= ThemeManager_ActualApplicationThemeChanged;
}
#endregion
@ -147,7 +147,6 @@ namespace Flow.Launcher
private void Grid_SizeChanged(object sender, SizeChangedEventArgs e)
{
MarkdownScrollViewer.Height = e.NewSize.Height;
MarkdownScrollViewer.Width = e.NewSize.Width;
}
private void MarkdownViewer_MouseWheel(object sender, MouseWheelEventArgs e)

View file

@ -1,139 +0,0 @@
<UserControl
x:Class="Flow.Launcher.Resources.Controls.Card"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Flow.Launcher.Resources.Controls"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:ui="http://schemas.modernwpf.com/2019"
d:DesignHeight="450"
d:DesignWidth="800"
mc:Ignorable="d">
<UserControl.Template>
<ControlTemplate TargetType="UserControl">
<Border x:Name="BD" HorizontalAlignment="Stretch">
<Border.Style>
<Style TargetType="{x:Type Border}">
<Setter Property="Background" Value="{DynamicResource Color00B}" />
<Setter Property="BorderBrush" Value="{DynamicResource Color03B}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="CornerRadius" Value="5" />
<Setter Property="MinHeight" Value="68" />
<Setter Property="Padding" Value="0 15 0 15" />
<Setter Property="Margin" Value="0 4 0 0" />
<Setter Property="SnapsToDevicePixels" Value="True" />
<Style.Triggers>
<DataTrigger Binding="{Binding Type, RelativeSource={RelativeSource AncestorType=local:Card}}" Value="Inside">
<Setter Property="BorderThickness" Value="0 1 0 0" />
<Setter Property="CornerRadius" Value="0" />
<Setter Property="Margin" Value="0 0 0 0" />
<Setter Property="Background" Value="Transparent" />
</DataTrigger>
<DataTrigger Binding="{Binding Type, RelativeSource={RelativeSource AncestorType=local:Card}}" Value="InsideFit">
<Setter Property="BorderThickness" Value="0 1 0 0" />
<Setter Property="CornerRadius" Value="0" />
<Setter Property="Margin" Value="0 0 0 0" />
<Setter Property="Padding" Value="35 0 26 0" />
<Setter Property="Background" Value="Transparent" />
</DataTrigger>
<DataTrigger Binding="{Binding Type, RelativeSource={RelativeSource AncestorType=local:Card}}" Value="First">
<Setter Property="Margin" Value="0" />
<Setter Property="CornerRadius" Value="0" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="BorderThickness" Value="0" />
</DataTrigger>
<DataTrigger Binding="{Binding Type, RelativeSource={RelativeSource AncestorType=local:Card}}" Value="Middle">
<Setter Property="Margin" Value="0" />
<Setter Property="CornerRadius" Value="0" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="BorderThickness" Value="0 1 0 0" />
</DataTrigger>
<DataTrigger Binding="{Binding Type, RelativeSource={RelativeSource AncestorType=local:Card}}" Value="Last">
<Setter Property="Margin" Value="0" />
<Setter Property="CornerRadius" Value="0" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="BorderThickness" Value="0 1 0 0" />
</DataTrigger>
</Style.Triggers>
</Style>
</Border.Style>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition
Width="auto"
MinWidth="20"
MaxWidth="60" />
<ColumnDefinition Width="8*" />
<ColumnDefinition Width="Auto" MinWidth="30" />
</Grid.ColumnDefinitions>
<ContentControl
Grid.Row="0"
Grid.Column="2"
Margin="0 0 16 0"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Content="{TemplateBinding Content}" />
<StackPanel>
<StackPanel.Style>
<Style TargetType="{x:Type StackPanel}">
<Setter Property="Grid.Column" Value="1" />
<Setter Property="Width" Value="Auto" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="HorizontalAlignment" Value="Left" />
</Style>
</StackPanel.Style>
<TextBlock x:Name="ItemTitle" Text="{Binding Title, RelativeSource={RelativeSource AncestorType=local:Card}}">
<TextBlock.Style>
<Style TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="{DynamicResource Color05B}" />
<Setter Property="Margin" Value="0 0 0 0" />
<Setter Property="TextWrapping" Value="Wrap" />
<Setter Property="VerticalAlignment" Value="Center" />
</Style>
</TextBlock.Style>
</TextBlock>
<TextBlock x:Name="SubTitle" Text="{Binding Sub, RelativeSource={RelativeSource AncestorType=local:Card}}">
<TextBlock.Style>
<Style TargetType="{x:Type TextBlock}">
<Style.Triggers>
<DataTrigger Binding="{Binding ElementName=SubTitle, Path=Text}" Value="{x:Static sys:String.Empty}">
<Setter Property="Visibility" Value="Collapsed" />
</DataTrigger>
</Style.Triggers>
<Setter Property="Foreground" Value="{DynamicResource Color04B}" />
<Setter Property="FontSize" Value="12" />
<Setter Property="Margin" Value="0 0 0 0" />
<Setter Property="Padding" Value="0 0 24 0" />
<Setter Property="TextWrapping" Value="WrapWithOverflow" />
</Style>
</TextBlock.Style>
</TextBlock>
</StackPanel>
<TextBlock x:Name="ItemIcon" Text="{Binding Icon, RelativeSource={RelativeSource AncestorType=local:Card}}">
<TextBlock.Style>
<Style TargetType="{x:Type TextBlock}">
<Style.Triggers>
<DataTrigger Binding="{Binding ElementName=ItemIcon, Path=Text}" Value="{x:Static sys:String.Empty}">
<Setter Property="Margin" Value="24 0 0 0" />
</DataTrigger>
</Style.Triggers>
<Setter Property="Grid.Column" Value="0" />
<Setter Property="Margin" Value="24 0 16 0" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="FontSize" Value="20" />
<Setter Property="FontFamily" Value="/Resources/#Segoe Fluent Icons" />
<Setter Property="Foreground" Value="{DynamicResource Color05B}" />
</Style>
</TextBlock.Style>
</TextBlock>
</Grid>
</Border>
</ControlTemplate>
</UserControl.Template>
</UserControl>

View file

@ -1,67 +0,0 @@
using System.Windows;
using UserControl = System.Windows.Controls.UserControl;
namespace Flow.Launcher.Resources.Controls
{
public partial class Card : UserControl
{
public enum CardType
{
Default,
Inside,
InsideFit,
First,
Middle,
Last
}
public Card()
{
InitializeComponent();
}
public string Title
{
get { return (string)GetValue(TitleProperty); }
set { SetValue(TitleProperty, value); }
}
public static readonly DependencyProperty TitleProperty =
DependencyProperty.Register(nameof(Title), typeof(string), typeof(Card), new PropertyMetadata(string.Empty));
public string Sub
{
get { return (string)GetValue(SubProperty); }
set { SetValue(SubProperty, value); }
}
public static readonly DependencyProperty SubProperty =
DependencyProperty.Register(nameof(Sub), typeof(string), typeof(Card), new PropertyMetadata(string.Empty));
public string Icon
{
get { return (string)GetValue(IconProperty); }
set { SetValue(IconProperty, value); }
}
public static readonly DependencyProperty IconProperty =
DependencyProperty.Register(nameof(Icon), typeof(string), typeof(Card), new PropertyMetadata(string.Empty));
/// <summary>
/// Gets or sets additional content for the UserControl
/// </summary>
public object AdditionalContent
{
get { return (object)GetValue(AdditionalContentProperty); }
set { SetValue(AdditionalContentProperty, value); }
}
public static readonly DependencyProperty AdditionalContentProperty =
DependencyProperty.Register(nameof(AdditionalContent), typeof(object), typeof(Card),
new PropertyMetadata(null));
public CardType Type
{
get { return (CardType)GetValue(TypeProperty); }
set { SetValue(TypeProperty, value); }
}
public static readonly DependencyProperty TypeProperty =
DependencyProperty.Register(nameof(Type), typeof(CardType), typeof(Card),
new PropertyMetadata(CardType.Default));
}
}

View file

@ -1,32 +0,0 @@
<UserControl x:Class="Flow.Launcher.Resources.Controls.CardGroup"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:cc="clr-namespace:Flow.Launcher.Resources.Controls"
mc:Ignorable="d"
d:DataContext="{d:DesignInstance cc:CardGroup}"
d:DesignHeight="300" d:DesignWidth="300">
<UserControl.Resources>
<Style TargetType="cc:Card" x:Key="FirstStyle">
<Setter Property="cc:CardGroup.Position" Value="First" />
</Style>
<Style TargetType="cc:Card" x:Key="MiddleStyle">
<Setter Property="cc:CardGroup.Position" Value="Middle" />
</Style>
<Style TargetType="cc:Card" x:Key="LastStyle">
<Setter Property="cc:CardGroup.Position" Value="Last" />
</Style>
<cc:CardGroupCardStyleSelector
x:Key="CardStyleSelector"
FirstStyle="{StaticResource FirstStyle}"
MiddleStyle="{StaticResource MiddleStyle}"
LastStyle="{StaticResource LastStyle}" />
</UserControl.Resources>
<Border Background="{DynamicResource Color00B}" BorderBrush="{DynamicResource Color03B}" BorderThickness="1"
CornerRadius="5">
<ItemsControl ItemsSource="{Binding Content, RelativeSource={RelativeSource AncestorType=cc:CardGroup}}"
ItemContainerStyleSelector="{StaticResource CardStyleSelector}" />
</Border>
</UserControl>

View file

@ -1,47 +0,0 @@
using System;
using System.Collections.ObjectModel;
using System.Windows;
using System.Windows.Controls;
namespace Flow.Launcher.Resources.Controls;
public partial class CardGroup : UserControl
{
public enum CardGroupPosition
{
NotInGroup,
First,
Middle,
Last
}
public new ObservableCollection<Card> Content
{
get { return (ObservableCollection<Card>)GetValue(ContentProperty); }
set { SetValue(ContentProperty, value); }
}
public static new readonly DependencyProperty ContentProperty =
DependencyProperty.Register(nameof(Content), typeof(ObservableCollection<Card>), typeof(CardGroup));
public static readonly DependencyProperty PositionProperty = DependencyProperty.RegisterAttached(
"Position", typeof(CardGroupPosition), typeof(CardGroup),
new FrameworkPropertyMetadata(CardGroupPosition.NotInGroup, FrameworkPropertyMetadataOptions.AffectsRender)
);
public static void SetPosition(UIElement element, CardGroupPosition value)
{
element.SetValue(PositionProperty, value);
}
public static CardGroupPosition GetPosition(UIElement element)
{
return (CardGroupPosition)element.GetValue(PositionProperty);
}
public CardGroup()
{
InitializeComponent();
Content = new ObservableCollection<Card>();
}
}

View file

@ -1,21 +0,0 @@
using System.Windows;
using System.Windows.Controls;
namespace Flow.Launcher.Resources.Controls;
public class CardGroupCardStyleSelector : StyleSelector
{
public Style FirstStyle { get; set; }
public Style MiddleStyle { get; set; }
public Style LastStyle { get; set; }
public override Style SelectStyle(object item, DependencyObject container)
{
var itemsControl = ItemsControl.ItemsControlFromItemContainer(container);
var index = itemsControl.ItemContainerGenerator.IndexFromContainer(container);
if (index == 0) return FirstStyle;
if (index == itemsControl.Items.Count - 1) return LastStyle;
return MiddleStyle;
}
}

View file

@ -0,0 +1,253 @@
using iNKORE.UI.WPF.Modern.Controls;
using iNKORE.UI.WPF.Modern.Controls.Helpers;
using iNKORE.UI.WPF.Modern.Controls.Primitives;
using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
namespace Flow.Launcher.Resources.Controls
{
// TODO: Use IsScrollAnimationEnabled property in future: https://github.com/iNKORE-NET/UI.WPF.Modern/pull/347
public class CustomScrollViewerEx : ScrollViewer
{
private double LastVerticalLocation = 0;
private double LastHorizontalLocation = 0;
public CustomScrollViewerEx()
{
Loaded += OnLoaded;
var valueSource = DependencyPropertyHelper.GetValueSource(this, AutoPanningMode.IsEnabledProperty).BaseValueSource;
if (valueSource == BaseValueSource.Default)
{
AutoPanningMode.SetIsEnabled(this, true);
}
}
#region Orientation
public static readonly DependencyProperty OrientationProperty =
DependencyProperty.Register(
nameof(Orientation),
typeof(Orientation),
typeof(CustomScrollViewerEx),
new PropertyMetadata(Orientation.Vertical));
public Orientation Orientation
{
get => (Orientation)GetValue(OrientationProperty);
set => SetValue(OrientationProperty, value);
}
#endregion
#region AutoHideScrollBars
public static readonly DependencyProperty AutoHideScrollBarsProperty =
ScrollViewerHelper.AutoHideScrollBarsProperty
.AddOwner(
typeof(CustomScrollViewerEx),
new PropertyMetadata(true, OnAutoHideScrollBarsChanged));
public bool AutoHideScrollBars
{
get => (bool)GetValue(AutoHideScrollBarsProperty);
set => SetValue(AutoHideScrollBarsProperty, value);
}
private static void OnAutoHideScrollBarsChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
if (d is CustomScrollViewerEx sv)
{
sv.UpdateVisualState();
}
}
#endregion
private void OnLoaded(object sender, RoutedEventArgs e)
{
LastVerticalLocation = VerticalOffset;
LastHorizontalLocation = HorizontalOffset;
UpdateVisualState(false);
}
/// <inheritdoc/>
protected override void OnInitialized(EventArgs e)
{
base.OnInitialized(e);
if (Style == null && ReadLocalValue(StyleProperty) == DependencyProperty.UnsetValue)
{
SetResourceReference(StyleProperty, typeof(ScrollViewer));
}
}
/// <inheritdoc/>
protected override void OnMouseWheel(MouseWheelEventArgs e)
{
var Direction = GetDirection();
ScrollViewerBehavior.SetIsAnimating(this, true);
if (Direction == Orientation.Vertical)
{
if (ScrollableHeight > 0)
{
e.Handled = true;
}
var WheelChange = e.Delta * (ViewportHeight / 1.5) / ActualHeight;
var newOffset = LastVerticalLocation - WheelChange;
if (newOffset < 0)
{
newOffset = 0;
}
if (newOffset > ScrollableHeight)
{
newOffset = ScrollableHeight;
}
if (newOffset == LastVerticalLocation)
{
return;
}
ScrollToVerticalOffset(LastVerticalLocation);
ScrollToValue(newOffset, Direction);
LastVerticalLocation = newOffset;
}
else
{
if (ScrollableWidth > 0)
{
e.Handled = true;
}
var WheelChange = e.Delta * (ViewportWidth / 1.5) / ActualWidth;
var newOffset = LastHorizontalLocation - WheelChange;
if (newOffset < 0)
{
newOffset = 0;
}
if (newOffset > ScrollableWidth)
{
newOffset = ScrollableWidth;
}
if (newOffset == LastHorizontalLocation)
{
return;
}
ScrollToHorizontalOffset(LastHorizontalLocation);
ScrollToValue(newOffset, Direction);
LastHorizontalLocation = newOffset;
}
}
/// <inheritdoc/>
protected override void OnScrollChanged(ScrollChangedEventArgs e)
{
base.OnScrollChanged(e);
if (!ScrollViewerBehavior.GetIsAnimating(this))
{
LastVerticalLocation = VerticalOffset;
LastHorizontalLocation = HorizontalOffset;
}
}
private Orientation GetDirection()
{
var isShiftDown = Keyboard.IsKeyDown(Key.LeftShift) || Keyboard.IsKeyDown(Key.RightShift);
if (Orientation == Orientation.Horizontal)
{
return isShiftDown ? Orientation.Vertical : Orientation.Horizontal;
}
else
{
return isShiftDown ? Orientation.Horizontal : Orientation.Vertical;
}
}
/// <summary>
/// Causes the <see cref="ScrollViewerEx"/> to load a new view into the viewport using the specified offsets and zoom factor.
/// </summary>
/// <param name="horizontalOffset">A value between 0 and <see cref="ScrollViewer.ScrollableWidth"/> that specifies the distance the content should be scrolled horizontally.</param>
/// <param name="verticalOffset">A value between 0 and <see cref="ScrollViewer.ScrollableHeight"/> that specifies the distance the content should be scrolled vertically.</param>
/// <param name="zoomFactor">A value between MinZoomFactor and MaxZoomFactor that specifies the required target ZoomFactor.</param>
/// <returns><see langword="true"/> if the view is changed; otherwise, <see langword="false"/>.</returns>
public bool ChangeView(double? horizontalOffset, double? verticalOffset, float? zoomFactor)
{
return ChangeView(horizontalOffset, verticalOffset, zoomFactor, false);
}
/// <summary>
/// Causes the <see cref="ScrollViewerEx"/> to load a new view into the viewport using the specified offsets and zoom factor, and optionally disables scrolling animation.
/// </summary>
/// <param name="horizontalOffset">A value between 0 and <see cref="ScrollViewer.ScrollableWidth"/> that specifies the distance the content should be scrolled horizontally.</param>
/// <param name="verticalOffset">A value between 0 and <see cref="ScrollViewer.ScrollableHeight"/> that specifies the distance the content should be scrolled vertically.</param>
/// <param name="zoomFactor">A value between MinZoomFactor and MaxZoomFactor that specifies the required target ZoomFactor.</param>
/// <param name="disableAnimation"><see langword="true"/> to disable zoom/pan animations while changing the view; otherwise, <see langword="false"/>. The default is false.</param>
/// <returns><see langword="true"/> if the view is changed; otherwise, <see langword="false"/>.</returns>
public bool ChangeView(double? horizontalOffset, double? verticalOffset, float? zoomFactor, bool disableAnimation)
{
if (disableAnimation)
{
if (horizontalOffset.HasValue)
{
ScrollToHorizontalOffset(horizontalOffset.Value);
}
if (verticalOffset.HasValue)
{
ScrollToVerticalOffset(verticalOffset.Value);
}
}
else
{
if (horizontalOffset.HasValue)
{
ScrollToHorizontalOffset(LastHorizontalLocation);
ScrollToValue(Math.Min(ScrollableWidth, horizontalOffset.Value), Orientation.Horizontal);
LastHorizontalLocation = horizontalOffset.Value;
}
if (verticalOffset.HasValue)
{
ScrollToVerticalOffset(LastVerticalLocation);
ScrollToValue(Math.Min(ScrollableHeight, verticalOffset.Value), Orientation.Vertical);
LastVerticalLocation = verticalOffset.Value;
}
}
return true;
}
private void ScrollToValue(double value, Orientation Direction)
{
if (Direction == Orientation.Vertical)
{
ScrollToVerticalOffset(value);
}
else
{
ScrollToHorizontalOffset(value);
}
ScrollViewerBehavior.SetIsAnimating(this, false);
}
private void UpdateVisualState(bool useTransitions = true)
{
var stateName = AutoHideScrollBars ? "NoIndicator" : "MouseIndicator";
VisualStateManager.GoToState(this, stateName, useTransitions);
}
}
}

View file

@ -1,312 +0,0 @@
<UserControl
x:Class="Flow.Launcher.Resources.Controls.ExCard"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Flow.Launcher.Resources.Controls"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:ui="http://schemas.modernwpf.com/2019"
mc:Ignorable="d">
<UserControl.Template>
<ControlTemplate TargetType="UserControl">
<Expander
x:Name="expanderHeader"
Padding="0"
BorderThickness="1"
SnapsToDevicePixels="False">
<Expander.Style>
<Style TargetType="{x:Type Expander}">
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
<Setter Property="Background" Value="{DynamicResource Color00B}" />
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
<Setter Property="VerticalContentAlignment" Value="Stretch" />
<Setter Property="BorderBrush" Value="{DynamicResource Color03B}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Expander}">
<Border
x:Name="Bd"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="5"
SnapsToDevicePixels="true">
<DockPanel>
<ToggleButton
x:Name="HeaderSite"
MinWidth="0"
MinHeight="68"
Margin="0,0,0,0"
Padding="0,0,0,0"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
Content="{TemplateBinding Header}"
ContentTemplate="{TemplateBinding HeaderTemplate}"
ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}"
DockPanel.Dock="Top"
FocusVisualStyle="{DynamicResource ExpanderHeaderFocusVisual}"
FontFamily="{TemplateBinding FontFamily}"
FontSize="{TemplateBinding FontSize}"
FontStretch="{TemplateBinding FontStretch}"
FontStyle="{TemplateBinding FontStyle}"
FontWeight="{TemplateBinding FontWeight}"
Foreground="{TemplateBinding Foreground}"
IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource AncestorType=Expander}}">
<ToggleButton.Style>
<Style TargetType="{x:Type ToggleButton}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ToggleButton}">
<Border
x:Name="ToggleBtn"
Padding="{TemplateBinding Padding}"
Background="{DynamicResource Color00B}"
ClipToBounds="True"
CornerRadius="5">
<Grid SnapsToDevicePixels="True">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="30" />
</Grid.ColumnDefinitions>
<ContentPresenter
Grid.Column="0"
Margin="0,0,0,0"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
Content="{TemplateBinding Content}"
RecognizesAccessKey="True"
SnapsToDevicePixels="True" />
<Grid
x:Name="ChevronGrid"
Grid.Column="2"
Margin="0,0,18,0"
VerticalAlignment="Center"
Background="Transparent"
RenderTransformOrigin="0.5, 0.5">
<Grid.RenderTransform>
<RotateTransform Angle="0" />
</Grid.RenderTransform>
<Ellipse
x:Name="circle"
Width="19"
Height="19"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Stroke="Transparent" />
<Path
x:Name="arrow"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Data="M 1,1.5 L 4.5,5 L 8,1.5"
SnapsToDevicePixels="false"
Stroke="#666"
StrokeThickness="1" />
</Grid>
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="true">
<Setter TargetName="arrow" Property="Data" Value="M 1,4.5 L 4.5,1 L 8,4.5" />
<Setter TargetName="ToggleBtn" Property="CornerRadius" Value="5 5 0 0" />
</Trigger>
<Trigger Property="IsMouseOver" Value="true">
<Setter TargetName="circle" Property="Stroke" Value="Transparent" />
<Setter TargetName="arrow" Property="Stroke" Value="{DynamicResource Color05B}" />
<Setter TargetName="ToggleBtn" Property="Background" Value="{DynamicResource CustomExpanderHover}" />
</Trigger>
<Trigger Property="IsPressed" Value="true">
<Setter TargetName="circle" Property="Stroke" Value="Transparent" />
<Setter TargetName="circle" Property="StrokeThickness" Value="1.5" />
<Setter TargetName="arrow" Property="Stroke" Value="{DynamicResource Color17B}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ToggleButton.Style>
</ToggleButton>
<Border x:Name="ContentPresenterBorder" BorderThickness="0">
<ContentPresenter
x:Name="ExpandSite"
Margin="{TemplateBinding Padding}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
DockPanel.Dock="Bottom"
Focusable="false" />
<Border.LayoutTransform>
<ScaleTransform ScaleY="0" />
</Border.LayoutTransform>
</Border>
</DockPanel>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsExpanded" Value="true">
<Setter TargetName="ExpandSite" Property="Visibility" Value="Visible" />
<Setter TargetName="ContentPresenterBorder" Property="BorderThickness" Value="0,0,0,0" />
<Trigger.EnterActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation
Storyboard.TargetName="ContentPresenterBorder"
Storyboard.TargetProperty="(Border.LayoutTransform).(ScaleTransform.ScaleY)"
From="0.0"
To="1.0"
Duration="00:00:00.00" />
<DoubleAnimation
Storyboard.TargetName="ContentPresenterBorder"
Storyboard.TargetProperty="(Border.Opacity)"
From="0.0"
To="1.0"
Duration="00:00:00.00" />
</Storyboard>
</BeginStoryboard>
</Trigger.EnterActions>
<Trigger.ExitActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation
Storyboard.TargetName="ContentPresenterBorder"
Storyboard.TargetProperty="(Border.LayoutTransform).(ScaleTransform.ScaleY)"
From="1.0"
To="0"
Duration="00:00:00.00" />
<!-- Animation 00:00:00.167 -->
<DoubleAnimation
Storyboard.TargetName="ContentPresenterBorder"
Storyboard.TargetProperty="(Border.Opacity)"
From="1.0"
To="0.0"
Duration="00:00:00.00" />
<!-- Animation 00:00:00.167 -->
</Storyboard>
</BeginStoryboard>
</Trigger.ExitActions>
</Trigger>
<Trigger Property="ExpandDirection" Value="Right">
<Setter TargetName="ExpandSite" Property="DockPanel.Dock" Value="Right" />
<Setter TargetName="HeaderSite" Property="DockPanel.Dock" Value="Left" />
<Setter TargetName="HeaderSite" Property="Style" Value="{StaticResource ExpanderRightHeaderStyle}" />
</Trigger>
<Trigger Property="ExpandDirection" Value="Up">
<Setter TargetName="ExpandSite" Property="DockPanel.Dock" Value="Top" />
<Setter TargetName="HeaderSite" Property="DockPanel.Dock" Value="Bottom" />
<Setter TargetName="HeaderSite" Property="Style" Value="{StaticResource ExpanderUpHeaderStyle}" />
</Trigger>
<Trigger Property="ExpandDirection" Value="Left">
<Setter TargetName="ExpandSite" Property="DockPanel.Dock" Value="Left" />
<Setter TargetName="HeaderSite" Property="DockPanel.Dock" Value="Right" />
<Setter TargetName="HeaderSite" Property="Style" Value="{StaticResource ExpanderLeftHeaderStyle}" />
</Trigger>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Expander.Style>
<Expander.Header>
<Border Margin="0" Padding="0,12,0,12">
<Grid Width="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Expander}}, Path=ActualWidth}" HorizontalAlignment="Left">
<Grid.ColumnDefinitions>
<ColumnDefinition
Width="auto"
MinWidth="20"
MaxWidth="60" />
<ColumnDefinition Width="7*" />
<ColumnDefinition Width="Auto" MinWidth="30" />
<ColumnDefinition Width="Auto" MinWidth="30" />
</Grid.ColumnDefinitions>
<ContentControl
x:Name="firstContentPresenter"
Grid.Column="2"
Margin="0,0,14,0"
HorizontalAlignment="Right"
Content="{Binding SideContent, RelativeSource={RelativeSource AncestorType=local:ExCard}}" />
<TextBlock
x:Name="ItemIcon"
Grid.Column="0"
VerticalAlignment="Center"
Text="{Binding Icon, RelativeSource={RelativeSource AncestorType=local:ExCard}}">
<TextBlock.Style>
<Style TargetType="{x:Type TextBlock}">
<Style.Triggers>
<DataTrigger Binding="{Binding ElementName=ItemIcon, Path=Text}" Value="{x:Static sys:String.Empty}">
<Setter Property="Margin" Value="24,0,0,0" />
</DataTrigger>
</Style.Triggers>
<Setter Property="Grid.Column" Value="0" />
<Setter Property="Margin" Value="24,0,16,0" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="FontSize" Value="20" />
<Setter Property="FontFamily" Value="/Resources/#Segoe Fluent Icons" />
<Setter Property="Foreground" Value="{DynamicResource Color05B}" />
</Style>
</TextBlock.Style>
</TextBlock>
<StackPanel Grid.Column="1" Margin="0,0,14,0">
<StackPanel.Style>
<Style TargetType="{x:Type StackPanel}">
<Setter Property="Grid.Column" Value="1" />
<Setter Property="Width" Value="Auto" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="HorizontalAlignment" Value="Left" />
</Style>
</StackPanel.Style>
<TextBlock x:Name="ItemTitle" Text="{Binding Title, RelativeSource={RelativeSource AncestorType=local:ExCard}}">
<TextBlock.Style>
<Style TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="{DynamicResource Color05B}" />
<Setter Property="Margin" Value="0,0,0,0" />
<Setter Property="TextWrapping" Value="Wrap" />
<Setter Property="VerticalAlignment" Value="Center" />
</Style>
</TextBlock.Style>
</TextBlock>
<TextBlock x:Name="SubTitle" Text="{Binding Sub, RelativeSource={RelativeSource AncestorType=local:ExCard}}">
<TextBlock.Style>
<Style TargetType="{x:Type TextBlock}">
<Style.Triggers>
<DataTrigger Binding="{Binding ElementName=SubTitle, Path=Text}" Value="{x:Static sys:String.Empty}">
<Setter Property="Visibility" Value="Collapsed" />
</DataTrigger>
</Style.Triggers>
<Setter Property="Foreground" Value="{DynamicResource Color04B}" />
<Setter Property="FontSize" Value="12" />
<Setter Property="Margin" Value="0,0,0,0" />
<Setter Property="Padding" Value="0,0,24,0" />
<Setter Property="TextWrapping" Value="WrapWithOverflow" />
</Style>
</TextBlock.Style>
</TextBlock>
</StackPanel>
</Grid>
</Border>
</Expander.Header>
<Grid
Grid.Column="0"
Grid.ColumnSpan="4"
HorizontalAlignment="Stretch"
FlowDirection="LeftToRight">
<StackPanel Margin="0,0,0,0" Orientation="Vertical">
<ContentControl
Grid.Column="0"
Grid.ColumnSpan="4"
Margin="0,0,0,0"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
Content="{TemplateBinding Content}" />
</StackPanel>
</Grid>
</Expander>
</ControlTemplate>
</UserControl.Template>
</UserControl>

View file

@ -1,57 +0,0 @@
using System.Windows;
using System.Windows.Controls;
namespace Flow.Launcher.Resources.Controls
{
public partial class ExCard : UserControl
{
public ExCard()
{
InitializeComponent();
}
public string Title
{
get { return (string)GetValue(TitleProperty); }
set { SetValue(TitleProperty, value); }
}
public static readonly DependencyProperty TitleProperty =
DependencyProperty.Register(nameof(Title), typeof(string), typeof(ExCard), new PropertyMetadata(string.Empty));
public string Sub
{
get { return (string)GetValue(SubProperty); }
set { SetValue(SubProperty, value); }
}
public static readonly DependencyProperty SubProperty =
DependencyProperty.Register(nameof(Sub), typeof(string), typeof(ExCard), new PropertyMetadata(string.Empty));
public string Icon
{
get { return (string)GetValue(IconProperty); }
set { SetValue(IconProperty, value); }
}
public static readonly DependencyProperty IconProperty =
DependencyProperty.Register(nameof(Icon), typeof(string), typeof(ExCard), new PropertyMetadata(string.Empty));
/// <summary>
/// Gets or sets additional content for the UserControl
/// </summary>
public object AdditionalContent
{
get { return (object)GetValue(AdditionalContentProperty); }
set { SetValue(AdditionalContentProperty, value); }
}
public static readonly DependencyProperty AdditionalContentProperty =
DependencyProperty.Register(nameof(AdditionalContent), typeof(object), typeof(ExCard),
new PropertyMetadata(null));
public object SideContent
{
get { return (object)GetValue(SideContentProperty); }
set { SetValue(SideContentProperty, value); }
}
public static readonly DependencyProperty SideContentProperty =
DependencyProperty.Register(nameof(SideContent), typeof(object), typeof(ExCard),
new PropertyMetadata(null));
}
}

View file

@ -1,14 +0,0 @@
<UserControl x:Class="Flow.Launcher.Resources.Controls.HyperLink"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300">
<TextBlock>
<Hyperlink NavigateUri="{Binding Uri, RelativeSource={RelativeSource AncestorType=UserControl}}"
RequestNavigate="Hyperlink_OnRequestNavigate">
<Run Text="{Binding Text, RelativeSource={RelativeSource AncestorType=UserControl}}" />
</Hyperlink>
</TextBlock>
</UserControl>

View file

@ -1,39 +0,0 @@
using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;
namespace Flow.Launcher.Resources.Controls;
public partial class HyperLink : UserControl
{
public static readonly DependencyProperty UriProperty = DependencyProperty.Register(
nameof(Uri), typeof(string), typeof(HyperLink), new PropertyMetadata(default(string))
);
public string Uri
{
get => (string)GetValue(UriProperty);
set => SetValue(UriProperty, value);
}
public static readonly DependencyProperty TextProperty = DependencyProperty.Register(
nameof(Text), typeof(string), typeof(HyperLink), new PropertyMetadata(default(string))
);
public string Text
{
get => (string)GetValue(TextProperty);
set => SetValue(TextProperty, value);
}
public HyperLink()
{
InitializeComponent();
}
private void Hyperlink_OnRequestNavigate(object sender, RequestNavigateEventArgs e)
{
App.API.OpenUrl(e.Uri);
e.Handled = true;
}
}

View file

@ -1,81 +0,0 @@
<UserControl
x:Class="Flow.Launcher.Resources.Controls.InfoBar"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:cc="clr-namespace:Flow.Launcher.Resources.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="http://schemas.modernwpf.com/2019"
d:DesignHeight="45"
d:DesignWidth="400"
mc:Ignorable="d">
<UserControl.Resources />
<Grid>
<Border
x:Name="PART_Border"
MinHeight="48"
Padding="18 18 18 18"
Background="{DynamicResource InfoBarInfoBG}"
BorderBrush="{DynamicResource Color03B}"
BorderThickness="1"
CornerRadius="5">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" MinWidth="24" />
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0" Orientation="Horizontal">
<Border
x:Name="PART_IconBorder"
Width="16"
Height="16"
Margin="0 0 12 0"
VerticalAlignment="Top"
CornerRadius="10">
<ui:FontIcon
x:Name="PART_Icon"
Margin="1 0 0 1"
VerticalAlignment="Center"
FontFamily="Segoe MDL2 Assets"
FontSize="13"
Foreground="{DynamicResource Color01B}"
Visibility="Visible" />
</Border>
</StackPanel>
<StackPanel
x:Name="PART_StackPanel"
Grid.Column="1"
VerticalAlignment="Center"
Orientation="Horizontal">
<TextBlock
x:Name="PART_Title"
Margin="0 0 12 0"
FontWeight="SemiBold"
Foreground="{DynamicResource Color05B}"
Text="{Binding RelativeSource={RelativeSource AncestorType=cc:InfoBar}, Path=Title}" />
<TextBlock
x:Name="PART_Message"
Foreground="{DynamicResource Color05B}"
Text="{Binding RelativeSource={RelativeSource AncestorType=cc:InfoBar}, Path=Message}"
TextWrapping="Wrap" />
</StackPanel>
<Button
x:Name="PART_CloseButton"
Grid.Column="2"
Width="32"
Height="32"
VerticalAlignment="Center"
AutomationProperties.Name="Close InfoBar"
Click="PART_CloseButton_Click"
Content="&#xE10A;"
FontFamily="Segoe MDL2 Assets"
FontSize="12"
ToolTip="Close"
Visibility="Visible" />
</Grid>
</Border>
</Grid>
</UserControl>

View file

@ -1,222 +0,0 @@
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
namespace Flow.Launcher.Resources.Controls
{
public partial class InfoBar : UserControl
{
public InfoBar()
{
InitializeComponent();
Loaded += InfoBar_Loaded;
}
private void InfoBar_Loaded(object sender, RoutedEventArgs e)
{
UpdateStyle();
UpdateTitleVisibility();
UpdateMessageVisibility();
UpdateOrientation();
UpdateIconAlignmentAndMargin();
UpdateIconVisibility();
UpdateCloseButtonVisibility();
}
public static readonly DependencyProperty TypeProperty =
DependencyProperty.Register(nameof(Type), typeof(InfoBarType), typeof(InfoBar), new PropertyMetadata(InfoBarType.Info, OnTypeChanged));
public InfoBarType Type
{
get => (InfoBarType)GetValue(TypeProperty);
set => SetValue(TypeProperty, value);
}
private static void OnTypeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
if (d is InfoBar infoBar)
{
infoBar.UpdateStyle();
}
}
public static readonly DependencyProperty MessageProperty =
DependencyProperty.Register(nameof(Message), typeof(string), typeof(InfoBar), new PropertyMetadata(string.Empty, OnMessageChanged));
public string Message
{
get => (string)GetValue(MessageProperty);
set
{
SetValue(MessageProperty, value);
}
}
private static void OnMessageChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
if (d is InfoBar infoBar)
{
infoBar.UpdateMessageVisibility();
}
}
private void UpdateMessageVisibility()
{
PART_Message.Visibility = string.IsNullOrEmpty(Message) ? Visibility.Collapsed : Visibility.Visible;
}
public static readonly DependencyProperty TitleProperty =
DependencyProperty.Register(nameof(Title), typeof(string), typeof(InfoBar), new PropertyMetadata(string.Empty, OnTitleChanged));
public string Title
{
get => (string)GetValue(TitleProperty);
set
{
SetValue(TitleProperty, value);
UpdateTitleVisibility(); // Visibility update when change Title
}
}
private static void OnTitleChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
if (d is InfoBar infoBar)
{
infoBar.UpdateTitleVisibility();
}
}
private void UpdateTitleVisibility()
{
PART_Title.Visibility = string.IsNullOrEmpty(Title) ? Visibility.Collapsed : Visibility.Visible;
}
public static readonly DependencyProperty IsIconVisibleProperty =
DependencyProperty.Register(nameof(IsIconVisible), typeof(bool), typeof(InfoBar), new PropertyMetadata(true, OnIsIconVisibleChanged));
public bool IsIconVisible
{
get => (bool)GetValue(IsIconVisibleProperty);
set => SetValue(IsIconVisibleProperty, value);
}
public static readonly DependencyProperty LengthProperty =
DependencyProperty.Register(nameof(Length), typeof(InfoBarLength), typeof(InfoBar), new PropertyMetadata(InfoBarLength.Short, OnLengthChanged));
public InfoBarLength Length
{
get { return (InfoBarLength)GetValue(LengthProperty); }
set { SetValue(LengthProperty, value); }
}
private static void OnLengthChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
if (d is InfoBar infoBar)
{
infoBar.UpdateOrientation();
infoBar.UpdateIconAlignmentAndMargin();
}
}
private void UpdateOrientation()
{
PART_StackPanel.Orientation = Length == InfoBarLength.Long ? Orientation.Vertical : Orientation.Horizontal;
}
private void UpdateIconAlignmentAndMargin()
{
if (Length == InfoBarLength.Short)
{
PART_IconBorder.VerticalAlignment = VerticalAlignment.Center;
PART_IconBorder.Margin = new Thickness(0, 0, 12, 0);
}
else
{
PART_IconBorder.VerticalAlignment = VerticalAlignment.Top;
PART_IconBorder.Margin = new Thickness(0, 2, 12, 0);
}
}
public static readonly DependencyProperty ClosableProperty =
DependencyProperty.Register(nameof(Closable), typeof(bool), typeof(InfoBar), new PropertyMetadata(true, OnClosableChanged));
public bool Closable
{
get => (bool)GetValue(ClosableProperty);
set => SetValue(ClosableProperty, value);
}
private void PART_CloseButton_Click(object sender, RoutedEventArgs e)
{
Visibility = Visibility.Collapsed;
}
private void UpdateStyle()
{
switch (Type)
{
case InfoBarType.Info:
PART_Border.Background = (Brush)FindResource("InfoBarInfoBG");
PART_IconBorder.Background = (Brush)FindResource("InfoBarInfoIcon");
PART_Icon.Glyph = "\xF13F";
break;
case InfoBarType.Success:
PART_Border.Background = (Brush)FindResource("InfoBarSuccessBG");
PART_IconBorder.Background = (Brush)FindResource("InfoBarSuccessIcon");
PART_Icon.Glyph = "\xF13E";
break;
case InfoBarType.Warning:
PART_Border.Background = (Brush)FindResource("InfoBarWarningBG");
PART_IconBorder.Background = (Brush)FindResource("InfoBarWarningIcon");
PART_Icon.Glyph = "\xF13C";
break;
case InfoBarType.Error:
PART_Border.Background = (Brush)FindResource("InfoBarErrorBG");
PART_IconBorder.Background = (Brush)FindResource("InfoBarErrorIcon");
PART_Icon.Glyph = "\xF13D";
break;
default:
PART_Border.Background = (Brush)FindResource("InfoBarInfoBG");
PART_IconBorder.Background = (Brush)FindResource("InfoBarInfoIcon");
PART_Icon.Glyph = "\xF13F";
break;
}
}
private static void OnIsIconVisibleChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var infoBar = (InfoBar)d;
infoBar.UpdateIconVisibility();
}
private static void OnClosableChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var infoBar = (InfoBar)d;
infoBar.UpdateCloseButtonVisibility();
}
private void UpdateIconVisibility()
{
PART_IconBorder.Visibility = IsIconVisible ? Visibility.Visible : Visibility.Collapsed;
}
private void UpdateCloseButtonVisibility()
{
PART_CloseButton.Visibility = Closable ? Visibility.Visible : Visibility.Collapsed;
}
}
public enum InfoBarType
{
Info,
Success,
Warning,
Error
}
public enum InfoBarLength
{
Short,
Long
}
}

View file

@ -6,7 +6,7 @@
xmlns:converters="clr-namespace:Flow.Launcher.Converters"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="http://schemas.modernwpf.com/2019"
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
xmlns:viewModel="clr-namespace:Flow.Launcher.ViewModel"
d:DataContext="{d:DesignInstance viewModel:PluginViewModel}"
d:DesignHeight="300"
@ -66,6 +66,7 @@
Text="{DynamicResource priority}"
ToolTip="{DynamicResource priorityToolTip}" />
<ui:NumberBox
MinWidth="120"
Margin="0 0 8 0"
Maximum="999"
Minimum="-999"
@ -89,6 +90,7 @@
ToolTip="{DynamicResource searchDelayToolTip}" />
<ui:NumberBox
Width="120"
MinWidth="120"
Margin="0 0 8 0"
IsEnabled="{Binding SearchDelayEnabled}"
Maximum="1000"

View file

@ -1,4 +1,4 @@
using ModernWpf.Controls;
using iNKORE.UI.WPF.Modern.Controls;
namespace Flow.Launcher.Resources.Controls;

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -5,7 +5,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Flow.Launcher.Resources.Pages"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="http://schemas.modernwpf.com/2019"
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
Title="WelcomePage1"
DataContext="{Binding RelativeSource={RelativeSource Self}}"
mc:Ignorable="d">
@ -99,11 +99,11 @@
</Style.Triggers>
</Style>
</Page.Resources>
<ScrollViewer>
<ui:ScrollViewerEx>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="250" />
<RowDefinition Height="340"/>
<RowDefinition Height="340" />
</Grid.RowDefinitions>
<Border Grid.Row="0" HorizontalAlignment="Stretch">
@ -156,7 +156,8 @@
<TextBlock
FontSize="20"
FontWeight="SemiBold"
Text="{DynamicResource Welcome_Page1_Title}" TextWrapping="WrapWithOverflow"/>
Text="{DynamicResource Welcome_Page1_Title}"
TextWrapping="WrapWithOverflow" />
<TextBlock
Margin="0 10 24 0"
FontSize="14"
@ -185,5 +186,5 @@
</StackPanel>
</Canvas>
</Grid>
</ScrollViewer>
</ui:ScrollViewerEx>
</ui:Page>

View file

@ -7,7 +7,7 @@
xmlns:flowlauncher="clr-namespace:Flow.Launcher"
xmlns:local="clr-namespace:Flow.Launcher.Resources.Pages"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="http://schemas.modernwpf.com/2019"
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
Title="WelcomePage2"
DataContext="{Binding RelativeSource={RelativeSource Self}}"
mc:Ignorable="d">
@ -34,11 +34,11 @@
</Style.Triggers>
</Style>
</Page.Resources>
<ScrollViewer>
<ui:ScrollViewerEx>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="250" />
<RowDefinition Height="340"/>
<RowDefinition Height="340" />
</Grid.RowDefinitions>
<Border Grid.Row="0" HorizontalAlignment="Stretch">
@ -89,12 +89,13 @@
</StackPanel>
</Border>
<ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Visible">
<StackPanel Margin="24 20 24 20">
<Grid Grid.Row="1">
<StackPanel Margin="24 20 24 20">
<TextBlock
FontSize="20"
FontWeight="SemiBold"
Text="{DynamicResource Welcome_Page2_Title}" TextWrapping="WrapWithOverflow"/>
Text="{DynamicResource Welcome_Page2_Title}"
TextWrapping="WrapWithOverflow" />
<TextBlock
Margin="0 10 0 0"
FontSize="14"
@ -119,7 +120,7 @@
WindowTitle="{DynamicResource flowlauncherHotkey}" />
</StackPanel>
</ScrollViewer>
</Grid>
</Grid>
</ScrollViewer>
</ui:ScrollViewerEx>
</ui:Page>

View file

@ -4,9 +4,10 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:cc="clr-namespace:Flow.Launcher.Resources.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:ikw="http://schemas.inkore.net/lib/ui/wpf"
xmlns:local="clr-namespace:Flow.Launcher.Resources.Pages"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="http://schemas.modernwpf.com/2019"
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
Title="WelcomePage3"
VerticalAlignment="Stretch"
mc:Ignorable="d">
@ -40,75 +41,97 @@
FontSize="20"
FontWeight="SemiBold"
Text="{DynamicResource Welcome_Page3_Title}" />
<ScrollViewer
<ui:ScrollViewerEx
Grid.Row="1"
Height="478"
Margin="0 0 0 0"
Height="483"
HorizontalAlignment="Stretch"
FontSize="13">
<StackPanel Margin="24 0 24 0">
<Border
BorderBrush="{DynamicResource Color03B}"
BorderThickness="0"
CornerRadius="5">
<StackPanel>
<cc:Card
Title="{DynamicResource HotkeyUpDownDesc}"
BorderThickness="0 0 0 0"
Type="Inside">
<StackPanel Orientation="Horizontal">
<cc:HotkeyDisplay Keys="←+→" Type="Small" />
</StackPanel>
</cc:Card>
<cc:Card
Title="{DynamicResource HotkeyLeftRightDesc}"
BorderThickness="0 0 0 0"
Type="Inside">
<StackPanel Orientation="Horizontal">
<cc:HotkeyDisplay Keys="↑+↓" Type="Small" />
</StackPanel>
</cc:Card>
<cc:Card
Title="{DynamicResource HotkeyESCDesc}"
BorderThickness="0 0 0 0"
Type="Inside">
<StackPanel Orientation="Horizontal">
<cc:HotkeyDisplay Keys="ESC" Type="Small" />
</StackPanel>
</cc:Card>
<cc:Card
Title="{DynamicResource HotkeyRunDesc}"
BorderThickness="0 0 0 0"
Type="Inside">
<cc:HotkeyDisplay Keys="ENTER" Type="Small" />
</cc:Card>
<cc:Card
Title="{DynamicResource HotkeyShiftEnterDesc}"
BorderThickness="0 0 0 0"
Type="Inside">
<StackPanel Orientation="Horizontal">
<cc:HotkeyDisplay Keys="SHIFT+ENTER" Type="Small" />
</StackPanel>
</cc:Card>
<cc:Card
Title="{DynamicResource HotkeyCtrlEnterDesc}"
BorderThickness="0 0 0 0"
Type="Inside">
<StackPanel Orientation="Horizontal">
<cc:HotkeyDisplay Keys="CTRL+ENTER" Type="Small" />
</StackPanel>
</cc:Card>
<cc:Card
Title="{DynamicResource HotkeyCtrlShiftEnterDesc}"
BorderThickness="0 0 0 0"
Type="Inside">
<StackPanel Orientation="Horizontal">
<cc:HotkeyDisplay Keys="CTRL+SHIFT+ENTER" Type="Small" />
</StackPanel>
</cc:Card>
<ui:SettingsCard
Background="Transparent"
BorderThickness="0 0 0 0"
Header="{DynamicResource HotkeyUpDownDesc}">
<StackPanel Orientation="Horizontal">
<cc:HotkeyDisplay Keys="←+→" Type="Small" />
</StackPanel>
</Border>
</ui:SettingsCard>
<Border
Height="1"
Background="{DynamicResource Color03B}"
BorderThickness="0" />
<ui:SettingsCard
Background="Transparent"
BorderThickness="0 0 0 0"
Header="{DynamicResource HotkeyLeftRightDesc}">
<StackPanel Orientation="Horizontal">
<cc:HotkeyDisplay Keys="↑+↓" Type="Small" />
</StackPanel>
</ui:SettingsCard>
<Border
Height="1"
Background="{DynamicResource Color03B}"
BorderThickness="0" />
<ui:SettingsCard
Background="Transparent"
BorderThickness="0 0 0 0"
Header="{DynamicResource HotkeyESCDesc}">
<StackPanel Orientation="Horizontal">
<cc:HotkeyDisplay Keys="ESC" Type="Small" />
</StackPanel>
</ui:SettingsCard>
<Border
Height="1"
Background="{DynamicResource Color03B}"
BorderThickness="0" />
<ui:SettingsCard
Background="Transparent"
BorderThickness="0 0 0 0"
Header="{DynamicResource HotkeyRunDesc}">
<cc:HotkeyDisplay Keys="ENTER" Type="Small" />
</ui:SettingsCard>
<Border
Height="1"
Background="{DynamicResource Color03B}"
BorderThickness="0" />
<ui:SettingsCard
Background="Transparent"
BorderThickness="0 0 0 0"
Header="{DynamicResource HotkeyShiftEnterDesc}">
<StackPanel Orientation="Horizontal">
<cc:HotkeyDisplay Keys="SHIFT+ENTER" Type="Small" />
</StackPanel>
</ui:SettingsCard>
<Border
Height="1"
Background="{DynamicResource Color03B}"
BorderThickness="0" />
<ui:SettingsCard
Background="Transparent"
BorderThickness="0 0 0 0"
Header="{DynamicResource HotkeyCtrlEnterDesc}">
<StackPanel Orientation="Horizontal">
<cc:HotkeyDisplay Keys="CTRL+ENTER" Type="Small" />
</StackPanel>
</ui:SettingsCard>
<Border
Height="1"
Background="{DynamicResource Color03B}"
BorderThickness="0" />
<ui:SettingsCard
Background="Transparent"
BorderThickness="0 0 0 0"
Header="{DynamicResource HotkeyCtrlShiftEnterDesc}">
<StackPanel Orientation="Horizontal">
<cc:HotkeyDisplay Keys="CTRL+SHIFT+ENTER" Type="Small" />
</StackPanel>
</ui:SettingsCard>
</StackPanel>
</ScrollViewer>
</ui:ScrollViewerEx>
</Grid>
</ui:Page>

View file

@ -5,7 +5,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Flow.Launcher.Resources.Pages"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="http://schemas.modernwpf.com/2019"
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
Title="WelcomePage4"
d:DesignHeight="450"
d:DesignWidth="800"
@ -54,7 +54,7 @@
<Setter Property="Foreground" Value="{DynamicResource Color04B}" />
</Style>
</Page.Resources>
<ScrollViewer>
<ui:ScrollViewerEx>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="250" />
@ -93,7 +93,8 @@
<TextBlock
FontSize="20"
FontWeight="SemiBold"
Text="{DynamicResource Welcome_Page4_Title}" TextWrapping="WrapWithOverflow"/>
Text="{DynamicResource Welcome_Page4_Title}"
TextWrapping="WrapWithOverflow" />
<TextBlock
Margin="0 10 0 10"
FontSize="14"
@ -132,5 +133,5 @@
</StackPanel>
</Grid>
</ScrollViewer>
</ui:ScrollViewerEx>
</ui:Page>

View file

@ -5,7 +5,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Flow.Launcher.Resources.Pages"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="http://schemas.modernwpf.com/2019"
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
xmlns:userSettings="clr-namespace:Flow.Launcher.Infrastructure.UserSettings;assembly=Flow.Launcher.Infrastructure"
Title="WelcomePage5"
d:DesignHeight="450"
@ -49,11 +49,11 @@
</Style.Triggers>
</Style>
</Page.Resources>
<ScrollViewer>
<ui:ScrollViewerEx>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="250" />
<RowDefinition Height="340"/>
<RowDefinition Height="340" />
</Grid.RowDefinitions>
<Border Grid.Row="0" HorizontalAlignment="Stretch">
@ -79,12 +79,13 @@
</StackPanel>
</Border>
<StackPanel Grid.Row="1" Margin="24 20 24 20" >
<StackPanel Grid.Row="1" Margin="24 20 24 20">
<StackPanel>
<TextBlock
FontSize="20"
FontWeight="SemiBold"
Text="{DynamicResource Welcome_Page5_Title}" TextWrapping="WrapWithOverflow"/>
Text="{DynamicResource Welcome_Page5_Title}"
TextWrapping="WrapWithOverflow" />
<TextBlock
Margin="0 10 0 0"
FontSize="14"
@ -118,5 +119,5 @@
</StackPanel>
</Grid>
</ScrollViewer>
</ui:ScrollViewerEx>
</ui:Page>

View file

@ -2,39 +2,17 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:converters="clr-namespace:Flow.Launcher.Converters"
xmlns:core="clr-namespace:Flow.Launcher.Core.Resource;assembly=Flow.Launcher.Core">
xmlns:core="clr-namespace:Flow.Launcher.Core.Resource;assembly=Flow.Launcher.Core"
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
xmlns:wpftk="clr-namespace:WpfToolkit.Controls;assembly=VirtualizingWrapPanel">
<converters:BorderClipConverter x:Key="BorderClipConverter" />
<converters:BoolToVisibilityConverter x:Key="BoolToVisibilityConverter" />
<converters:TextConverter x:Key="TextConverter" />
<!-- Icon for Theme Type Label -->
<Geometry x:Key="circle_half_stroke_solid">F1 M512,512z M0,0z M448,256C448,150,362,64,256,64L256,448C362,448,448,362,448,256z M0,256A256,256,0,1,1,512,256A256,256,0,1,1,0,256z</Geometry>
<Style x:Key="StoreItemFocusVisualStyleKey">
<Setter Property="Control.Template">
<Setter.Value>
<ControlTemplate>
<Rectangle
Margin="0"
Stroke="Black"
StrokeThickness="2" />
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="SwitchFocusVisualStyleKey">
<Setter Property="Control.Template">
<Setter.Value>
<ControlTemplate>
<Rectangle
Margin="-8 -4 -8 -4"
RadiusX="5"
RadiusY="5"
Stroke="{DynamicResource Color05B}"
StrokeThickness="2" />
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- Setting Controls -->
<Style x:Key="SettingGrid" TargetType="ItemsControl">
<Setter Property="Focusable" Value="False" />
<Setter Property="Margin" Value="0" />
@ -55,10 +33,73 @@
</Setter.Value>
</Setter>
</Style>
<Style x:Key="ThemeList" TargetType="ListBoxItem">
<Style x:Key="SettingGroupBox" TargetType="{x:Type Border}">
<Setter Property="Background" Value="{DynamicResource Color00B}" />
<Setter Property="BorderBrush" Value="{DynamicResource Color03B}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="CornerRadius" Value="5" />
<Setter Property="Margin" Value="0 5 0 0" />
<Setter Property="Padding" Value="0 15 0 15" />
<Setter Property="SnapsToDevicePixels" Value="True" />
</Style>
<Style x:Key="SettingTitleLabel" TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="{DynamicResource Color05B}" />
<Setter Property="Margin" Value="0 0 0 0" />
<Setter Property="TextWrapping" Value="Wrap" />
</Style>
<Style x:Key="SettingSubTitleLabel" TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="{DynamicResource Color04B}" />
<Setter Property="FontSize" Value="12" />
<Setter Property="Margin" Value="0 0 0 0" />
<Setter Property="Padding" Value="0 0 24 0" />
<Setter Property="TextWrapping" Value="WrapWithOverflow" />
</Style>
<Style x:Key="TextPanel" TargetType="{x:Type StackPanel}">
<Setter Property="Grid.Column" Value="1" />
<Setter Property="Margin" Value="0 0 0 0" />
<Setter Property="Width" Value="Auto" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="HorizontalAlignment" Value="Left" />
</Style>
<Style
x:Key="SideControlCheckBox"
BasedOn="{StaticResource DefaultCheckBoxStyle}"
TargetType="{x:Type CheckBox}">
<Setter Property="Width" Value="24" />
<Setter Property="Grid.Column" Value="2" />
<Setter Property="Margin" Value="0 4 10 4" />
<Setter Property="LayoutTransform">
<Setter.Value>
<ScaleTransform ScaleX="1" ScaleY="1" />
</Setter.Value>
</Setter>
</Style>
<Style x:Key="SideTextAbout" TargetType="{x:Type TextBlock}">
<Setter Property="HorizontalAlignment" Value="Right" />
<Setter Property="Grid.Column" Value="1" />
<Setter Property="Margin" Value="0 0 -18 0" />
</Style>
<!--#region Theme Style-->
<Style
x:Key="ThemeListStyle"
BasedOn="{StaticResource DefaultListBoxStyle}"
TargetType="{x:Type ListBox}">
<Setter Property="BorderBrush" Value="Transparent" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="KeyboardNavigation.TabNavigation" Value="None" />
<Setter Property="Padding" Value="0 0 0 0" />
</Style>
<Style
x:Key="ThemeList"
BasedOn="{StaticResource DefaultListBoxItemStyle}"
TargetType="ListBoxItem">
<Setter Property="HorizontalContentAlignment" Value="Left" />
<Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="Padding" Value="0" />
<Setter Property="UseLayoutRounding" Value="True" />
<Setter Property="Margin" Value="4" />
<Setter Property="Template">
<Setter.Value>
@ -96,167 +137,15 @@
</Setter.Value>
</Setter>
</Style>
<Style x:Key="SettingGroupBox" TargetType="{x:Type Border}">
<Setter Property="Background" Value="{DynamicResource Color00B}" />
<Setter Property="BorderBrush" Value="{DynamicResource Color03B}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="CornerRadius" Value="5" />
<Setter Property="Margin" Value="0 5 0 0" />
<Setter Property="Padding" Value="0 15 0 15" />
<Setter Property="SnapsToDevicePixels" Value="True" />
</Style>
<Style x:Key="SettingTitleLabel" TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="{DynamicResource Color05B}" />
<Setter Property="Margin" Value="0 0 0 0" />
<Setter Property="TextWrapping" Value="Wrap" />
</Style>
<Style x:Key="SettingSubTitleLabel" TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="{DynamicResource Color04B}" />
<Setter Property="FontSize" Value="12" />
<Setter Property="Margin" Value="0 0 0 0" />
<Setter Property="Padding" Value="0 0 24 0" />
<Setter Property="TextWrapping" Value="WrapWithOverflow" />
</Style>
<Style x:Key="TextPanel" TargetType="{x:Type StackPanel}">
<Setter Property="Grid.Column" Value="1" />
<Setter Property="Margin" Value="0 0 0 0" />
<Setter Property="Width" Value="Auto" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="HorizontalAlignment" Value="Left" />
</Style>
<!--#region Plugin Style-->
<Style
x:Key="SideControlCheckBox"
BasedOn="{StaticResource DefaultCheckBoxStyle}"
TargetType="{x:Type CheckBox}">
<Setter Property="Width" Value="24" />
<Setter Property="Grid.Column" Value="2" />
<Setter Property="Margin" Value="0 4 10 4" />
<Setter Property="LayoutTransform">
<Setter.Value>
<ScaleTransform ScaleX="1" ScaleY="1" />
</Setter.Value>
</Setter>
</Style>
<Style x:Key="SideTextAbout" TargetType="{x:Type TextBlock}">
<Setter Property="HorizontalAlignment" Value="Right" />
<Setter Property="Grid.Column" Value="1" />
<Setter Property="Margin" Value="0 0 -18 0" />
</Style>
<Style x:Key="logo" TargetType="{x:Type TabItem}">
<!--#region Logo Style-->
<Setter Property="Margin" Value="0" />
<Setter Property="HorizontalAlignment" Value="center" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="Foreground" Value="black" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="Focusable" Value="false" />
<Setter Property="Cursor" Value="Arrow" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TabItem}">
<Border>
<Grid>
<Grid>
<Border
x:Name="Spacer"
Width="Auto"
Height="Auto"
Margin="0 10 5 0"
Padding="0 0 0 0"
BorderBrush="Transparent"
BorderThickness="0">
<Border
x:Name="border"
Background="Transparent"
CornerRadius="5">
<ContentPresenter
x:Name="ContentSite"
Margin="12 12 0 12"
HorizontalAlignment="LEFT"
VerticalAlignment="Center"
ContentSource="Header"
TextBlock.Foreground="#000" />
</Border>
</Border>
</Grid>
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="border" Property="Background" Value="Transparent" />
</Trigger>
<Trigger Property="IsSelected" Value="True">
<Setter TargetName="border" Property="Background" Value="transparent" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
<!--#endregion-->
</Style>
<Style x:Key="NavTabItem" TargetType="{x:Type TabItem}">
<Setter Property="DockPanel.Dock" Value="Top" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TabItem}">
<Grid>
<Border
x:Name="border"
Height="40"
Margin="14 4 8 4"
Padding="0 0 0 0"
HorizontalAlignment="Stretch"
Background="{DynamicResource Color01B}"
CornerRadius="5">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="4" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Rectangle
x:Name="Bullet"
Grid.Column="0"
Width="4"
Height="18"
Margin="0 11 0 11"
Fill="{DynamicResource ToggleSwitchFillOn}"
RadiusX="2"
RadiusY="2"
Visibility="Hidden" />
<ContentPresenter
x:Name="ContentSite"
Grid.Column="1"
Margin="12 11 18 11"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
ContentSource="Header"
TextBlock.Foreground="#000" />
</Grid>
</Border>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="border" Property="Background" Value="{DynamicResource Color06B}" />
</Trigger>
<Trigger Property="IsSelected" Value="True">
<Setter TargetName="border" Property="Background" Value="{DynamicResource Color06B}" />
<Setter TargetName="Bullet" Property="Visibility" Value="Visible" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="PluginList" TargetType="ListBoxItem">
x:Key="PluginList"
BasedOn="{StaticResource DefaultListBoxItemStyle}"
TargetType="ListBoxItem">
<Setter Property="Background" Value="{DynamicResource Color00B}" />
<Setter Property="Padding" Value="0 0 0 0" />
<Setter Property="UseLayoutRounding" Value="True" />
<Setter Property="SnapsToDevicePixels" Value="True" />
<Setter Property="Margin" Value="0 0 18 5" />
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
<Setter Property="BorderBrush" Value="{DynamicResource Color03B}" />
@ -288,7 +177,6 @@
<Setter TargetName="Bd" Property="Background" Value="{DynamicResource Color07B}" />
<Setter TargetName="Bd" Property="BorderBrush" Value="{DynamicResource Color03B}" />
<Setter TargetName="Bd" Property="CornerRadius" Value="5" />
</MultiTrigger>
<MultiTrigger>
<MultiTrigger.Conditions>
@ -298,8 +186,6 @@
<Setter TargetName="Bd" Property="Background" Value="{DynamicResource Color00B}" />
<Setter TargetName="Bd" Property="BorderBrush" Value="{DynamicResource Color03B}" />
<Setter TargetName="Bd" Property="Margin" Value="0 0 0 0" />
</MultiTrigger>
<MultiTrigger>
<MultiTrigger.Conditions>
@ -310,8 +196,6 @@
<Setter TargetName="Bd" Property="BorderBrush" Value="{DynamicResource Color03B}" />
<Setter TargetName="Bd" Property="CornerRadius" Value="5" />
<Setter TargetName="Bd" Property="Margin" Value="0 0 0 0" />
</MultiTrigger>
<Trigger Property="IsEnabled" Value="False">
<Setter TargetName="Bd" Property="TextElement.Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
@ -323,12 +207,59 @@
<!--#endregion-->
<Setter Property="Height" Value="Auto" />
</Style>
<Style
x:Key="PluginListStyle"
BasedOn="{StaticResource DefaultListBoxStyle}"
TargetType="{x:Type ListBox}">
<Setter Property="BorderBrush" Value="Transparent" />
<Setter Property="Background" Value="{DynamicResource Color01B}" />
<Setter Property="Padding" Value="0 0 0 0" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ListBox">
<ui:ScrollViewerEx
x:Name="ScrollViewer"
AutoHideScrollBars="{TemplateBinding ui:ScrollViewerHelper.AutoHideScrollBars}"
Focusable="false"
HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
IsDeferredScrollingEnabled="{TemplateBinding ScrollViewer.IsDeferredScrollingEnabled}"
KeyboardNavigation.TabNavigation="{TemplateBinding KeyboardNavigation.TabNavigation}"
VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}">
<ItemsPresenter Margin="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</ui:ScrollViewerEx>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<DataTrigger Binding="{Binding RelativeSource={x:Static RelativeSource.Self}, Path=Items.Count}" Value="0">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate>
<Grid Margin="20 0 0 0">
<StackPanel>
<TextBlock
Margin="0 20 0 4"
FontWeight="Bold"
Text="{DynamicResource searchplugin_Noresult_Title}" />
<TextBlock Text="{DynamicResource searchplugin_Noresult_Subtitle}" />
</StackPanel>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</DataTrigger>
</Style.Triggers>
</Style>
<!--#region PluginStore Style-->
<Style x:Key="StoreList" TargetType="ListViewItem">
<Style
x:Key="StoreList"
BasedOn="{StaticResource DefaultListBoxItemStyle}"
TargetType="ListBoxItem">
<Setter Property="Padding" Value="0 0 0 0" />
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
<Setter Property="HorizontalAlignment" Value="Stretch" />
<Setter Property="UseLayoutRounding" Value="True" />
<Setter Property="Margin" Value="0 0 8 8" />
<Setter Property="VerticalContentAlignment" Value="Stretch" />
<!--#region Template for blue highlight win10-->
@ -357,99 +288,49 @@
</Setter>
<!--#endregion-->
</Style>
<Style
x:Key="PluginListStyle"
BasedOn="{StaticResource {x:Type ListBox}}"
TargetType="ListBox">
<Style.Triggers>
<DataTrigger Binding="{Binding RelativeSource={x:Static RelativeSource.Self}, Path=Items.Count}" Value="0">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate>
<Grid Margin="20 0 0 0">
<StackPanel>
<TextBlock
Margin="0 20 0 4"
FontWeight="Bold"
Text="{DynamicResource searchplugin_Noresult_Title}" />
<TextBlock Text="{DynamicResource searchplugin_Noresult_Subtitle}" />
</StackPanel>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</DataTrigger>
</Style.Triggers>
</Style>
<Style
x:Key="StoreListStyle"
BasedOn="{StaticResource {x:Type ListBox}}"
TargetType="ListBox">
<Setter Property="Background" Value="{DynamicResource Color01B}" />
<Style.Triggers>
<DataTrigger Binding="{Binding RelativeSource={x:Static RelativeSource.Self}, Path=Items.Count}" Value="0">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate>
<Grid Margin="20 0 0 0">
<StackPanel>
<TextBlock
Margin="0 20 0 4"
FontWeight="Bold"
Text="{DynamicResource searchplugin_Noresult_Title}" />
<TextBlock Text="{DynamicResource searchplugin_Noresult}" />
</StackPanel>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</DataTrigger>
</Style.Triggers>
</Style>
<!-- For Tab Header responsive Width -->
<Style x:Key="NavTabControl" TargetType="{x:Type TabControl}">
<Setter Property="Padding" Value="0" />
<Setter Property="HorizontalContentAlignment" Value="Left" />
<Setter Property="VerticalContentAlignment" Value="Top" />
<Setter Property="Background" Value="Transparent" />
BasedOn="{StaticResource DefaultListBoxStyle}"
TargetType="{x:Type ListBox}">
<Setter Property="BorderBrush" Value="Transparent" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="FontSize" Value="14" />
<Setter Property="Background" Value="{DynamicResource Color01B}" />
<Setter Property="Padding" Value="0 0 0 0" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TabControl}">
<Grid
x:Name="templateRoot"
ClipToBounds="true"
SnapsToDevicePixels="true">
<Grid.ColumnDefinitions>
<ColumnDefinition
x:Name="ColumnDefinition0"
Width="Auto"
MinWidth="230" />
<ColumnDefinition x:Name="ColumnDefinition1" Width="7.5*" />
</Grid.ColumnDefinitions>
<!-- here is the edit -->
<DockPanel
x:Name="headerPanel"
Grid.Row="0"
Grid.Column="0"
Margin="2 2 2 0"
Panel.ZIndex="1"
Background="Transparent"
IsItemsHost="true"
LastChildFill="False" />
<Border Grid.Column="1">
<ContentPresenter
x:Name="PART_SelectedContentHost"
Grid.Column="1"
ContentSource="SelectedContent" />
</Border>
</Grid>
<ControlTemplate TargetType="ListBox">
<ui:ScrollViewerEx
x:Name="ScrollViewer"
AutoHideScrollBars="{TemplateBinding ui:ScrollViewerHelper.AutoHideScrollBars}"
Focusable="false"
HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
IsDeferredScrollingEnabled="{TemplateBinding ScrollViewer.IsDeferredScrollingEnabled}"
KeyboardNavigation.TabNavigation="{TemplateBinding KeyboardNavigation.TabNavigation}"
VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}">
<ItemsPresenter Margin="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</ui:ScrollViewerEx>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<DataTrigger Binding="{Binding RelativeSource={x:Static RelativeSource.Self}, Path=Items.Count}" Value="0">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate>
<Grid Margin="20 0 0 0">
<StackPanel>
<TextBlock
Margin="0 20 0 4"
FontWeight="Bold"
Foreground="{DynamicResource Color05B}"
Text="{DynamicResource searchplugin_Noresult_Title}" />
<TextBlock Foreground="{DynamicResource Color05B}" Text="{DynamicResource searchplugin_Noresult}" />
</StackPanel>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</DataTrigger>
</Style.Triggers>
</Style>
</ResourceDictionary>
</ResourceDictionary>

View file

@ -25,6 +25,7 @@
SelectionChanged="OnSelectionChanged"
SelectionMode="Single"
Style="{DynamicResource BaseListboxStyle}"
VirtualizingPanel.ScrollUnit="Item"
VirtualizingStackPanel.IsVirtualizing="True"
VirtualizingStackPanel.VirtualizationMode="Standard"
Visibility="{Binding Visibility}"

View file

@ -5,7 +5,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Flow.Launcher"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="http://schemas.modernwpf.com/2019"
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
xmlns:vm="clr-namespace:Flow.Launcher.ViewModel"
Title="{DynamicResource defaultBrowserTitle}"
Width="550"

View file

@ -5,7 +5,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Flow.Launcher"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="http://schemas.modernwpf.com/2019"
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
xmlns:vm="clr-namespace:Flow.Launcher.ViewModel"
Title="{DynamicResource fileManagerWindow}"
Width="600"
@ -75,9 +75,9 @@
<TextBlock Text="{DynamicResource fileManager_tips2}" TextWrapping="WrapWithOverflow" />
</TextBlock>
<TextBlock Margin="0 14 0 0" VerticalAlignment="Center">
<Hyperlink NavigateUri="https://www.flowlauncher.com/docs/#/filemanager" RequestNavigate="Hyperlink_RequestNavigate">
<ui:HyperlinkButton NavigateUri="https://www.flowlauncher.com/docs/#/filemanager">
<TextBlock FontSize="14" Text="{DynamicResource fileManager_learnMore}" />
</Hyperlink>
</ui:HyperlinkButton>
</TextBlock>
</StackPanel>
<Rectangle

View file

@ -31,12 +31,6 @@ namespace Flow.Launcher
}
}
private void Hyperlink_RequestNavigate(object sender, RequestNavigateEventArgs e)
{
App.API.OpenUrl(e.Uri.AbsoluteUri);
e.Handled = true;
}
private void btnBrowseFile_Click(object sender, RoutedEventArgs e)
{
var selectedFilePath = Win32Helper.SelectFile();

View file

@ -324,4 +324,10 @@ public partial class SettingsPaneAboutViewModel : BaseModel
var releaseNotesWindow = new ReleaseNotesWindow();
releaseNotesWindow.Show();
}
[RelayCommand]
private void OpenSponsorPage()
{
App.API.OpenUrl(SponsorPage);
}
}

View file

@ -8,7 +8,7 @@ using Flow.Launcher.Core.Plugin;
using Flow.Launcher.Infrastructure.UserSettings;
using Flow.Launcher.Plugin;
using Flow.Launcher.ViewModel;
using ModernWpf.Controls;
using iNKORE.UI.WPF.Modern.Controls;
#nullable enable

View file

@ -14,8 +14,7 @@ using Flow.Launcher.Infrastructure.UserSettings;
using Flow.Launcher.Plugin;
using Flow.Launcher.Plugin.SharedModels;
using Flow.Launcher.ViewModel;
using ModernWpf;
using ThemeManagerForColorSchemeSwitch = ModernWpf.ThemeManager;
using iNKORE.UI.WPF.Modern;
namespace Flow.Launcher.SettingPages.ViewModels;
@ -41,7 +40,11 @@ public partial class SettingsPaneThemeViewModel : BaseModel
set
{
_selectedTheme = value;
App.API.SetCurrentTheme(value);
if (!App.API.SetCurrentTheme(value))
{
// Revert selection if failed to set theme
OnPropertyChanged();
}
// Update UI state
OnPropertyChanged(nameof(BackdropType));
@ -127,12 +130,12 @@ public partial class SettingsPaneThemeViewModel : BaseModel
get => Settings.ColorScheme;
set
{
ThemeManagerForColorSchemeSwitch.Current.ApplicationTheme = value switch
ThemeManager.Current.ApplicationTheme = value switch
{
Constant.Light => ApplicationTheme.Light,
Constant.Dark => ApplicationTheme.Dark,
Constant.System => null,
_ => ThemeManagerForColorSchemeSwitch.Current.ApplicationTheme
_ => ThemeManager.Current.ApplicationTheme
};
Settings.ColorScheme = value;
_ = _theme.RefreshFrameAsync();

View file

@ -4,9 +4,10 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:cc="clr-namespace:Flow.Launcher.Resources.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:ikw="http://schemas.inkore.net/lib/ui/wpf"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:settingsVm="clr-namespace:Flow.Launcher.SettingPages.ViewModels"
xmlns:ui="http://schemas.modernwpf.com/2019"
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
Title="About"
d:DataContext="{d:DesignInstance Type=settingsVm:SettingsPaneAboutViewModel}"
d:DesignHeight="450"
@ -17,9 +18,7 @@
<CollectionViewSource x:Key="SortedFonts" Source="{Binding Source={x:Static Fonts.SystemFontFamilies}}" />
</ResourceDictionary>
</ui:Page.Resources>
<ScrollViewer
Margin="0"
CanContentScroll="True"
<ui:ScrollViewerEx
FontSize="14"
VirtualizingStackPanel.IsVirtualizing="True"
VirtualizingStackPanel.ScrollUnit="Pixel">
@ -31,80 +30,80 @@
Text="{DynamicResource about}"
TextAlignment="left" />
<cc:Card
Title="{Binding Version}"
Icon="&#xe946;"
Sub="{DynamicResource version}">
<StackPanel Orientation="Horizontal">
<ui:SettingsCard Description="{DynamicResource version}" Header="{Binding Version}">
<ui:SettingsCard.HeaderIcon>
<ui:FontIcon Glyph="&#xe946;" />
</ui:SettingsCard.HeaderIcon>
<ikw:SimpleStackPanel Orientation="Horizontal" Spacing="12">
<Button
Margin="0 0 10 0"
x:Name="UpdateAppButton"
Command="{Binding UpdateAppCommand}"
Content="{DynamicResource checkUpdates}" />
<Button Padding="0" Style="{StaticResource AccentButtonStyle}">
<Hyperlink
NavigateUri="{Binding SponsorPage}"
RequestNavigate="OnRequestNavigate"
TextDecorations="None">
<TextBlock
Padding="10 5"
Foreground="{StaticResource SystemControlForegroundAltHighBrush}"
Text="{DynamicResource BecomeASponsor}" />
</Hyperlink>
</Button>
</StackPanel>
</cc:Card>
<cc:Card Title="{DynamicResource releaseNotes}" Icon="&#xe8fd;">
<Button Command="{Binding OpenReleaseNotesCommand}" Content="{DynamicResource releaseNotes}" />
</cc:Card>
<cc:Card
Title="{DynamicResource userdatapath}"
Margin="0 14 0 0"
Icon="&#xEC25;;"
Sub="{DynamicResource userdatapathToolTip}">
<StackPanel Orientation="Horizontal">
<Button Command="{Binding OpenParentOfSettingsFolderCommand}" Content="{DynamicResource userdatapathButton}" />
</StackPanel>
</cc:Card>
<cc:Card
Title="{DynamicResource website}"
Margin="0 14 0 0"
Icon="&#xeb41;">
<StackPanel Orientation="Horizontal">
<cc:HyperLink
Margin="0 0 12 0"
Text="{DynamicResource website}"
Uri="{Binding Website}" />
<cc:HyperLink
Margin="0 0 12 0"
Text="{DynamicResource documentation}"
Uri="{Binding Documentation}" />
<cc:HyperLink Text="{DynamicResource github}" Uri="{Binding Github}" />
</StackPanel>
</cc:Card>
<cc:Card Title="{DynamicResource icons}" Icon="&#xE8FE;">
<cc:HyperLink Text="icons8.com" Uri="https://icons8.com/" />
</cc:Card>
<cc:Card
Title="{DynamicResource devtool}"
Margin="0 12 0 0"
Icon="&#xf12b;">
<StackPanel Orientation="Horizontal">
<Button
Margin="0 0 12 0"
Height="{Binding ElementName=UpdateAppButton, Path=ActualHeight}"
Command="{Binding OpenSponsorPageCommand}"
Content="{DynamicResource BecomeASponsor}"
Cursor="Hand"
Style="{StaticResource AccentButtonStyle}" />
</ikw:SimpleStackPanel>
</ui:SettingsCard>
<ui:SettingsCard Margin="0 4 0 0" Header="{DynamicResource releaseNotes}">
<ui:SettingsCard.HeaderIcon>
<ui:FontIcon Glyph="&#xe8fd;" />
</ui:SettingsCard.HeaderIcon>
<Button Command="{Binding OpenReleaseNotesCommand}" Content="{DynamicResource releaseNotes}" />
</ui:SettingsCard>
<ui:SettingsCard
Margin="0 14 0 0"
Description="{DynamicResource userdatapathToolTip}"
Header="{DynamicResource userdatapath}">
<ui:SettingsCard.HeaderIcon>
<ui:FontIcon Glyph="&#xEC25;" />
</ui:SettingsCard.HeaderIcon>
<Button Command="{Binding OpenParentOfSettingsFolderCommand}" Content="{DynamicResource userdatapathButton}" />
</ui:SettingsCard>
<ui:SettingsCard Margin="0 14 0 0" Header="{DynamicResource website}">
<ui:SettingsCard.HeaderIcon>
<ui:FontIcon Glyph="&#xeb41;" />
</ui:SettingsCard.HeaderIcon>
<StackPanel Orientation="Horizontal">
<ui:HyperlinkButton Content="{DynamicResource website}" NavigateUri="{Binding Website}" />
<ui:HyperlinkButton Content="{DynamicResource documentation}" NavigateUri="{Binding Documentation}" />
<ui:HyperlinkButton Content="{DynamicResource github}" NavigateUri="{Binding Github}" />
</StackPanel>
</ui:SettingsCard>
<ui:SettingsCard Margin="0 4 0 0" Header="{DynamicResource icons}">
<ui:SettingsCard.HeaderIcon>
<ui:FontIcon Glyph="&#xE8FE;" />
</ui:SettingsCard.HeaderIcon>
<ui:HyperlinkButton Content="icons8.com" NavigateUri="https://icons8.com/" />
</ui:SettingsCard>
<ui:SettingsCard Margin="0 14 0 0" Header="{DynamicResource devtool}">
<ui:SettingsCard.HeaderIcon>
<ui:FontIcon Glyph="&#xf12b;" />
</ui:SettingsCard.HeaderIcon>
<ikw:SimpleStackPanel Orientation="Horizontal" Spacing="12">
<Button
x:Name="AskClearCacheFolderConfirmationButton"
Command="{Binding AskClearCacheFolderConfirmationCommand}"
Content="{Binding CacheFolderSize, Mode=OneWay}" />
<Button
Margin="0 0 12 0"
Height="{Binding ElementName=AskClearCacheFolderConfirmationButton, Path=ActualHeight}"
Command="{Binding AskClearLogFolderConfirmationCommand}"
Content="{Binding LogFolderSize, Mode=OneWay}" />
<Button>
<ui:FontIcon FontSize="20" Glyph="&#xec7a;" />
<Button Height="{Binding ElementName=AskClearCacheFolderConfirmationButton, Path=ActualHeight}">
<ui:FontIcon FontSize="16" Glyph="&#xec7a;" />
<ui:FlyoutService.Flyout>
<ui:MenuFlyout>
<MenuItem Command="{Binding OpenWelcomeWindowCommand}" Header="{DynamicResource welcomewindow}">
@ -133,28 +132,31 @@
</ui:MenuFlyout>
</ui:FlyoutService.Flyout>
</Button>
</StackPanel>
</cc:Card>
</ikw:SimpleStackPanel>
</ui:SettingsCard>
<ui:SettingsExpander Margin="0 4 0 0" Header="{DynamicResource advanced}">
<ui:SettingsExpander.HeaderIcon>
<ui:FontIcon Glyph="&#xE8B7;" />
</ui:SettingsExpander.HeaderIcon>
<ui:SettingsExpander.Items>
<ui:SettingsCard Header="{DynamicResource logLevel}">
<ui:SettingsCard.HeaderIcon>
<ui:FontIcon Glyph="&#xE749;" />
</ui:SettingsCard.HeaderIcon>
<cc:ExCard
Title="{DynamicResource advanced}"
Margin="0 14 0 0"
Icon="&#xE8B7;">
<StackPanel>
<cc:Card
Title="{DynamicResource logLevel}"
Icon="&#xE749;"
Type="Inside">
<ComboBox
DisplayMemberPath="Display"
ItemsSource="{Binding LogLevels}"
SelectedValue="{Binding LogLevel}"
SelectedValuePath="Value" />
</cc:Card>
<cc:Card
Title="{DynamicResource settingWindowFontTitle}"
Icon="&#xf259;"
Type="Inside">
</ui:SettingsCard>
<ui:SettingsCard Header="{DynamicResource settingWindowFontTitle}">
<ui:SettingsCard.HeaderIcon>
<ui:FontIcon Glyph="&#xf259;" />
</ui:SettingsCard.HeaderIcon>
<StackPanel Orientation="Horizontal">
<Button Command="{Binding ResetSettingWindowFontCommand}" Content="{DynamicResource commonReset}" />
<ComboBox
@ -166,9 +168,9 @@
SelectedValue="{Binding SettingWindowFont, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
SelectedValuePath="Source" />
</StackPanel>
</cc:Card>
</StackPanel>
</cc:ExCard>
</ui:SettingsCard>
</ui:SettingsExpander.Items>
</ui:SettingsExpander>
<TextBlock
Margin="14 20 0 0"
@ -180,5 +182,5 @@
Text="{Binding ActivatedTimes}"
TextWrapping="WrapWithOverflow" />
</StackPanel>
</ScrollViewer>
</ui:ScrollViewerEx>
</ui:Page>

View file

@ -28,10 +28,4 @@ public partial class SettingsPaneAbout
}
base.OnNavigatedTo(e);
}
private void OnRequestNavigate(object sender, RequestNavigateEventArgs e)
{
App.API.OpenUrl(e.Uri.AbsoluteUri);
e.Handled = true;
}
}

View file

@ -6,9 +6,10 @@
xmlns:converters="clr-namespace:Flow.Launcher.Converters"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:ext="clr-namespace:Flow.Launcher.Resources.MarkupExtensions"
xmlns:ikw="http://schemas.inkore.net/lib/ui/wpf"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:settingsViewModels="clr-namespace:Flow.Launcher.SettingPages.ViewModels"
xmlns:ui="http://schemas.modernwpf.com/2019"
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
xmlns:userSettings="clr-namespace:Flow.Launcher.Infrastructure.UserSettings;assembly=Flow.Launcher.Infrastructure"
Title="General"
d:DataContext="{d:DesignInstance settingsViewModels:SettingsPaneGeneralViewModel}"
@ -18,9 +19,7 @@
<ui:Page.Resources>
<converters:BoolToVisibilityConverter x:Key="BoolToVisibilityConverter" />
</ui:Page.Resources>
<ScrollViewer
Margin="0"
CanContentScroll="False"
<ui:ScrollViewerEx
FontSize="14"
VirtualizingPanel.ScrollUnit="Pixel"
VirtualizingStackPanel.IsVirtualizing="True">
@ -33,272 +32,293 @@
Text="{DynamicResource general}"
TextAlignment="left" />
<cc:ExCard
Title="{DynamicResource startFlowLauncherOnSystemStartup}"
Margin="0 8 0 0"
Icon="&#xe8fc;">
<cc:ExCard.SideContent>
<ui:ToggleSwitch
IsOn="{Binding StartFlowLauncherOnSystemStartup}"
OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}" />
</cc:ExCard.SideContent>
<cc:Card
Title="{DynamicResource useLogonTaskForStartup}"
Sub="{DynamicResource useLogonTaskForStartupTooltip}"
Type="InsideFit">
<ui:ToggleSwitch
IsOn="{Binding UseLogonTaskForStartup}"
OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}" />
</cc:Card>
</cc:ExCard>
<cc:Card
Title="{DynamicResource hideOnStartup}"
Icon="&#xed1a;"
Sub="{DynamicResource hideOnStartupToolTip}">
<ui:SettingsExpander Margin="0 8 0 0" Header="{DynamicResource startFlowLauncherOnSystemStartup}">
<ui:SettingsExpander.HeaderIcon>
<ui:FontIcon Glyph="&#xe8fc;" />
</ui:SettingsExpander.HeaderIcon>
<ui:ToggleSwitch
IsOn="{Binding StartFlowLauncherOnSystemStartup}"
OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}" />
<ui:SettingsExpander.Items>
<ui:SettingsCard Description="{DynamicResource useLogonTaskForStartupTooltip}" Header="{DynamicResource useLogonTaskForStartup}">
<ui:ToggleSwitch
IsOn="{Binding UseLogonTaskForStartup}"
OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}" />
</ui:SettingsCard>
</ui:SettingsExpander.Items>
</ui:SettingsExpander>
<ui:SettingsCard
Margin="0 4 0 0"
Description="{DynamicResource hideOnStartupToolTip}"
Header="{DynamicResource hideOnStartup}">
<ui:SettingsCard.HeaderIcon>
<ui:FontIcon Glyph="&#xed1a;" />
</ui:SettingsCard.HeaderIcon>
<ui:ToggleSwitch
IsOn="{Binding Settings.HideOnStartup}"
OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}" />
</cc:Card>
</ui:SettingsCard>
<cc:Card Title="{DynamicResource hideFlowLauncherWhenLoseFocus}" Margin="0 14 0 0">
<ui:SettingsCard Margin="0 12 0 0" Header="{DynamicResource hideFlowLauncherWhenLoseFocus}">
<ui:ToggleSwitch
IsOn="{Binding Settings.HideWhenDeactivated}"
OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}" />
</cc:Card>
</ui:SettingsCard>
<cc:Card Title="{DynamicResource hideNotifyIcon}" Sub="{DynamicResource hideNotifyIconToolTip}">
<ui:SettingsCard
Margin="0 4 0 0"
Description="{DynamicResource hideNotifyIconToolTip}"
Header="{DynamicResource hideNotifyIcon}">
<ui:ToggleSwitch
IsOn="{Binding Settings.HideNotifyIcon}"
OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}" />
</cc:Card>
</ui:SettingsCard>
<cc:Card
Title="{DynamicResource showAtTopmost}"
<ui:SettingsCard
Margin="0 14 0 0"
Icon="&#xf5ed;"
Sub="{DynamicResource showAtTopmostToolTip}">
Description="{DynamicResource showAtTopmostToolTip}"
Header="{DynamicResource showAtTopmost}">
<ui:SettingsCard.HeaderIcon>
<ui:FontIcon Glyph="&#xf5ed;" />
</ui:SettingsCard.HeaderIcon>
<ui:ToggleSwitch
IsOn="{Binding Settings.ShowAtTopmost}"
OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}" />
</cc:Card>
</ui:SettingsCard>
<cc:CardGroup Margin="0 4 0 0">
<cc:Card
Title="{DynamicResource SearchWindowPosition}"
Icon="&#xe7f4;"
Type="First">
<StackPanel Orientation="Horizontal">
<ComboBox
MinWidth="220"
<ui:SettingsCard Margin="0 4 0 0" Header="{DynamicResource SearchWindowPosition}">
<ui:SettingsCard.HeaderIcon>
<ui:FontIcon Glyph="&#xe7f4;" />
</ui:SettingsCard.HeaderIcon>
<StackPanel Orientation="Horizontal">
<ComboBox
MinWidth="220"
VerticalAlignment="Center"
DisplayMemberPath="Display"
FontSize="14"
ItemsSource="{Binding SearchWindowScreens}"
SelectedValue="{Binding Settings.SearchWindowScreen}"
SelectedValuePath="Value" />
<ComboBox
MinWidth="160"
Margin="18 0 0 0"
VerticalAlignment="Center"
FontSize="14"
ItemsSource="{Binding ScreenNumbers}"
SelectedValue="{Binding Settings.CustomScreenNumber}"
Visibility="{ext:VisibleWhen {Binding Settings.SearchWindowScreen},
IsEqualTo={x:Static userSettings:SearchWindowScreens.Custom}}" />
</StackPanel>
</ui:SettingsCard>
<ui:SettingsCard
Margin="0 4 0 0"
Header="{DynamicResource SearchWindowAlign}"
Visibility="{ext:CollapsedWhen {Binding Settings.SearchWindowScreen},
IsEqualTo={x:Static userSettings:SearchWindowScreens.RememberLastLaunchLocation}}">
<ui:SettingsCard.HeaderIcon>
<ui:FontIcon Glyph="&#xe7f4;" />
</ui:SettingsCard.HeaderIcon>
<StackPanel Orientation="Horizontal">
<ComboBox
MinWidth="160"
VerticalAlignment="Center"
DisplayMemberPath="Display"
FontSize="14"
ItemsSource="{Binding SearchWindowAligns}"
SelectedValue="{Binding Settings.SearchWindowAlign}"
SelectedValuePath="Value" />
<StackPanel
Margin="18 0 0 0"
VerticalAlignment="Center"
Orientation="Horizontal"
Visibility="{ext:VisibleWhen {Binding Settings.SearchWindowAlign},
IsEqualTo={x:Static userSettings:SearchWindowAligns.Custom}}">
<TextBox
MinWidth="80"
VerticalAlignment="Center"
DisplayMemberPath="Display"
FontSize="14"
ItemsSource="{Binding SearchWindowScreens}"
SelectedValue="{Binding Settings.SearchWindowScreen}"
SelectedValuePath="Value" />
<ComboBox
MinWidth="160"
Margin="18 0 0 0"
Text="{Binding Settings.CustomWindowLeft}" />
<TextBlock
Margin="10"
VerticalAlignment="Center"
FontSize="14"
ItemsSource="{Binding ScreenNumbers}"
SelectedValue="{Binding Settings.CustomScreenNumber}"
Visibility="{ext:VisibleWhen {Binding Settings.SearchWindowScreen},
IsEqualTo={x:Static userSettings:SearchWindowScreens.Custom}}" />
Text="x" />
<TextBox
MinWidth="80"
VerticalAlignment="Center"
Text="{Binding Settings.CustomWindowTop}"
TextWrapping="NoWrap" />
</StackPanel>
</cc:Card>
</StackPanel>
</ui:SettingsCard>
<cc:Card
Title="{DynamicResource SearchWindowAlign}"
Icon="&#xe7f4;"
Type="Last"
Visibility="{ext:CollapsedWhen {Binding Settings.SearchWindowScreen},
IsEqualTo={x:Static userSettings:SearchWindowScreens.RememberLastLaunchLocation}}">
<StackPanel Orientation="Horizontal">
<ComboBox
MinWidth="160"
VerticalAlignment="Center"
DisplayMemberPath="Display"
FontSize="14"
ItemsSource="{Binding SearchWindowAligns}"
SelectedValue="{Binding Settings.SearchWindowAlign}"
SelectedValuePath="Value" />
<StackPanel
Margin="18 0 0 0"
VerticalAlignment="Center"
Orientation="Horizontal"
Visibility="{ext:VisibleWhen {Binding Settings.SearchWindowAlign},
IsEqualTo={x:Static userSettings:SearchWindowAligns.Custom}}">
<TextBox
MinWidth="80"
VerticalAlignment="Center"
Text="{Binding Settings.CustomWindowLeft}" />
<TextBlock
Margin="10"
VerticalAlignment="Center"
Text="x" />
<TextBox
MinWidth="80"
VerticalAlignment="Center"
Text="{Binding Settings.CustomWindowTop}"
TextWrapping="NoWrap" />
</StackPanel>
</StackPanel>
</cc:Card>
</cc:CardGroup>
<cc:Card
Title="{DynamicResource ignoreHotkeysOnFullscreen}"
<ui:SettingsCard
Margin="0 14 0 0"
Icon="&#xe7fc;"
Sub="{DynamicResource ignoreHotkeysOnFullscreenToolTip}">
Description="{DynamicResource ignoreHotkeysOnFullscreenToolTip}"
Header="{DynamicResource ignoreHotkeysOnFullscreen}">
<ui:SettingsCard.HeaderIcon>
<ui:FontIcon Glyph="&#xe7fc;" />
</ui:SettingsCard.HeaderIcon>
<ui:ToggleSwitch
IsOn="{Binding Settings.IgnoreHotkeysOnFullscreen}"
OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}" />
</cc:Card>
</ui:SettingsCard>
<cc:Card
Title="{DynamicResource AlwaysPreview}"
<ui:SettingsCard
Margin="0 14 0 0"
Icon="&#xe8a1;"
Sub="{Binding AlwaysPreviewToolTip}">
Description="{Binding AlwaysPreviewToolTip}"
Header="{DynamicResource AlwaysPreview}">
<ui:SettingsCard.HeaderIcon>
<ui:FontIcon Glyph="&#xe8a1;" />
</ui:SettingsCard.HeaderIcon>
<ui:ToggleSwitch
IsOn="{Binding Settings.AlwaysPreview}"
OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}"
ToolTip="{Binding AlwaysPreviewToolTip}" />
</cc:Card>
</ui:SettingsCard>
<cc:Card
Title="{DynamicResource autoUpdates}"
<ui:SettingsCard
Margin="0 14 0 0"
Icon="&#xecc5;"
Sub="{DynamicResource autoUpdatesTooltip}">
Description="{DynamicResource autoUpdatesTooltip}"
Header="{DynamicResource autoUpdates}">
<ui:SettingsCard.HeaderIcon>
<ui:FontIcon Glyph="&#xecc5;" />
</ui:SettingsCard.HeaderIcon>
<ui:ToggleSwitch
IsOn="{Binding AutoUpdates}"
OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}" />
</cc:Card>
</ui:SettingsCard>
<ui:SettingsCard
Margin="0 4 0 0"
Description="{DynamicResource portableModeToolTIp}"
Header="{DynamicResource portableMode}">
<ui:SettingsCard.HeaderIcon>
<ui:FontIcon Glyph="&#xe88e;" />
</ui:SettingsCard.HeaderIcon>
<cc:Card
Title="{DynamicResource portableMode}"
Icon="&#xe88e;"
Sub="{DynamicResource portableModeToolTIp}">
<ui:ToggleSwitch
IsOn="{Binding PortableMode}"
OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}" />
</cc:Card>
</ui:SettingsCard>
<cc:CardGroup Margin="0 14 0 0">
<cc:Card
Title="{DynamicResource querySearchPrecision}"
Sub="{DynamicResource querySearchPrecisionToolTip}"
Type="First">
<ComboBox
MaxWidth="200"
DisplayMemberPath="Display"
ItemsSource="{Binding SearchPrecisionScores}"
SelectedValue="{Binding Settings.QuerySearchPrecision}"
SelectedValuePath="Value" />
</cc:Card>
<cc:Card
Title="{DynamicResource lastQueryMode}"
Sub="{DynamicResource lastQueryModeToolTip}"
Type="Last">
<ComboBox
MinWidth="210"
DisplayMemberPath="Display"
ItemsSource="{Binding LastQueryModes}"
SelectedValue="{Binding Settings.LastQueryMode}"
SelectedValuePath="Value" />
</cc:Card>
</cc:CardGroup>
<cc:CardGroup Margin="0 14 0 0">
<cc:Card
Title="{DynamicResource autoRestartAfterChanging}"
Icon="&#xF83E;"
Sub="{DynamicResource autoRestartAfterChangingToolTip}"
Type="First">
<ui:ToggleSwitch
IsOn="{Binding Settings.AutoRestartAfterChanging}"
OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}" />
</cc:Card>
<cc:Card
Title="{DynamicResource showUnknownSourceWarning}"
Icon="&#xE7BA;"
Sub="{DynamicResource showUnknownSourceWarningToolTip}"
Type="Middle">
<ui:ToggleSwitch
IsOn="{Binding Settings.ShowUnknownSourceWarning}"
OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}" />
</cc:Card>
<cc:Card
Title="{DynamicResource autoUpdatePlugins}"
Icon="&#xecc5;"
Sub="{DynamicResource autoUpdatePluginsToolTip}"
Type="Last">
<ui:ToggleSwitch
IsOn="{Binding Settings.AutoUpdatePlugins}"
OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}" />
</cc:Card>
</cc:CardGroup>
<cc:ExCard
Title="{DynamicResource dialogJump}"
<ui:SettingsCard
Margin="0 14 0 0"
Icon="&#xE8AB;"
Sub="{DynamicResource dialogJumpToolTip}">
<cc:ExCard.SideContent>
<ui:ToggleSwitch
IsOn="{Binding EnableDialogJump}"
OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}" />
</cc:ExCard.SideContent>
Description="{DynamicResource querySearchPrecisionToolTip}"
Header="{DynamicResource querySearchPrecision}">
<StackPanel>
<cc:Card
Title="{DynamicResource autoDialogJump}"
Sub="{DynamicResource autoDialogJumpToolTip}"
Type="InsideFit"
<ComboBox
MaxWidth="200"
DisplayMemberPath="Display"
ItemsSource="{Binding SearchPrecisionScores}"
SelectedValue="{Binding Settings.QuerySearchPrecision}"
SelectedValuePath="Value" />
</ui:SettingsCard>
<ui:SettingsCard
Margin="0 4 0 0"
Description="{DynamicResource lastQueryModeToolTip}"
Header="{DynamicResource lastQueryMode}">
<ComboBox
MinWidth="210"
DisplayMemberPath="Display"
ItemsSource="{Binding LastQueryModes}"
SelectedValue="{Binding Settings.LastQueryMode}"
SelectedValuePath="Value" />
</ui:SettingsCard>
<ui:SettingsCard
Margin="0 14 0 0"
Description="{DynamicResource autoRestartAfterChangingToolTip}"
Header="{DynamicResource autoRestartAfterChanging}">
<ui:SettingsCard.HeaderIcon>
<ui:FontIcon Glyph="&#xF83E;" />
</ui:SettingsCard.HeaderIcon>
<ui:ToggleSwitch
IsOn="{Binding Settings.AutoRestartAfterChanging}"
OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}" />
</ui:SettingsCard>
<ui:SettingsCard
Margin="0 4 0 0"
Description="{DynamicResource showUnknownSourceWarningToolTip}"
Header="{DynamicResource showUnknownSourceWarning}">
<ui:SettingsCard.HeaderIcon>
<ui:FontIcon Glyph="&#xE7BA;" />
</ui:SettingsCard.HeaderIcon>
<ui:ToggleSwitch
IsOn="{Binding Settings.ShowUnknownSourceWarning}"
OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}" />
</ui:SettingsCard>
<ui:SettingsCard
Margin="0 4 0 0"
Description="{DynamicResource autoUpdatePluginsToolTip}"
Header="{DynamicResource autoUpdatePlugins}">
<ui:SettingsCard.HeaderIcon>
<ui:FontIcon Glyph="&#xecc5;" />
</ui:SettingsCard.HeaderIcon>
<ui:ToggleSwitch
IsOn="{Binding Settings.AutoUpdatePlugins}"
OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}" />
</ui:SettingsCard>
<ui:SettingsExpander
Margin="0 14 0 0"
Description="{DynamicResource dialogJumpToolTip}"
Header="{DynamicResource dialogJump}">
<ui:SettingsExpander.HeaderIcon>
<ui:FontIcon Glyph="&#xE8AB;" />
</ui:SettingsExpander.HeaderIcon>
<ui:ToggleSwitch
IsOn="{Binding EnableDialogJump}"
OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}" />
<ui:SettingsExpander.Items>
<ui:SettingsCard
Description="{DynamicResource autoDialogJumpToolTip}"
Header="{DynamicResource autoDialogJump}"
Visibility="Collapsed">
<ui:ToggleSwitch
IsOn="{Binding Settings.AutoDialogJump}"
OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}" />
</cc:Card>
</ui:SettingsCard>
<cc:Card
Title="{DynamicResource showDialogJumpWindow}"
Sub="{DynamicResource showDialogJumpWindowToolTip}"
Type="InsideFit">
<ui:SettingsCard Description="{DynamicResource showDialogJumpWindowToolTip}" Header="{DynamicResource showDialogJumpWindow}">
<ui:ToggleSwitch
IsOn="{Binding Settings.ShowDialogJumpWindow}"
OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}" />
</cc:Card>
</ui:SettingsCard>
<cc:Card
Title="{DynamicResource dialogJumpWindowPosition}"
Sub="{DynamicResource dialogJumpWindowPositionToolTip}"
Type="InsideFit">
<ui:SettingsCard Description="{DynamicResource dialogJumpWindowPositionToolTip}" Header="{DynamicResource dialogJumpWindowPosition}">
<ComboBox
MinWidth="120"
MaxWidth="210"
@ -306,24 +326,18 @@
ItemsSource="{Binding DialogJumpWindowPositions}"
SelectedValue="{Binding Settings.DialogJumpWindowPosition}"
SelectedValuePath="Value" />
</cc:Card>
</ui:SettingsCard>
<cc:Card
Title="{DynamicResource dialogJumpResultBehaviour}"
Sub="{DynamicResource dialogJumpResultBehaviourToolTip}"
Type="InsideFit">
<ui:SettingsCard Description="{DynamicResource dialogJumpResultBehaviourToolTip}" Header="{DynamicResource dialogJumpResultBehaviour}">
<ComboBox
MinWidth="120"
DisplayMemberPath="Display"
ItemsSource="{Binding DialogJumpResultBehaviours}"
SelectedValue="{Binding Settings.DialogJumpResultBehaviour}"
SelectedValuePath="Value" />
</cc:Card>
</ui:SettingsCard>
<cc:Card
Title="{DynamicResource dialogJumpFileResultBehaviour}"
Sub="{DynamicResource dialogJumpFileResultBehaviourToolTip}"
Type="InsideFit">
<ui:SettingsCard Description="{DynamicResource dialogJumpFileResultBehaviourToolTip}" Header="{DynamicResource dialogJumpFileResultBehaviour}">
<ComboBox
MinWidth="120"
MaxWidth="240"
@ -331,94 +345,112 @@
ItemsSource="{Binding DialogJumpFileResultBehaviours}"
SelectedValue="{Binding Settings.DialogJumpFileResultBehaviour}"
SelectedValuePath="Value" />
</cc:Card>
</StackPanel>
</cc:ExCard>
</ui:SettingsCard>
</ui:SettingsExpander.Items>
</ui:SettingsExpander>
<cc:ExCard
Title="{DynamicResource searchDelay}"
<ui:SettingsExpander
Margin="0 14 0 0"
Icon="&#xE961;"
Sub="{DynamicResource searchDelayToolTip}">
<cc:ExCard.SideContent>
<ui:ToggleSwitch
IsOn="{Binding Settings.SearchQueryResultsWithDelay}"
OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}" />
</cc:ExCard.SideContent>
<cc:Card
Title="{DynamicResource searchDelayTime}"
Sub="{DynamicResource searchDelayTimeToolTip}"
Type="InsideFit">
<ui:NumberBox
Width="120"
Margin="0 0 0 0"
Maximum="1000"
Minimum="0"
SmallChange="10"
SpinButtonPlacementMode="Compact"
ValidationMode="InvalidInputOverwritten"
Value="{Binding SearchDelayTimeValue}" />
</cc:Card>
</cc:ExCard>
Description="{DynamicResource searchDelayToolTip}"
Header="{DynamicResource searchDelay}">
<ui:SettingsExpander.HeaderIcon>
<ui:FontIcon Glyph="&#xE961;" />
</ui:SettingsExpander.HeaderIcon>
<cc:Card
Title="{DynamicResource homePage}"
<ui:ToggleSwitch
IsOn="{Binding Settings.SearchQueryResultsWithDelay}"
OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}" />
<ui:SettingsExpander.Items>
<ui:SettingsCard Description="{DynamicResource searchDelayTimeToolTip}" Header="{DynamicResource searchDelayTime}">
<ui:NumberBox
Width="120"
MinWidth="120"
Margin="0 0 0 0"
Maximum="1000"
Minimum="0"
SmallChange="10"
SpinButtonPlacementMode="Compact"
ValidationMode="InvalidInputOverwritten"
Value="{Binding SearchDelayTimeValue}" />
</ui:SettingsCard>
</ui:SettingsExpander.Items>
</ui:SettingsExpander>
<ui:SettingsCard
Margin="0 14 0 0"
Icon="&#xE80F;"
Sub="{DynamicResource homePageToolTip}">
Description="{DynamicResource homePageToolTip}"
Header="{DynamicResource homePage}">
<ui:SettingsCard.HeaderIcon>
<ui:FontIcon Glyph="&#xE80F;" />
</ui:SettingsCard.HeaderIcon>
<ui:ToggleSwitch
IsOn="{Binding Settings.ShowHomePage}"
OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}" />
</cc:Card>
</ui:SettingsCard>
<cc:ExCard Title="{DynamicResource historyResultsForHomePage}" Icon="&#xE81C;">
<cc:ExCard.SideContent>
<ui:ToggleSwitch
IsOn="{Binding Settings.ShowHistoryResultsForHomePage}"
OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}" />
</cc:ExCard.SideContent>
<cc:Card Title="{DynamicResource historyResultsCountForHomePage}" Type="InsideFit">
<ui:NumberBox
Width="120"
Margin="0 0 0 0"
Maximum="100"
Minimum="0"
SmallChange="5"
SpinButtonPlacementMode="Compact"
ValidationMode="InvalidInputOverwritten"
Value="{Binding MaxHistoryResultsToShowValue}" />
</cc:Card>
</cc:ExCard>
<ui:SettingsExpander Margin="0 4 0 0" Header="{DynamicResource historyResultsForHomePage}">
<ui:SettingsExpander.HeaderIcon>
<ui:FontIcon Glyph="&#xE81C;" />
</ui:SettingsExpander.HeaderIcon>
<cc:Card
Title="{DynamicResource defaultFileManager}"
<ui:ToggleSwitch
IsOn="{Binding Settings.ShowHistoryResultsForHomePage}"
OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}" />
<ui:SettingsExpander.Items>
<ui:SettingsCard Header="{DynamicResource historyResultsCountForHomePage}">
<ui:NumberBox
Width="120"
MinWidth="120"
Margin="0 0 0 0"
Maximum="100"
Minimum="0"
SmallChange="5"
SpinButtonPlacementMode="Compact"
ValidationMode="InvalidInputOverwritten"
Value="{Binding MaxHistoryResultsToShowValue}" />
</ui:SettingsCard>
</ui:SettingsExpander.Items>
</ui:SettingsExpander>
<ui:SettingsCard
Margin="0 14 0 0"
Icon="&#xe838;"
Sub="{DynamicResource defaultFileManagerToolTip}">
Description="{DynamicResource defaultFileManagerToolTip}"
Header="{DynamicResource defaultFileManager}">
<ui:SettingsCard.HeaderIcon>
<ui:FontIcon Glyph="&#xe838;" />
</ui:SettingsCard.HeaderIcon>
<Button
Width="160"
MaxWidth="250"
Margin="10 0 0 0"
Command="{Binding SelectFileManagerCommand}"
Content="{Binding Settings.CustomExplorer.DisplayName}" />
</cc:Card>
</ui:SettingsCard>
<ui:SettingsCard
Margin="0 4 0 0"
Description="{DynamicResource defaultBrowserToolTip}"
Header="{DynamicResource defaultBrowser}">
<ui:SettingsCard.HeaderIcon>
<ui:FontIcon Glyph="&#xf6fa;" />
</ui:SettingsCard.HeaderIcon>
<cc:Card
Title="{DynamicResource defaultBrowser}"
Icon="&#xf6fa;"
Sub="{DynamicResource defaultBrowserToolTip}">
<Button
Width="160"
MaxWidth="250"
Margin="10 0 0 0"
Command="{Binding SelectBrowserCommand}"
Content="{Binding Settings.CustomBrowser.DisplayName}" />
</cc:Card>
</ui:SettingsCard>
<cc:Card Title="{DynamicResource pythonFilePath}" Margin="0 14 0 0">
<ui:SettingsCard Margin="0 14 0 0" Header="{DynamicResource pythonFilePath}">
<StackPanel Orientation="Horizontal">
<TextBox
Width="300"
@ -430,9 +462,9 @@
Command="{Binding SelectPythonCommand}"
Content="{DynamicResource select}" />
</StackPanel>
</cc:Card>
</ui:SettingsCard>
<cc:Card Title="{DynamicResource nodeFilePath}">
<ui:SettingsCard Margin="0 4 0 0" Header="{DynamicResource nodeFilePath}">
<StackPanel Orientation="Horizontal">
<TextBox
Width="300"
@ -444,57 +476,69 @@
Command="{Binding SelectNodeCommand}"
Content="{DynamicResource select}" />
</StackPanel>
</cc:Card>
</ui:SettingsCard>
<cc:Card
Title="{DynamicResource typingStartEn}"
<ui:SettingsCard
Margin="0 14 0 0"
Icon="&#xe8d3;"
Sub="{DynamicResource typingStartEnTooltip}">
Description="{DynamicResource typingStartEnTooltip}"
Header="{DynamicResource typingStartEn}">
<ui:SettingsCard.HeaderIcon>
<ui:FontIcon Glyph="&#xe8d3;" />
</ui:SettingsCard.HeaderIcon>
<ui:ToggleSwitch
IsOn="{Binding Settings.AlwaysStartEn}"
OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}" />
</cc:Card>
</ui:SettingsCard>
<ui:SettingsCard
Margin="0 14 0 0"
Description="{DynamicResource ShouldUsePinyinToolTip}"
Header="{DynamicResource ShouldUsePinyin}">
<ui:SettingsCard.HeaderIcon>
<ui:FontIcon Glyph="&#xe98a;" />
</ui:SettingsCard.HeaderIcon>
<cc:Card
Title="{DynamicResource ShouldUsePinyin}"
Margin="0 4 0 0"
Icon="&#xe98a;"
Sub="{DynamicResource ShouldUsePinyinToolTip}">
<ui:ToggleSwitch
IsOn="{Binding ShouldUsePinyin}"
OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}"
ToolTip="{DynamicResource ShouldUsePinyinToolTip}" />
</cc:Card>
</ui:SettingsCard>
<cc:ExCard
Title="{DynamicResource ShouldUseDoublePinyin}"
Icon="&#xf085;"
<ui:SettingsExpander
Margin="0 4 0 0"
Description="{DynamicResource ShouldUseDoublePinyinToolTip}"
Header="{DynamicResource ShouldUseDoublePinyin}"
Visibility="{ext:VisibleWhen {Binding ShouldUsePinyin},
IsEqualToBool=True}"
Sub="{DynamicResource ShouldUseDoublePinyinToolTip}">
<cc:ExCard.SideContent>
<ui:ToggleSwitch
IsOn="{Binding UseDoublePinyin}"
OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}"
ToolTip="{DynamicResource ShouldUseDoublePinyinToolTip}" />
</cc:ExCard.SideContent>
<cc:Card Title="{DynamicResource DoublePinyinSchema}" Type="InsideFit">
<ComboBox
DisplayMemberPath="Display"
ItemsSource="{Binding DoublePinyinSchemas}"
SelectedValue="{Binding Settings.DoublePinyinSchema}"
SelectedValuePath="Value" />
</cc:Card>
</cc:ExCard>
IsEqualToBool=True}">
<ui:SettingsExpander.HeaderIcon>
<ui:FontIcon Glyph="&#xf085;" />
</ui:SettingsExpander.HeaderIcon>
<ui:ToggleSwitch
IsOn="{Binding UseDoublePinyin}"
OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}"
ToolTip="{DynamicResource ShouldUseDoublePinyinToolTip}" />
<ui:SettingsExpander.Items>
<ui:SettingsCard Header="{DynamicResource DoublePinyinSchema}">
<ComboBox
DisplayMemberPath="Display"
ItemsSource="{Binding DoublePinyinSchemas}"
SelectedValue="{Binding Settings.DoublePinyinSchema}"
SelectedValuePath="Value" />
</ui:SettingsCard>
</ui:SettingsExpander.Items>
</ui:SettingsExpander>
<ui:SettingsCard Margin="0 14 0 0" Header="{DynamicResource language}">
<ui:SettingsCard.HeaderIcon>
<ui:FontIcon Glyph="&#xf2b7;" />
</ui:SettingsCard.HeaderIcon>
<cc:Card
Title="{DynamicResource language}"
Margin="0 14 0 0"
Icon="&#xf2b7;">
<ComboBox
MaxWidth="200"
Margin="10 0 0 0"
@ -502,37 +546,40 @@
ItemsSource="{Binding Languages}"
SelectedValue="{Binding Language}"
SelectedValuePath="LanguageCode" />
</cc:Card>
</ui:SettingsCard>
<Border Visibility="{Binding KoreanIMERegistryKeyExists, Converter={StaticResource BoolToVisibilityConverter}}">
<cc:InfoBar
<ui:InfoBar
Title="{DynamicResource KoreanImeTitle}"
Margin="0 14 0 0"
Closable="False"
IsClosable="False"
IsIconVisible="True"
Length="Long"
IsOpen="True"
Message="{DynamicResource KoreanImeGuide}"
Type="Warning"
Severity="Warning"
Visibility="{Binding LegacyKoreanIMEEnabled, Converter={StaticResource BoolToVisibilityConverter}, ConverterParameter=Inverted, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}" />
</Border>
<cc:CardGroup Margin="0 14 0 0" Visibility="{Binding KoreanIMERegistryKeyExists, Converter={StaticResource BoolToVisibilityConverter}}">
<cc:Card
Title="{DynamicResource KoreanImeRegistry}"
Icon="&#xe88b;"
Sub="{DynamicResource KoreanImeRegistryTooltip}"
Type="First">
<ikw:SimpleStackPanel Margin="0 14 0 0" Visibility="{Binding KoreanIMERegistryKeyExists, Converter={StaticResource BoolToVisibilityConverter}}">
<ui:SettingsCard Description="{DynamicResource KoreanImeRegistryTooltip}" Header="{DynamicResource KoreanImeRegistry}">
<ui:SettingsCard.HeaderIcon>
<ui:FontIcon Glyph="&#xe88b;" />
</ui:SettingsCard.HeaderIcon>
<ui:ToggleSwitch
IsOn="{Binding LegacyKoreanIMEEnabled}"
OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}" />
</cc:Card>
<cc:Card
Title="{DynamicResource KoreanImeOpenLink}"
Icon="&#xF210;"
Sub="{DynamicResource KoreanImeOpenLinkToolTip}"
Type="Last">
</ui:SettingsCard>
<ui:SettingsCard
Margin="0 4 0 0"
Description="{DynamicResource KoreanImeOpenLinkToolTip}"
Header="{DynamicResource KoreanImeOpenLink}">
<ui:SettingsCard.HeaderIcon>
<ui:FontIcon Glyph="&#xe8d3;" />
</ui:SettingsCard.HeaderIcon>
<Button Command="{Binding OpenImeSettingsCommand}" Content="{DynamicResource KoreanImeOpenLinkButton}" />
</cc:Card>
</cc:CardGroup>
</ui:SettingsCard>
</ikw:SimpleStackPanel>
</VirtualizingStackPanel>
</ScrollViewer>
</ui:ScrollViewerEx>
</ui:Page>

View file

@ -5,8 +5,9 @@
xmlns:cc="clr-namespace:Flow.Launcher.Resources.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:flowlauncher="clr-namespace:Flow.Launcher"
xmlns:ikw="http://schemas.inkore.net/lib/ui/wpf"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="http://schemas.modernwpf.com/2019"
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
xmlns:userSettings="clr-namespace:Flow.Launcher.Infrastructure.UserSettings;assembly=Flow.Launcher.Infrastructure"
xmlns:viewModels="clr-namespace:Flow.Launcher.SettingPages.ViewModels"
Title="Hotkey"
@ -14,7 +15,7 @@
d:DesignHeight="450"
d:DesignWidth="800"
mc:Ignorable="d">
<ScrollViewer
<ui:ScrollViewerEx
Padding="0 0 6 0"
FontSize="14"
VirtualizingStackPanel.IsVirtualizing="True"
@ -27,437 +28,470 @@
Text="{DynamicResource hotkeys}"
TextAlignment="left" />
<cc:Card
Title="{DynamicResource flowlauncherHotkey}"
Icon="&#xeda7;"
Sub="{DynamicResource flowlauncherHotkeyToolTip}">
<ui:SettingsCard
Margin="0 8 0 0"
Description="{DynamicResource flowlauncherHotkeyToolTip}"
Header="{DynamicResource flowlauncherHotkey}">
<ui:SettingsCard.HeaderIcon>
<ui:FontIcon Glyph="&#xeda7;" />
</ui:SettingsCard.HeaderIcon>
<flowlauncher:HotkeyControl
ChangeHotkey="{Binding SetTogglingHotkeyCommand}"
DefaultHotkey="Alt+Space"
Type="Hotkey"
ValidateKeyGesture="True"
WindowTitle="{DynamicResource flowlauncherHotkey}" />
</cc:Card>
</ui:SettingsCard>
<ui:SettingsCard
Margin="0 4 0 0"
Description="{DynamicResource previewHotkeyToolTip}"
Header="{DynamicResource previewHotkey}">
<ui:SettingsCard.HeaderIcon>
<ui:FontIcon Glyph="&#xe8a1;" />
</ui:SettingsCard.HeaderIcon>
<cc:Card
Title="{DynamicResource previewHotkey}"
Icon="&#xe8a1;"
Sub="{DynamicResource previewHotkeyToolTip}">
<flowlauncher:HotkeyControl
DefaultHotkey="F1"
Type="PreviewHotkey"
ValidateKeyGesture="False"
WindowTitle="{DynamicResource previewHotkey}" />
</cc:Card>
</ui:SettingsCard>
<cc:CardGroup Margin="0 12 0 0">
<cc:Card
Title="{DynamicResource openResultModifiers}"
Sub="{DynamicResource openResultModifiersToolTip}"
Type="First">
<ComboBox
Width="120"
FontSize="14"
ItemsSource="{Binding OpenResultModifiersList}"
SelectedValue="{Binding Settings.OpenResultModifiers}" />
</cc:Card>
<cc:Card
Title="{DynamicResource showOpenResultHotkey}"
Sub="{DynamicResource showOpenResultHotkeyToolTip}"
Type="Last">
<ui:ToggleSwitch
IsOn="{Binding Settings.ShowOpenResultHotkey}"
OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}" />
</cc:Card>
</cc:CardGroup>
<cc:Card
Title="{DynamicResource dialogJumpHotkey}"
<ui:SettingsCard
Margin="0 14 0 0"
Icon="&#xE8AB;"
Sub="{DynamicResource dialogJumpHotkeyToolTip}">
Description="{DynamicResource openResultModifiersToolTip}"
Header="{DynamicResource openResultModifiers}">
<ComboBox
Width="120"
FontSize="14"
ItemsSource="{Binding OpenResultModifiersList}"
SelectedValue="{Binding Settings.OpenResultModifiers}" />
</ui:SettingsCard>
<ui:SettingsCard
Margin="0 4 0 0"
Description="{DynamicResource showOpenResultHotkeyToolTip}"
Header="{DynamicResource showOpenResultHotkey}">
<ui:ToggleSwitch
IsOn="{Binding Settings.ShowOpenResultHotkey}"
OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}" />
</ui:SettingsCard>
<ui:SettingsCard
Margin="0 14 0 0"
Description="{DynamicResource dialogJumpHotkeyToolTip}"
Header="{DynamicResource dialogJumpHotkey}">
<ui:SettingsCard.HeaderIcon>
<ui:FontIcon Glyph="&#xE8AB;" />
</ui:SettingsCard.HeaderIcon>
<flowlauncher:HotkeyControl
ChangeHotkey="{Binding SetDialogJumpHotkeyCommand}"
DefaultHotkey="Alt+G"
Type="DialogJumpHotkey"
ValidateKeyGesture="False"
WindowTitle="{DynamicResource dialogJumpHotkey}" />
</cc:Card>
</ui:SettingsCard>
<cc:ExCard
Title="{DynamicResource hotkeyPresets}"
<ui:SettingsExpander
Margin="0 14 0 0"
Icon="&#xf0e2;"
Sub="{DynamicResource hotkeyPresetsToolTip}">
<StackPanel>
<cc:Card
Title="{DynamicResource OpenContainFolderHotkey}"
Icon="&#xe8b7;"
Type="Inside">
Description="{DynamicResource hotkeyPresetsToolTip}"
Header="{DynamicResource hotkeyPresets}">
<ui:SettingsExpander.HeaderIcon>
<ui:FontIcon Glyph="&#xf0e2;" />
</ui:SettingsExpander.HeaderIcon>
<ui:SettingsExpander.Items>
<ui:SettingsCard Header="{DynamicResource OpenContainFolderHotkey}">
<ui:SettingsCard.HeaderIcon>
<ui:FontIcon Glyph="&#xe8b7;" />
</ui:SettingsCard.HeaderIcon>
<cc:HotkeyDisplay Keys="Ctrl+Enter" />
</cc:Card>
<cc:Card
Title="{DynamicResource RunAsAdminHotkey}"
Icon="&#xe7ef;"
Type="Inside">
</ui:SettingsCard>
<ui:SettingsCard Header="{DynamicResource RunAsAdminHotkey}">
<ui:SettingsCard.HeaderIcon>
<ui:FontIcon Glyph="&#xe7ef;" />
</ui:SettingsCard.HeaderIcon>
<cc:HotkeyDisplay Keys="Ctrl+Shift+Enter" />
</cc:Card>
<cc:Card
Title="{DynamicResource ToggleHistoryHotkey}"
Icon="&#xf738;"
Type="Inside">
</ui:SettingsCard>
<ui:SettingsCard Header="{DynamicResource ToggleHistoryHotkey}">
<ui:SettingsCard.HeaderIcon>
<ui:FontIcon Glyph="&#xf738;" />
</ui:SettingsCard.HeaderIcon>
<flowlauncher:HotkeyControl
DefaultHotkey="Ctrl+H"
Type="OpenHistoryHotkey"
ValidateKeyGesture="False" />
</cc:Card>
<cc:Card
Title="{DynamicResource CopyFilePathHotkey}"
Icon="&#xe8c8;"
Type="Inside">
</ui:SettingsCard>
<ui:SettingsCard Header="{DynamicResource CopyFilePathHotkey}">
<ui:SettingsCard.HeaderIcon>
<ui:FontIcon Glyph="&#xe8c8;" />
</ui:SettingsCard.HeaderIcon>
<cc:HotkeyDisplay Keys="Ctrl+Shift+C" />
</cc:Card>
<cc:Card
Title="{DynamicResource OpenContextMenuHotkey}"
Icon="&#xede3;"
Type="Inside">
</ui:SettingsCard>
<ui:SettingsCard Header="{DynamicResource OpenContextMenuHotkey}">
<ui:SettingsCard.HeaderIcon>
<ui:FontIcon Glyph="&#xede3;" />
</ui:SettingsCard.HeaderIcon>
<flowlauncher:HotkeyControl
DefaultHotkey="Ctrl+I"
Type="OpenContextMenuHotkey"
ValidateKeyGesture="False" />
</cc:Card>
<cc:Card
Title="{DynamicResource OpenContextMenuHotkey}"
Icon="&#xede3;"
Type="Inside">
</ui:SettingsCard>
<ui:SettingsCard Header="{DynamicResource OpenContextMenuHotkey}">
<ui:SettingsCard.HeaderIcon>
<ui:FontIcon Glyph="&#xede3;" />
</ui:SettingsCard.HeaderIcon>
<cc:HotkeyDisplay Keys="Shift+Enter" />
</cc:Card>
<cc:Card
Title="{DynamicResource OpenNativeContextMenuHotkey}"
Icon="&#xede3;"
Type="Inside">
</ui:SettingsCard>
<ui:SettingsCard Header="{DynamicResource OpenNativeContextMenuHotkey}">
<ui:SettingsCard.HeaderIcon>
<ui:FontIcon Glyph="&#xede3;" />
</ui:SettingsCard.HeaderIcon>
<cc:HotkeyDisplay Keys="Alt+Enter" />
</cc:Card>
<cc:Card
Title="{DynamicResource SettingWindowHotkey}"
Icon="&#xe713;"
Type="Inside">
</ui:SettingsCard>
<ui:SettingsCard Header="{DynamicResource SettingWindowHotkey}">
<ui:SettingsCard.HeaderIcon>
<ui:FontIcon Glyph="&#xe713;" />
</ui:SettingsCard.HeaderIcon>
<flowlauncher:HotkeyControl
DefaultHotkey="Ctrl+I"
Type="SettingWindowHotkey"
ValidateKeyGesture="False" />
</cc:Card>
<cc:Card
Title="{DynamicResource ToggleGameModeHotkey}"
Icon="&#xe7fc;"
Type="Inside">
</ui:SettingsCard>
<ui:SettingsCard Header="{DynamicResource ToggleGameModeHotkey}">
<ui:SettingsCard.HeaderIcon>
<ui:FontIcon Glyph="&#xe7fc;" />
</ui:SettingsCard.HeaderIcon>
<cc:HotkeyDisplay Keys="Ctrl+F12" />
</cc:Card>
<cc:Card
Title="{DynamicResource RequeryHotkey}"
Icon="&#xe72c;"
Type="Inside">
</ui:SettingsCard>
<ui:SettingsCard Header="{DynamicResource RequeryHotkey}">
<ui:SettingsCard.HeaderIcon>
<ui:FontIcon Glyph="&#xe72c;" />
</ui:SettingsCard.HeaderIcon>
<cc:HotkeyDisplay Keys="Ctrl+R" />
</cc:Card>
<cc:Card
Title="{DynamicResource CycleHistoryUpHotkey}"
Icon="&#xe70e;"
Type="Inside">
</ui:SettingsCard>
<ui:SettingsCard Header="{DynamicResource CycleHistoryUpHotkey}">
<ui:SettingsCard.HeaderIcon>
<ui:FontIcon Glyph="&#xe70e;" />
</ui:SettingsCard.HeaderIcon>
<flowlauncher:HotkeyControl
DefaultHotkey="Alt+Up"
Type="CycleHistoryUpHotkey"
ValidateKeyGesture="False" />
</cc:Card>
<cc:Card
Title="{DynamicResource CycleHistoryDownHotkey}"
Icon="&#xe70d;"
Type="Inside">
</ui:SettingsCard>
<ui:SettingsCard Header="{DynamicResource CycleHistoryDownHotkey}">
<ui:SettingsCard.HeaderIcon>
<ui:FontIcon Glyph="&#xe70d;" />
</ui:SettingsCard.HeaderIcon>
<flowlauncher:HotkeyControl
DefaultHotkey="Alt+Down"
Type="CycleHistoryDownHotkey"
ValidateKeyGesture="False" />
</cc:Card>
<cc:Card
Title="{DynamicResource ReloadPluginHotkey}"
Icon="&#xe72c;"
Sub="{DynamicResource ReloadPluginHotkeyToolTip}"
Type="Inside">
</ui:SettingsCard>
<ui:SettingsCard Description="{DynamicResource ReloadPluginHotkeyToolTip}" Header="{DynamicResource ReloadPluginHotkey}">
<ui:SettingsCard.HeaderIcon>
<ui:FontIcon Glyph="&#xe72c;" />
</ui:SettingsCard.HeaderIcon>
<cc:HotkeyDisplay Keys="F5" />
</cc:Card>
<cc:Card
Title="{DynamicResource SelectPrevPageHotkey}"
Icon="&#xf0ad;"
Type="Inside">
</ui:SettingsCard>
<ui:SettingsCard Header="{DynamicResource SelectPrevPageHotkey}">
<ui:SettingsCard.HeaderIcon>
<ui:FontIcon Glyph="&#xf0ad;" />
</ui:SettingsCard.HeaderIcon>
<flowlauncher:HotkeyControl
DefaultHotkey=""
Type="SelectPrevPageHotkey"
ValidateKeyGesture="False" />
</cc:Card>
<cc:Card
Title="{DynamicResource SelectNextPageHotkey}"
Icon="&#xf0ae;"
Type="Inside">
</ui:SettingsCard>
<ui:SettingsCard Header="{DynamicResource SelectNextPageHotkey}">
<ui:SettingsCard.HeaderIcon>
<ui:FontIcon Glyph="&#xf0ae;" />
</ui:SettingsCard.HeaderIcon>
<flowlauncher:HotkeyControl
DefaultHotkey=""
Type="SelectNextPageHotkey"
ValidateKeyGesture="False" />
</cc:Card>
</ui:SettingsCard>
<ui:SettingsCard Header="{DynamicResource QuickWidthHotkey}">
<ui:SettingsCard.HeaderIcon>
<ui:FontIcon Glyph="&#xe7ea;" />
</ui:SettingsCard.HeaderIcon>
<cc:Card
Title="{DynamicResource QuickWidthHotkey}"
Icon="&#xe7ea;"
Type="Inside">
<StackPanel Orientation="Horizontal">
<cc:HotkeyDisplay Keys="Ctrl+[" />
<cc:HotkeyDisplay Margin="4 0 0 0" Keys="Ctrl+]" />
</StackPanel>
</cc:Card>
<cc:Card
Title="{DynamicResource QuickHeightHotkey}"
Icon="&#xe7eb;"
Type="Inside">
</ui:SettingsCard>
<ui:SettingsCard Header="{DynamicResource QuickHeightHotkey}">
<ui:SettingsCard.HeaderIcon>
<ui:FontIcon Glyph="&#xe7eb;" />
</ui:SettingsCard.HeaderIcon>
<StackPanel Orientation="Horizontal">
<cc:HotkeyDisplay Keys="Ctrl+Plus" />
<cc:HotkeyDisplay Margin="4 0 0 0" Keys="Ctrl+Minus" />
</StackPanel>
</cc:Card>
</StackPanel>
</cc:ExCard>
</ui:SettingsCard>
</ui:SettingsExpander.Items>
</ui:SettingsExpander>
<cc:ExCard
Title="{DynamicResource autoCompleteHotkey}"
<ui:SettingsExpander
Margin="0 14 0 0"
Icon="&#xe893;"
Sub="{DynamicResource autoCompleteHotkeyToolTip}">
<cc:ExCard.SideContent>
<flowlauncher:HotkeyControl
DefaultHotkey="Ctrl+Tab"
Type="AutoCompleteHotkey"
ValidateKeyGesture="False" />
</cc:ExCard.SideContent>
<cc:Card
Title="{DynamicResource autoCompleteHotkey}"
Sub="{DynamicResource AdditionalHotkeyToolTip}"
Type="InsideFit">
<flowlauncher:HotkeyControl
DefaultHotkey=""
Type="AutoCompleteHotkey2"
ValidateKeyGesture="False" />
</cc:Card>
</cc:ExCard>
Description="{DynamicResource autoCompleteHotkeyToolTip}"
Header="{DynamicResource autoCompleteHotkey}">
<ui:SettingsExpander.HeaderIcon>
<ui:FontIcon Glyph="&#xe893;" />
</ui:SettingsExpander.HeaderIcon>
<cc:ExCard
Title="{DynamicResource SelectPrevItemHotkey}"
Margin="0 4 0 0"
Icon="&#xe74a;">
<cc:ExCard.SideContent>
<flowlauncher:HotkeyControl
DefaultHotkey="Shift+Tab"
Type="SelectPrevItemHotkey"
ValidateKeyGesture="False" />
</cc:ExCard.SideContent>
<cc:Card
Title="{DynamicResource SelectPrevItemHotkey}"
Sub="{DynamicResource AdditionalHotkeyToolTip}"
Type="InsideFit">
<flowlauncher:HotkeyControl
DefaultHotkey=""
Type="SelectPrevItemHotkey2"
ValidateKeyGesture="False" />
</cc:Card>
</cc:ExCard>
<flowlauncher:HotkeyControl
DefaultHotkey="Ctrl+Tab"
Type="AutoCompleteHotkey"
ValidateKeyGesture="False" />
<cc:ExCard
Title="{DynamicResource SelectNextItemHotkey}"
Margin="0 4 0 0"
Icon="&#xe74b;">
<cc:ExCard.SideContent>
<flowlauncher:HotkeyControl
DefaultHotkey="Tab"
Type="SelectNextItemHotkey"
ValidateKeyGesture="False" />
</cc:ExCard.SideContent>
<cc:Card
Title="{DynamicResource SelectNextItemHotkey}"
Sub="{DynamicResource AdditionalHotkeyToolTip}"
Type="InsideFit">
<flowlauncher:HotkeyControl
DefaultHotkey=""
Type="SelectNextItemHotkey2"
ValidateKeyGesture="False" />
</cc:Card>
</cc:ExCard>
<ui:SettingsExpander.Items>
<ui:SettingsCard Description="{DynamicResource AdditionalHotkeyToolTip}" Header="{DynamicResource autoCompleteHotkey}">
<flowlauncher:HotkeyControl
DefaultHotkey=""
Type="AutoCompleteHotkey2"
ValidateKeyGesture="False" />
</ui:SettingsCard>
</ui:SettingsExpander.Items>
</ui:SettingsExpander>
<cc:ExCard
Title="{DynamicResource customQueryHotkey}"
Margin="0 20 0 0"
Icon="&#xf26c;">
<StackPanel>
<Separator
Width="Auto"
Margin="0"
BorderThickness="1"
Style="{StaticResource SettingSeparatorStyle}" />
<StackPanel Margin="18 18 18 0">
<ListView
MinHeight="160"
<ui:SettingsExpander Margin="0 4 0 0" Header="{DynamicResource SelectPrevItemHotkey}">
<ui:SettingsExpander.HeaderIcon>
<ui:FontIcon Glyph="&#xe74a;" />
</ui:SettingsExpander.HeaderIcon>
<flowlauncher:HotkeyControl
DefaultHotkey="Shift+Tab"
Type="SelectPrevItemHotkey"
ValidateKeyGesture="False" />
<ui:SettingsExpander.Items>
<ui:SettingsCard Description="{DynamicResource AdditionalHotkeyToolTip}" Header="{DynamicResource SelectPrevItemHotkey}">
<flowlauncher:HotkeyControl
DefaultHotkey=""
Type="SelectPrevItemHotkey2"
ValidateKeyGesture="False" />
</ui:SettingsCard>
</ui:SettingsExpander.Items>
</ui:SettingsExpander>
<ui:SettingsExpander Margin="0 4 0 0" Header="{DynamicResource SelectNextItemHotkey}">
<ui:SettingsExpander.HeaderIcon>
<ui:FontIcon Glyph="&#xe74b;" />
</ui:SettingsExpander.HeaderIcon>
<flowlauncher:HotkeyControl
DefaultHotkey="Tab"
Type="SelectNextItemHotkey"
ValidateKeyGesture="False" />
<ui:SettingsExpander.Items>
<ui:SettingsCard Description="{DynamicResource AdditionalHotkeyToolTip}" Header="{DynamicResource SelectNextItemHotkey}">
<flowlauncher:HotkeyControl
DefaultHotkey=""
Type="SelectNextItemHotkey2"
ValidateKeyGesture="False" />
</ui:SettingsCard>
</ui:SettingsExpander.Items>
</ui:SettingsExpander>
<ui:SettingsExpander Margin="0 20 0 0" Header="{DynamicResource customQueryHotkey}">
<ui:SettingsExpander.HeaderIcon>
<ui:FontIcon Glyph="&#xf26c;" />
</ui:SettingsExpander.HeaderIcon>
<ui:SettingsExpander.ItemsHeader>
<StackPanel Background="{DynamicResource SettingsCardBackground}">
<Separator
Width="Auto"
Margin="0"
Background="{DynamicResource Color02B}"
BorderBrush="DarkGray"
BorderThickness="1"
ItemsSource="{Binding Settings.CustomPluginHotkeys}"
SelectedItem="{Binding SelectedCustomPluginHotkey}"
Style="{StaticResource {x:Static GridView.GridViewStyleKey}}">
<ListView.View>
<GridView>
<GridViewColumn Width="180" Header="{DynamicResource hotkey}">
<GridViewColumn.CellTemplate>
<DataTemplate DataType="userSettings:CustomPluginHotkey">
<TextBlock Text="{Binding Hotkey}" />
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
<GridViewColumn Width="430" Header="{DynamicResource customQuery}">
<GridViewColumn.CellTemplate>
<DataTemplate DataType="userSettings:CustomPluginHotkey">
<TextBlock Text="{Binding ActionKeyword}" />
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
</GridView>
</ListView.View>
</ListView>
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
<Button
MinWidth="100"
Margin="10"
Command="{Binding CustomHotkeyDeleteCommand}"
Content="{DynamicResource delete}" />
<Button
MinWidth="100"
Margin="10"
Command="{Binding CustomHotkeyEditCommand}"
Content="{DynamicResource edit}" />
<Button
MinWidth="100"
Margin="10 10 0 10"
Command="{Binding CustomHotkeyAddCommand}"
Content="{DynamicResource add}" />
Style="{StaticResource SettingSeparatorStyle}" />
<StackPanel Margin="18 18 18 0">
<ListView
MinHeight="160"
Margin="0"
Background="{DynamicResource Color02B}"
BorderBrush="DarkGray"
BorderThickness="1"
ItemsSource="{Binding Settings.CustomPluginHotkeys}"
SelectedItem="{Binding SelectedCustomPluginHotkey}"
Style="{StaticResource {x:Static GridView.GridViewStyleKey}}">
<ListView.View>
<GridView>
<GridViewColumn Width="180" Header="{DynamicResource hotkey}">
<GridViewColumn.CellTemplate>
<DataTemplate DataType="userSettings:CustomPluginHotkey">
<TextBlock Text="{Binding Hotkey}" />
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
<GridViewColumn Width="430" Header="{DynamicResource customQuery}">
<GridViewColumn.CellTemplate>
<DataTemplate DataType="userSettings:CustomPluginHotkey">
<TextBlock Text="{Binding ActionKeyword}" />
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
</GridView>
</ListView.View>
</ListView>
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
<Button
MinWidth="100"
Margin="10"
Command="{Binding CustomHotkeyDeleteCommand}"
Content="{DynamicResource delete}" />
<Button
MinWidth="100"
Margin="10"
Command="{Binding CustomHotkeyEditCommand}"
Content="{DynamicResource edit}" />
<Button
MinWidth="100"
Margin="10 10 0 10"
Command="{Binding CustomHotkeyAddCommand}"
Content="{DynamicResource add}" />
</StackPanel>
</StackPanel>
</StackPanel>
</StackPanel>
</cc:ExCard>
</ui:SettingsExpander.ItemsHeader>
</ui:SettingsExpander>
<cc:ExCard
Title="{DynamicResource customQueryShortcut}"
Margin="0 4 0 0"
Icon="&#xf26b;">
<StackPanel>
<Separator
Width="Auto"
Margin="0"
BorderThickness="1"
Style="{StaticResource SettingSeparatorStyle}" />
<StackPanel Margin="18 12 18 0">
<ListView
MinHeight="160"
Margin="0 6 0 0"
Background="{DynamicResource Color02B}"
BorderBrush="DarkGray"
BorderThickness="1"
ItemsSource="{Binding Settings.CustomShortcuts}"
SelectedItem="{Binding SelectedCustomShortcut}"
Style="{StaticResource {x:Static GridView.GridViewStyleKey}}">
<ListView.View>
<GridView>
<GridViewColumn Width="180" Header="{DynamicResource customShortcut}">
<GridViewColumn.CellTemplate>
<DataTemplate DataType="{x:Type userSettings:CustomShortcutModel}">
<TextBlock Text="{Binding Key}" />
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
<GridViewColumn Width="430" Header="{DynamicResource customShortcutExpansion}">
<GridViewColumn.CellTemplate>
<DataTemplate DataType="{x:Type userSettings:CustomShortcutModel}">
<TextBlock Text="{Binding Value}" />
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
</GridView>
</ListView.View>
</ListView>
<StackPanel
<ui:SettingsExpander Margin="0 4 0 0" Header="{DynamicResource customQueryShortcut}">
<ui:SettingsExpander.HeaderIcon>
<ui:FontIcon Glyph="&#xf26b;" />
</ui:SettingsExpander.HeaderIcon>
<ui:SettingsExpander.ItemsHeader>
<StackPanel Background="{DynamicResource SettingsCardBackground}">
<Separator
Width="Auto"
Margin="0"
HorizontalAlignment="Right"
VerticalAlignment="Top"
Orientation="Horizontal">
<Button
MinWidth="100"
Margin="10"
Command="{Binding CustomShortcutDeleteCommand}"
Content="{DynamicResource delete}" />
<Button
MinWidth="100"
Margin="10"
Command="{Binding CustomShortcutEditCommand}"
Content="{DynamicResource edit}" />
<Button
MinWidth="100"
Margin="10 10 0 10"
Command="{Binding CustomShortcutAddCommand}"
Content="{DynamicResource add}" />
BorderThickness="1"
Style="{StaticResource SettingSeparatorStyle}" />
<StackPanel Margin="18 12 18 0">
<ListView
MinHeight="160"
Margin="0 6 0 0"
Background="{DynamicResource Color02B}"
BorderBrush="DarkGray"
BorderThickness="1"
ItemsSource="{Binding Settings.CustomShortcuts}"
SelectedItem="{Binding SelectedCustomShortcut}"
Style="{StaticResource {x:Static GridView.GridViewStyleKey}}">
<ListView.View>
<GridView>
<GridViewColumn Width="180" Header="{DynamicResource customShortcut}">
<GridViewColumn.CellTemplate>
<DataTemplate DataType="{x:Type userSettings:CustomShortcutModel}">
<TextBlock Text="{Binding Key}" />
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
<GridViewColumn Width="430" Header="{DynamicResource customShortcutExpansion}">
<GridViewColumn.CellTemplate>
<DataTemplate DataType="{x:Type userSettings:CustomShortcutModel}">
<TextBlock Text="{Binding Value}" />
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
</GridView>
</ListView.View>
</ListView>
<StackPanel
Margin="0"
HorizontalAlignment="Right"
VerticalAlignment="Top"
Orientation="Horizontal">
<Button
MinWidth="100"
Margin="10"
Command="{Binding CustomShortcutDeleteCommand}"
Content="{DynamicResource delete}" />
<Button
MinWidth="100"
Margin="10"
Command="{Binding CustomShortcutEditCommand}"
Content="{DynamicResource edit}" />
<Button
MinWidth="100"
Margin="10 10 0 10"
Command="{Binding CustomShortcutAddCommand}"
Content="{DynamicResource add}" />
</StackPanel>
</StackPanel>
</StackPanel>
</StackPanel>
</cc:ExCard>
</ui:SettingsExpander.ItemsHeader>
</ui:SettingsExpander>
<cc:ExCard
Title="{DynamicResource builtinShortcuts}"
Margin="0 4 0 14"
Icon="&#xf158;">
<StackPanel>
<Separator
Width="Auto"
Margin="0"
BorderThickness="1"
Style="{StaticResource SettingSeparatorStyle}" />
<StackPanel Margin="16 8 16 0">
<ListView
MinHeight="160"
Margin="0 6 0 16"
Background="{DynamicResource Color02B}"
BorderBrush="DarkGray"
<ui:SettingsExpander Margin="0 4 0 14" Header="{DynamicResource builtinShortcuts}">
<ui:SettingsExpander.HeaderIcon>
<ui:FontIcon Glyph="&#xf158;" />
</ui:SettingsExpander.HeaderIcon>
<ui:SettingsExpander.ItemsHeader>
<StackPanel Background="{DynamicResource SettingsCardBackground}">
<Separator
Width="Auto"
Margin="0"
BorderThickness="1"
ItemsSource="{Binding Settings.BuiltinShortcuts}"
Style="{StaticResource {x:Static GridView.GridViewStyleKey}}">
<ListView.View>
<GridView>
<GridViewColumn Width="180" Header="{DynamicResource customShortcut}">
<GridViewColumn.CellTemplate>
<DataTemplate DataType="{x:Type userSettings:BuiltinShortcutModel}">
<TextBlock Text="{Binding Key}" />
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
<GridViewColumn Width="430" Header="{DynamicResource builtinShortcutDescription}">
<GridViewColumn.CellTemplate>
<DataTemplate DataType="{x:Type userSettings:BuiltinShortcutModel}">
<TextBlock Text="{Binding LocalizedDescription}" />
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
</GridView>
</ListView.View>
</ListView>
Style="{StaticResource SettingSeparatorStyle}" />
<StackPanel Margin="16 8 16 0">
<ListView
MinHeight="160"
Margin="0 6 0 16"
Background="{DynamicResource Color02B}"
BorderBrush="DarkGray"
BorderThickness="1"
ItemsSource="{Binding Settings.BuiltinShortcuts}"
Style="{StaticResource {x:Static GridView.GridViewStyleKey}}">
<ListView.View>
<GridView>
<GridViewColumn Width="180" Header="{DynamicResource customShortcut}">
<GridViewColumn.CellTemplate>
<DataTemplate DataType="{x:Type userSettings:BuiltinShortcutModel}">
<TextBlock Text="{Binding Key}" />
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
<GridViewColumn Width="430" Header="{DynamicResource builtinShortcutDescription}">
<GridViewColumn.CellTemplate>
<DataTemplate DataType="{x:Type userSettings:BuiltinShortcutModel}">
<TextBlock Text="{Binding LocalizedDescription}" />
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
</GridView>
</ListView.View>
</ListView>
</StackPanel>
</StackPanel>
</StackPanel>
</cc:ExCard>
</ui:SettingsExpander.ItemsHeader>
</ui:SettingsExpander>
</StackPanel>
</ScrollViewer>
</ui:ScrollViewerEx>
</ui:Page>

View file

@ -3,9 +3,10 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:ikw="http://schemas.inkore.net/lib/ui/wpf"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:ui="http://schemas.modernwpf.com/2019"
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
xmlns:viewModels="clr-namespace:Flow.Launcher.SettingPages.ViewModels"
xmlns:wpftk="clr-namespace:WpfToolkit.Controls;assembly=VirtualizingWrapPanel"
Title="PluginStore"
@ -51,21 +52,22 @@
Grid.Column="1"
Margin="5 24 0 0">
<StackPanel
<ikw:SimpleStackPanel
HorizontalAlignment="Right"
VerticalAlignment="Center"
DockPanel.Dock="Right"
Orientation="Horizontal">
Orientation="Horizontal"
Spacing="8">
<Button
Height="34"
Margin="0 5 10 5"
Margin="0 5 0 5"
Padding="12 4"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Command="{Binding RefreshExternalPluginsCommand}"
Content="{DynamicResource refresh}"
FontSize="13" />
<Button Height="34" Margin="0 0 10 0">
<Button Height="34">
<ui:FontIcon FontSize="14" Glyph="&#xe71c;" />
<ui:FlyoutService.Flyout>
<ui:MenuFlyout x:Name="FilterFlyout" Placement="Bottom">
@ -94,14 +96,12 @@
</Button>
<Button
Height="34"
Margin="0 0 10 0"
Command="{Binding InstallPluginCommand}"
ToolTip="{DynamicResource installLocalPluginTooltip}">
<ui:FontIcon FontSize="14" Glyph="&#xE8DA;" />
</Button>
<Button
Height="34"
Margin="0 0 10 0"
Command="{Binding CheckPluginUpdatesCommand}"
ToolTip="{DynamicResource checkPluginUpdatesTooltip}">
<ui:FontIcon FontSize="14" Glyph="&#xecc5;" />
@ -112,48 +112,19 @@
Height="34"
Margin="0 0 26 0"
HorizontalAlignment="Right"
VerticalContentAlignment="Center"
ui:ControlHelper.PlaceholderText="{DynamicResource searchplugin}"
ContextMenu="{StaticResource TextBoxContextMenu}"
DockPanel.Dock="Right"
FontSize="14"
Text="{Binding FilterText, UpdateSourceTrigger=PropertyChanged}"
TextAlignment="Left"
ToolTip="{DynamicResource searchpluginToolTip}"
ToolTipService.InitialShowDelay="200"
ToolTipService.Placement="Top">
<TextBox.Style>
<Style BasedOn="{StaticResource DefaultTextBoxStyle}" TargetType="TextBox">
<Style.Resources>
<VisualBrush
x:Key="CueBannerBrush"
AlignmentX="Left"
AlignmentY="Center"
Stretch="None">
<VisualBrush.Visual>
<Label
Padding="10 0 0 0"
Content="{DynamicResource searchplugin}"
Foreground="{DynamicResource CustomContextDisabled}" />
</VisualBrush.Visual>
</VisualBrush>
</Style.Resources>
<Style.Triggers>
<Trigger Property="Text" Value="{x:Static sys:String.Empty}">
<Setter Property="Background" Value="{StaticResource CueBannerBrush}" />
</Trigger>
<Trigger Property="Text" Value="{x:Null}">
<Setter Property="Background" Value="{StaticResource CueBannerBrush}" />
</Trigger>
<Trigger Property="IsKeyboardFocused" Value="True">
<Setter Property="Background" Value="{DynamicResource Color02B}" />
</Trigger>
</Style.Triggers>
</Style>
</TextBox.Style>
</TextBox>
</StackPanel>
ToolTipService.Placement="Top" />
</ikw:SimpleStackPanel>
</DockPanel>
<ListView
<ListBox
x:Name="StoreListBox"
Grid.Row="1"
Grid.Column="0"
@ -161,14 +132,17 @@
Margin="4 0 0 0"
Padding="0 0 18 0"
FontSize="14"
ItemContainerStyle="{StaticResource StoreList}"
ItemContainerStyle="{DynamicResource StoreList}"
ItemsSource="{Binding Source={StaticResource PluginStoreCollectionView}}"
ScrollViewer.CanContentScroll="True"
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
SelectionMode="Single"
Style="{DynamicResource StoreListStyle}"
VirtualizingPanel.IsVirtualizing="True"
VirtualizingPanel.IsVirtualizingWhenGrouping="True"
VirtualizingPanel.ScrollUnit="Pixel">
<ListView.ItemsPanel>
VirtualizingPanel.ScrollUnit="Pixel"
VirtualizingPanel.VirtualizationMode="Recycling">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<wpftk:VirtualizingWrapPanel
x:Name="ItemWrapPanel"
@ -179,26 +153,25 @@
SpacingMode="None"
StretchItems="True" />
</ItemsPanelTemplate>
</ListView.ItemsPanel>
<ListView.GroupStyle>
</ListBox.ItemsPanel>
<ListBox.GroupStyle>
<GroupStyle HidesIfEmpty="True">
<GroupStyle.ContainerStyle>
<Style TargetType="{x:Type GroupItem}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate>
<Grid>
<StackPanel Orientation="Vertical">
<TextBlock
Margin="2 0 0 10"
VerticalAlignment="Top"
FontSize="16"
FontWeight="Bold"
Foreground="{DynamicResource Color05B}"
Text="{Binding Name, Converter={StaticResource TextConverter}}" />
<ItemsPresenter />
</StackPanel>
</Grid>
<ControlTemplate TargetType="{x:Type GroupItem}">
<StackPanel Orientation="Vertical">
<TextBlock
Margin="2 0 0 10"
VerticalAlignment="Top"
FontSize="16"
FontWeight="Bold"
Foreground="{DynamicResource Color05B}"
Text="{Binding Name, Converter={StaticResource TextConverter}}" />
<ItemsPresenter />
</StackPanel>
</ControlTemplate>
</Setter.Value>
</Setter>
@ -210,9 +183,9 @@
</ItemsPanelTemplate>
</GroupStyle.Panel>
</GroupStyle>
</ListView.GroupStyle>
</ListBox.GroupStyle>
<ListView.ItemTemplate>
<ListBox.ItemTemplate>
<DataTemplate>
<DataTemplate.Resources>
<Style x:Key="StoreListItemBtnStyle" TargetType="Button">
@ -262,7 +235,6 @@
HorizontalContentAlignment="Stretch"
VerticalContentAlignment="Stretch"
BorderThickness="0"
FocusVisualStyle="{StaticResource StoreItemFocusVisualStyleKey}"
Style="{DynamicResource StoreListItemBtnStyle}">
<ui:FlyoutService.Flyout>
<ui:Flyout x:Name="InstallFlyout" Placement="Bottom">
@ -394,7 +366,7 @@
</Grid>
</Button>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</ListBox.ItemTemplate>
</ListBox>
</Grid>
</ui:Page>

View file

@ -4,9 +4,10 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:cc="clr-namespace:Flow.Launcher.Resources.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:ikw="http://schemas.inkore.net/lib/ui/wpf"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:ui="http://schemas.modernwpf.com/2019"
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
xmlns:viewModels="clr-namespace:Flow.Launcher.SettingPages.ViewModels"
Title="Plugins"
d:DataContext="{d:DesignInstance viewModels:SettingsPanePluginsViewModel}"
@ -34,13 +35,13 @@
Style="{StaticResource PageTitle}"
Text="{DynamicResource plugins}"
TextAlignment="Left" />
<StackPanel
<ikw:SimpleStackPanel
HorizontalAlignment="Right"
VerticalAlignment="Center"
DockPanel.Dock="Right"
Orientation="Horizontal">
Orientation="Horizontal"
Spacing="8">
<TextBlock
Margin="0 0 6 0"
VerticalAlignment="Center"
FontSize="14"
Foreground="{DynamicResource Color15B}"
@ -51,7 +52,6 @@
Height="34"
MinWidth="150"
MaxWidth="150"
Margin="0 0 4 0"
HorizontalContentAlignment="Left"
Background="{DynamicResource Color00B}"
DisplayMemberPath="Display"
@ -61,7 +61,7 @@
<Button
Width="34"
Height="34"
Margin="0 0 20 0"
Padding="0"
Command="{Binding OpenHelperCommand}"
CommandParameter="{Binding RelativeSource={RelativeSource Self}}"
FontSize="14">
@ -72,44 +72,15 @@
Width="150"
Height="34"
Margin="0 0 26 0"
VerticalContentAlignment="Center"
ui:ControlHelper.PlaceholderText="{DynamicResource searchplugin}"
ContextMenu="{StaticResource TextBoxContextMenu}"
FontSize="14"
Text="{Binding FilterText, UpdateSourceTrigger=PropertyChanged}"
TextAlignment="Left"
ToolTip="{DynamicResource searchpluginToolTip}"
ToolTipService.InitialShowDelay="200"
ToolTipService.Placement="Top">
<TextBox.Style>
<Style BasedOn="{StaticResource DefaultTextBoxStyle}" TargetType="TextBox">
<Style.Resources>
<VisualBrush
x:Key="CueBannerBrush"
AlignmentX="Left"
AlignmentY="Center"
Stretch="None">
<VisualBrush.Visual>
<Label
Padding="10 0 0 0"
Content="{DynamicResource searchplugin}"
Foreground="{DynamicResource CustomContextDisabled}" />
</VisualBrush.Visual>
</VisualBrush>
</Style.Resources>
<Style.Triggers>
<Trigger Property="Text" Value="{x:Static sys:String.Empty}">
<Setter Property="Background" Value="{StaticResource CueBannerBrush}" />
</Trigger>
<Trigger Property="Text" Value="{x:Null}">
<Setter Property="Background" Value="{StaticResource CueBannerBrush}" />
</Trigger>
<Trigger Property="IsKeyboardFocused" Value="True">
<Setter Property="Background" Value="{DynamicResource Color02B}" />
</Trigger>
</Style.Triggers>
</Style>
</TextBox.Style>
</TextBox>
</StackPanel>
ToolTipService.Placement="Top" />
</ikw:SimpleStackPanel>
</DockPanel>
<Border
@ -117,13 +88,13 @@
Grid.Column="0"
Background="{DynamicResource Color01B}">
<ListBox
Margin="5 0 7 10"
Margin="5 0 0 10"
Padding="0 0 7 0"
Background="{DynamicResource Color01B}"
FontSize="14"
ItemContainerStyle="{StaticResource PluginList}"
ItemContainerStyle="{DynamicResource PluginList}"
ItemsSource="{Binding Source={StaticResource PluginCollectionView}}"
Loaded="PluginListBox_Loaded"
ScrollViewer.CanContentScroll="False"
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
SnapsToDevicePixels="True"
Style="{DynamicResource PluginListStyle}"

View file

@ -4,9 +4,10 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:cc="clr-namespace:Flow.Launcher.Resources.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:ikw="http://schemas.inkore.net/lib/ui/wpf"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:ui="http://schemas.modernwpf.com/2019"
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
xmlns:viewModels="clr-namespace:Flow.Launcher.SettingPages.ViewModels"
Title="Proxy"
d:DataContext="{d:DesignInstance viewModels:SettingsPaneProxyViewModel}"
@ -16,14 +17,12 @@
<Page.Resources>
<ResourceDictionary Source="pack://application:,,,/Resources/SettingWindowStyle.xaml" />
</Page.Resources>
<ScrollViewer
Padding="5 0 24 0"
CanContentScroll="True"
<ui:ScrollViewerEx
FontSize="14"
VirtualizingStackPanel.IsVirtualizing="True"
VirtualizingStackPanel.ScrollUnit="Pixel">
<StackPanel>
<StackPanel Margin="5 0 24 0">
<TextBlock
Margin="0 23 0 10"
FontSize="30"
@ -31,50 +30,48 @@
Text="{DynamicResource proxy}"
TextAlignment="left" />
<cc:CardGroup>
<cc:Card Title="{DynamicResource enableProxy}" Type="First">
<ui:ToggleSwitch
IsOn="{Binding Settings.Proxy.Enabled}"
OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}" />
</cc:Card>
<ui:SettingsCard Header="{DynamicResource enableProxy}">
<ui:ToggleSwitch
IsOn="{Binding Settings.Proxy.Enabled}"
OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}" />
</ui:SettingsCard>
<cc:Card Title="{DynamicResource server}" Type="Middle">
<TextBox
Width="300"
IsEnabled="{Binding Settings.Proxy.Enabled}"
Text="{Binding Settings.Proxy.Server}" />
</cc:Card>
<ui:SettingsCard Margin="0 4 0 0" Header="{DynamicResource server}">
<TextBox
Width="300"
IsEnabled="{Binding Settings.Proxy.Enabled}"
Text="{Binding Settings.Proxy.Server}" />
</ui:SettingsCard>
<cc:Card Title="{DynamicResource port}" Type="Middle">
<TextBox
Width="100"
IsEnabled="{Binding Settings.Proxy.Enabled}"
Text="{Binding Settings.Proxy.Port, TargetNullValue={x:Static sys:String.Empty}}" />
</cc:Card>
<ui:SettingsCard Margin="0 4 0 0" Header="{DynamicResource port}">
<TextBox
Width="100"
IsEnabled="{Binding Settings.Proxy.Enabled}"
Text="{Binding Settings.Proxy.Port, TargetNullValue={x:Static sys:String.Empty}}" />
</ui:SettingsCard>
<cc:Card Title="{DynamicResource userName}" Type="Middle">
<TextBox
Width="200"
IsEnabled="{Binding Settings.Proxy.Enabled}"
Text="{Binding Settings.Proxy.UserName}" />
</cc:Card>
<ui:SettingsCard Margin="0 4 0 0" Header="{DynamicResource userName}">
<TextBox
Width="200"
IsEnabled="{Binding Settings.Proxy.Enabled}"
Text="{Binding Settings.Proxy.UserName}" />
</ui:SettingsCard>
<cc:Card Title="{DynamicResource password}" Type="Last">
<TextBox
Width="200"
IsEnabled="{Binding Settings.Proxy.Enabled}"
Text="{Binding Settings.Proxy.Password}" />
</cc:Card>
</cc:CardGroup>
<ui:SettingsCard Margin="0 4 0 0" Header="{DynamicResource password}">
<TextBox
Width="200"
IsEnabled="{Binding Settings.Proxy.Enabled}"
Text="{Binding Settings.Proxy.Password}" />
</ui:SettingsCard>
<cc:Card Title="{DynamicResource testProxy}" Margin="0 8 0 0">
<ui:SettingsCard Margin="0 14 0 0" Header="{DynamicResource testProxy}">
<Button
Width="150"
Command="{Binding TestProxyClickedCommand}"
Content="{DynamicResource testProxy}"
IsEnabled="{Binding Settings.Proxy.Enabled}" />
</cc:Card>
</ui:SettingsCard>
</StackPanel>
</ScrollViewer>
</ui:ScrollViewerEx>
</ui:Page>

View file

@ -6,8 +6,9 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:ext="clr-namespace:Flow.Launcher.Resources.MarkupExtensions"
xmlns:flowlauncher="clr-namespace:Flow.Launcher"
xmlns:ikw="http://schemas.inkore.net/lib/ui/wpf"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="http://schemas.modernwpf.com/2019"
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
xmlns:userSettings="clr-namespace:Flow.Launcher.Infrastructure.UserSettings;assembly=Flow.Launcher.Infrastructure"
xmlns:viewModels="clr-namespace:Flow.Launcher.SettingPages.ViewModels"
Title="Theme"
@ -23,9 +24,8 @@
<CollectionViewSource x:Key="SortedFonts" Source="{Binding Source={x:Static Fonts.SystemFontFamilies}}" />
</ResourceDictionary>
</ui:Page.Resources>
<ScrollViewer
<ui:ScrollViewerEx
Padding="6 0 24 0"
CanContentScroll="False"
FontSize="14"
VirtualizingStackPanel.IsVirtualizing="True"
VirtualizingStackPanel.ScrollUnit="Pixel">
@ -89,10 +89,8 @@
</Style.Triggers>
</Style>
</Border.Style>
<ScrollViewer
ScrollViewer.CanContentScroll="False"
VirtualizingStackPanel.IsVirtualizing="True"
VirtualizingStackPanel.ScrollUnit="Pixel">
<!-- We need to keep this ScrollViewerEx because its height cannot be expanded to the whole page -->
<ui:ScrollViewerEx>
<StackPanel>
<Slider
Name="WindowHeightValue"
@ -268,7 +266,7 @@
Content="{DynamicResource resetCustomize}"
ToolTip="{DynamicResource resetCustomizeToolTip}" />
</StackPanel>
</ScrollViewer>
</ui:ScrollViewerEx>
</Border>
<!-- Theme preview -->
@ -396,310 +394,323 @@
</Grid>
<!-- Theme -->
<cc:ExCard
<ui:SettingsExpander
x:Name="ThemeCard"
Title="{DynamicResource theme}"
Margin="0 8 0 0"
Icon="&#xe790;">
<cc:ExCard.SideContent>
<StackPanel VerticalAlignment="Center" Orientation="Horizontal">
<ui:PathIcon
Width="12"
Margin="0 1 8 0"
VerticalAlignment="Center"
Data="{DynamicResource circle_half_stroke_solid}"
ToolTip="{DynamicResource TypeIsDarkToolTip}"
ToolTipService.InitialShowDelay="0"
Visibility="{Binding SelectedTheme.IsDark, Converter={StaticResource BoolToVisibilityConverter}}" />
<ui:FontIcon
Margin="0 2 8 0"
VerticalAlignment="Center"
FontSize="12"
Glyph="&#xEB42;"
ToolTip="{DynamicResource TypeHasBlurToolTip}"
ToolTipService.InitialShowDelay="0"
Visibility="{Binding SelectedTheme.HasBlur, Converter={StaticResource BoolToVisibilityConverter}}" />
<TextBlock Text="{Binding SelectedTheme.Name}" />
</StackPanel>
</cc:ExCard.SideContent>
<ListBox
HorizontalAlignment="Stretch"
HorizontalContentAlignment="Stretch"
Background="Transparent"
ItemContainerStyle="{DynamicResource ThemeList}"
ItemsSource="{Binding Themes}"
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
ScrollViewer.VerticalScrollBarVisibility="Disabled"
SelectedValue="{Binding SelectedTheme}">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel />
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.ItemTemplate>
<DataTemplate>
<Grid
Width="Auto"
Height="34"
Margin="0"
Focusable="True">
<StackPanel Margin="14 2 14 0" Orientation="Horizontal">
<TextBlock
Margin="0 0 0 0"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Text="{Binding Name}"
TextWrapping="Wrap" />
<ui:PathIcon
Width="12"
Margin="8 1 0 0"
VerticalAlignment="Center"
Data="{DynamicResource circle_half_stroke_solid}"
ToolTip="{DynamicResource TypeIsDarkToolTip}"
ToolTipService.InitialShowDelay="0"
Visibility="{Binding IsDark, Converter={StaticResource BoolToVisibilityConverter}}" />
<ui:FontIcon
Margin="8 1 0 0"
VerticalAlignment="Center"
FontSize="12"
Glyph="&#xEB42;"
ToolTip="{DynamicResource TypeHasBlurToolTip}"
ToolTipService.InitialShowDelay="0"
Visibility="{Binding HasBlur, Converter={StaticResource BoolToVisibilityConverter}}" />
</StackPanel>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
<ListBox.Template>
<ControlTemplate>
<Border
Padding="18 12 18 12"
BorderBrush="{DynamicResource Color03B}"
BorderThickness="0 1 0 0">
<ItemsPresenter />
</Border>
</ControlTemplate>
</ListBox.Template>
</ListBox>
</cc:ExCard>
Header="{DynamicResource theme}">
<ui:SettingsExpander.HeaderIcon>
<ui:FontIcon Glyph="&#xe790;" />
</ui:SettingsExpander.HeaderIcon>
<cc:CardGroup Margin="0 10 0 0">
<!-- Backdrop effect -->
<cc:Card
Title="{DynamicResource BackdropType}"
Margin="0 0 0 0"
Icon="&#xeb42;"
Sub="{Binding BackdropSubText}"
Type="First">
<ComboBox
MinWidth="160"
<StackPanel VerticalAlignment="Center" Orientation="Horizontal">
<ui:PathIcon
Width="12"
Margin="0 1 8 0"
VerticalAlignment="Center"
DisplayMemberPath="Display"
FontSize="14"
IsEnabled="{Binding IsBackdropEnabled}"
ItemsSource="{Binding BackdropTypesList}"
SelectedValue="{Binding BackdropType, Mode=TwoWay}"
SelectedValuePath="Value" />
</cc:Card>
Data="{DynamicResource circle_half_stroke_solid}"
ToolTip="{DynamicResource TypeIsDarkToolTip}"
ToolTipService.InitialShowDelay="0"
Visibility="{Binding SelectedTheme.IsDark, Converter={StaticResource BoolToVisibilityConverter}}" />
<ui:FontIcon
Margin="0 2 8 0"
VerticalAlignment="Center"
FontSize="12"
Glyph="&#xEB42;"
ToolTip="{DynamicResource TypeHasBlurToolTip}"
ToolTipService.InitialShowDelay="0"
Visibility="{Binding SelectedTheme.HasBlur, Converter={StaticResource BoolToVisibilityConverter}}" />
<TextBlock Text="{Binding SelectedTheme.Name}" />
</StackPanel>
<!-- Drop shadow effect -->
<cc:Card
Title="{DynamicResource queryWindowShadowEffect}"
Margin="0 0 0 0"
Icon="&#xeb91;"
Type="Last">
<ui:ToggleSwitch
IsEnabled="{Binding IsDropShadowEnabled}"
IsOn="{Binding DropShadowEffect}"
OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}" />
</cc:Card>
</cc:CardGroup>
<cc:HyperLink
Margin="10"
<ui:SettingsExpander.ItemsHeader>
<StackPanel Background="{DynamicResource SettingsCardBackground}">
<ListBox
HorizontalAlignment="Stretch"
HorizontalContentAlignment="Stretch"
Background="Transparent"
ItemContainerStyle="{DynamicResource ThemeList}"
ItemsSource="{Binding Themes}"
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
ScrollViewer.VerticalScrollBarVisibility="Disabled"
SelectedValue="{Binding SelectedTheme, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Style="{DynamicResource ThemeListStyle}">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel />
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.ItemTemplate>
<DataTemplate>
<Grid
Width="Auto"
Height="34"
Margin="0"
Focusable="True">
<StackPanel Margin="14 2 14 0" Orientation="Horizontal">
<TextBlock
Margin="0 0 0 0"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Text="{Binding Name}"
TextWrapping="Wrap" />
<ui:PathIcon
Width="12"
Margin="8 1 0 0"
VerticalAlignment="Center"
Data="{DynamicResource circle_half_stroke_solid}"
ToolTip="{DynamicResource TypeIsDarkToolTip}"
ToolTipService.InitialShowDelay="0"
Visibility="{Binding IsDark, Converter={StaticResource BoolToVisibilityConverter}}" />
<ui:FontIcon
Margin="8 1 0 0"
VerticalAlignment="Center"
FontSize="12"
Glyph="&#xEB42;"
ToolTip="{DynamicResource TypeHasBlurToolTip}"
ToolTipService.InitialShowDelay="0"
Visibility="{Binding HasBlur, Converter={StaticResource BoolToVisibilityConverter}}" />
</StackPanel>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
<ListBox.Template>
<ControlTemplate>
<Border
Padding="18 12 18 12"
BorderBrush="{DynamicResource Color03B}"
BorderThickness="0 1 0 0">
<ItemsPresenter />
</Border>
</ControlTemplate>
</ListBox.Template>
</ListBox>
</StackPanel>
</ui:SettingsExpander.ItemsHeader>
</ui:SettingsExpander>
<!-- Backdrop effect -->
<ui:SettingsCard
Margin="0 10 0 0"
Description="{Binding BackdropSubText}"
Header="{DynamicResource BackdropType}">
<ui:SettingsCard.HeaderIcon>
<ui:FontIcon Glyph="&#xeb42;" />
</ui:SettingsCard.HeaderIcon>
<ComboBox
MinWidth="160"
VerticalAlignment="Center"
DisplayMemberPath="Display"
FontSize="14"
IsEnabled="{Binding IsBackdropEnabled}"
ItemsSource="{Binding BackdropTypesList}"
SelectedValue="{Binding BackdropType, Mode=TwoWay}"
SelectedValuePath="Value" />
</ui:SettingsCard>
<!-- Drop shadow effect -->
<ui:SettingsCard Margin="0 4 0 0" Header="{DynamicResource queryWindowShadowEffect}">
<ui:SettingsCard.HeaderIcon>
<ui:FontIcon Glyph="&#xeb91;" />
</ui:SettingsCard.HeaderIcon>
<ui:ToggleSwitch
IsEnabled="{Binding IsDropShadowEnabled}"
IsOn="{Binding DropShadowEffect}"
OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}" />
</ui:SettingsCard>
<ui:HyperlinkButton
Margin="0 10 0 10"
HorizontalAlignment="Right"
Text="{DynamicResource browserMoreThemes}"
Uri="{Binding LinkThemeGallery}" />
Content="{DynamicResource browserMoreThemes}"
NavigateUri="{Binding LinkThemeGallery}" />
<!-- Fixed size -->
<cc:ExCard
Title="{DynamicResource KeepMaxResults}"
<ui:SettingsExpander
Margin="0 20 0 0"
Icon="&#xE744;"
Sub="{DynamicResource KeepMaxResultsToolTip}">
<cc:ExCard.SideContent>
<StackPanel VerticalAlignment="Center" Orientation="Horizontal">
<ui:ToggleSwitch
IsOn="{Binding KeepMaxResults}"
OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}" />
</StackPanel>
</cc:ExCard.SideContent>
<cc:Card
Title="{DynamicResource maxShowResults}"
Sub="{DynamicResource maxShowResultsToolTip}"
Type="InsideFit">
<ComboBox
Width="100"
ItemsSource="{Binding MaxResultsRange}"
SelectedItem="{Binding Settings.MaxResultsToShow}" />
</cc:Card>
</cc:ExCard>
<cc:InfoBar
Description="{DynamicResource KeepMaxResultsToolTip}"
Header="{DynamicResource KeepMaxResults}">
<ui:SettingsExpander.HeaderIcon>
<ui:FontIcon Glyph="&#xE744;" />
</ui:SettingsExpander.HeaderIcon>
<StackPanel VerticalAlignment="Center" Orientation="Horizontal">
<ui:ToggleSwitch
IsOn="{Binding KeepMaxResults}"
OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}" />
</StackPanel>
<ui:SettingsExpander.Items>
<ui:SettingsCard Description="{DynamicResource maxShowResultsToolTip}" Header="{DynamicResource maxShowResults}">
<ComboBox
Width="100"
ItemsSource="{Binding MaxResultsRange}"
SelectedItem="{Binding Settings.MaxResultsToShow}" />
</ui:SettingsCard>
</ui:SettingsExpander.Items>
</ui:SettingsExpander>
<ui:InfoBar
Title=""
Margin="0 4 0 0"
Closable="False"
IsClosable="True"
IsIconVisible="True"
Length="Long"
IsOpen="{Binding Settings.AlwaysPreview, Mode=OneWay}"
Message="{DynamicResource MaxShowResultsCannotWorkWithAlwaysPreview}"
Type="Warning"
Visibility="{Binding Settings.AlwaysPreview, Converter={StaticResource BoolToVisibilityConverter}, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}" />
Severity="Warning" />
<!-- Time and date -->
<cc:CardGroup Margin="0 14 0 0">
<cc:Card
Title="{DynamicResource Clock}"
Icon="&#xec92;"
Type="First">
<StackPanel Orientation="Horizontal">
<TextBlock
VerticalAlignment="Center"
FontSize="14"
Foreground="{DynamicResource Color04B}"
Text="{Binding ClockText}" />
<ComboBox
MinWidth="180"
Margin="10 0 18 0"
VerticalAlignment="Center"
FontSize="14"
ItemsSource="{Binding TimeFormatList}"
SelectedItem="{Binding TimeFormat}" />
<ui:ToggleSwitch
IsOn="{Binding UseClock}"
OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}" />
</StackPanel>
</cc:Card>
<ui:SettingsCard Margin="0 14 0 0" Header="{DynamicResource Clock}">
<ui:SettingsCard.HeaderIcon>
<ui:FontIcon Glyph="&#xec92;" />
</ui:SettingsCard.HeaderIcon>
<cc:Card
Title="{DynamicResource Date}"
Icon="&#xe787;"
Type="Last">
<StackPanel Orientation="Horizontal">
<TextBlock
VerticalAlignment="Center"
FontSize="14"
Foreground="{DynamicResource Color04B}"
Text="{Binding DateText}" />
<ComboBox
MinWidth="180"
Margin="10 0 18 0"
VerticalAlignment="Center"
FontSize="14"
ItemsSource="{Binding DateFormatList}"
SelectedItem="{Binding DateFormat}" />
<ui:ToggleSwitch
IsOn="{Binding UseDate}"
OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}" />
</StackPanel>
</cc:Card>
</cc:CardGroup>
<StackPanel Orientation="Horizontal">
<TextBlock
VerticalAlignment="Center"
FontSize="14"
Foreground="{DynamicResource Color04B}"
Text="{Binding ClockText}" />
<ComboBox
MinWidth="180"
Margin="10 0 18 0"
VerticalAlignment="Center"
FontSize="14"
ItemsSource="{Binding TimeFormatList}"
SelectedItem="{Binding TimeFormat}" />
<ui:ToggleSwitch
IsOn="{Binding UseClock}"
OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}" />
</StackPanel>
</ui:SettingsCard>
<ui:SettingsCard Margin="0 4 0 0" Header="{DynamicResource Date}">
<ui:SettingsCard.HeaderIcon>
<ui:FontIcon Glyph="&#xe787;" />
</ui:SettingsCard.HeaderIcon>
<StackPanel Orientation="Horizontal">
<TextBlock
VerticalAlignment="Center"
FontSize="14"
Foreground="{DynamicResource Color04B}"
Text="{Binding DateText}" />
<ComboBox
MinWidth="180"
Margin="10 0 18 0"
VerticalAlignment="Center"
FontSize="14"
ItemsSource="{Binding DateFormatList}"
SelectedItem="{Binding DateFormat}" />
<ui:ToggleSwitch
IsOn="{Binding UseDate}"
OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}" />
</StackPanel>
</ui:SettingsCard>
<!-- Placeholder text -->
<cc:ExCard
Title="{DynamicResource ShowPlaceholder}"
<ui:SettingsExpander
Margin="0 4 0 0"
Icon="&#xea80;"
Sub="{DynamicResource ShowPlaceholderTip}">
<cc:ExCard.SideContent>
<ui:ToggleSwitch
IsOn="{Binding ShowPlaceholder}"
OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}" />
</cc:ExCard.SideContent>
<cc:Card
Title="{DynamicResource PlaceholderText}"
Sub="{Binding PlaceholderTextTip}"
Type="InsideFit">
<TextBox
MinWidth="150"
Text="{Binding PlaceholderText}"
TextWrapping="NoWrap" />
</cc:Card>
</cc:ExCard>
Description="{DynamicResource ShowPlaceholderTip}"
Header="{DynamicResource ShowPlaceholder}">
<ui:SettingsExpander.HeaderIcon>
<ui:FontIcon Glyph="&#xea80;" />
</ui:SettingsExpander.HeaderIcon>
<ui:ToggleSwitch
IsOn="{Binding ShowPlaceholder}"
OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}" />
<ui:SettingsExpander.Items>
<ui:SettingsCard Description="{Binding PlaceholderTextTip}" Header="{DynamicResource PlaceholderText}">
<TextBox
MinWidth="150"
Text="{Binding PlaceholderText}"
TextWrapping="NoWrap" />
</ui:SettingsCard>
</ui:SettingsExpander.Items>
</ui:SettingsExpander>
<!-- Animation -->
<cc:ExCard
Title="{DynamicResource Animation}"
<ui:SettingsExpander
Margin="0 18 0 0"
Icon="&#xedb5;"
Sub="{DynamicResource AnimationTip}">
<cc:ExCard.SideContent>
<ui:ToggleSwitch
IsOn="{Binding UseAnimation}"
OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}" />
</cc:ExCard.SideContent>
<cc:Card
Title="{DynamicResource AnimationSpeed}"
Sub="{DynamicResource AnimationSpeedTip}"
Type="InsideFit">
<StackPanel Orientation="Horizontal">
<ComboBox
MinWidth="160"
VerticalAlignment="Center"
DisplayMemberPath="Display"
FontSize="14"
ItemsSource="{Binding AnimationSpeeds}"
SelectedValue="{Binding Settings.AnimationSpeed}"
SelectedValuePath="Value" />
Description="{DynamicResource AnimationTip}"
Header="{DynamicResource Animation}">
<ui:SettingsExpander.HeaderIcon>
<ui:FontIcon Glyph="&#xedb5;" />
</ui:SettingsExpander.HeaderIcon>
<TextBox
MinWidth="80"
Margin="18 0 0 0"
Text="{Binding Settings.CustomAnimationLength}"
TextWrapping="NoWrap"
Visibility="{ext:VisibleWhen {Binding Settings.AnimationSpeed},
IsEqualTo={x:Static userSettings:AnimationSpeeds.Custom}}" />
</StackPanel>
</cc:Card>
</cc:ExCard>
<ui:ToggleSwitch
IsOn="{Binding UseAnimation}"
OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}" />
<ui:SettingsExpander.Items>
<ui:SettingsCard Description="{DynamicResource AnimationSpeedTip}" Header="{DynamicResource AnimationSpeed}">
<StackPanel Orientation="Horizontal">
<ComboBox
MinWidth="160"
VerticalAlignment="Center"
DisplayMemberPath="Display"
FontSize="14"
ItemsSource="{Binding AnimationSpeeds}"
SelectedValue="{Binding Settings.AnimationSpeed}"
SelectedValuePath="Value" />
<TextBox
MinWidth="80"
Margin="18 0 0 0"
Text="{Binding Settings.CustomAnimationLength}"
TextWrapping="NoWrap"
Visibility="{ext:VisibleWhen {Binding Settings.AnimationSpeed},
IsEqualTo={x:Static userSettings:AnimationSpeeds.Custom}}" />
</StackPanel>
</ui:SettingsCard>
</ui:SettingsExpander.Items>
</ui:SettingsExpander>
<!-- SFX -->
<cc:ExCard
Title="{DynamicResource SoundEffect}"
<ui:SettingsExpander
Margin="0 4 0 0"
Icon="&#xe7f5;"
Sub="{DynamicResource SoundEffectTip}">
<cc:ExCard.SideContent>
<ui:ToggleSwitch
IsOn="{Binding UseSound}"
OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}" />
</cc:ExCard.SideContent>
<cc:Card
Title="{DynamicResource SoundEffectVolume}"
IsEnabled="{Binding EnableVolumeAdjustment}"
Sub="{DynamicResource SoundEffectVolumeTip}"
Type="InsideFit">
<StackPanel Orientation="Horizontal">
<TextBlock
Margin="0 0 8 0"
VerticalAlignment="Center"
Text="{Binding SoundEffectVolume}" />
<Slider
Width="250"
VerticalAlignment="Center"
IsMoveToPointEnabled="True"
IsSnapToTickEnabled="True"
Maximum="100"
Minimum="0"
TickFrequency="1"
Value="{Binding SoundEffectVolume}" />
</StackPanel>
</cc:Card>
</cc:ExCard>
Description="{DynamicResource SoundEffectTip}"
Header="{DynamicResource SoundEffect}">
<ui:SettingsExpander.HeaderIcon>
<ui:FontIcon Glyph="&#xe7f5;" />
</ui:SettingsExpander.HeaderIcon>
<ui:ToggleSwitch
IsOn="{Binding UseSound}"
OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}" />
<ui:SettingsExpander.Items>
<ui:SettingsCard
Description="{DynamicResource SoundEffectVolumeTip}"
Header="{DynamicResource SoundEffectVolume}"
IsEnabled="{Binding EnableVolumeAdjustment}">
<StackPanel Orientation="Horizontal">
<TextBlock
Margin="0 0 8 0"
VerticalAlignment="Center"
Text="{Binding SoundEffectVolume}" />
<Slider
Width="250"
VerticalAlignment="Center"
IsMoveToPointEnabled="True"
IsSnapToTickEnabled="True"
Maximum="100"
Minimum="0"
TickFrequency="1"
Value="{Binding SoundEffectVolume}" />
</StackPanel>
</ui:SettingsCard>
</ui:SettingsExpander.Items>
</ui:SettingsExpander>
<!-- WMP warning -->
<Border
Name="WMPWarning"
Padding="0 10"
@ -736,42 +747,50 @@
</Border>
<!-- Fonts and icons -->
<cc:Card
Title="{DynamicResource useGlyphUI}"
<ui:SettingsCard
Margin="0 18 0 0"
Icon="&#xf6b8;"
Sub="{DynamicResource useGlyphUIEffect}">
Description="{DynamicResource useGlyphUIEffect}"
Header="{DynamicResource useGlyphUI}">
<ui:SettingsCard.HeaderIcon>
<ui:FontIcon Glyph="&#xf6b8;" />
</ui:SettingsCard.HeaderIcon>
<ui:ToggleSwitch
IsOn="{Binding UseGlyphIcons}"
OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}" />
</cc:Card>
</ui:SettingsCard>
<!-- Badges -->
<cc:ExCard
Title="{DynamicResource showBadges}"
<ui:SettingsExpander
Margin="0 4 0 0"
Icon="&#xEC1B;"
Sub="{DynamicResource showBadgesToolTip}">
<cc:ExCard.SideContent>
<ui:ToggleSwitch
IsOn="{Binding Settings.ShowBadges}"
OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}" />
</cc:ExCard.SideContent>
<cc:Card Title="{DynamicResource showBadgesGlobalOnly}" Type="InsideFit">
<ui:ToggleSwitch
IsOn="{Binding Settings.ShowBadgesGlobalOnly}"
OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}" />
</cc:Card>
</cc:ExCard>
Description="{DynamicResource showBadgesToolTip}"
Header="{DynamicResource showBadges}">
<ui:SettingsExpander.HeaderIcon>
<ui:FontIcon Glyph="&#xEC1B;" />
</ui:SettingsExpander.HeaderIcon>
<ui:ToggleSwitch
IsOn="{Binding Settings.ShowBadges}"
OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}" />
<ui:SettingsExpander.Items>
<ui:SettingsCard Header="{DynamicResource showBadgesGlobalOnly}">
<ui:ToggleSwitch
IsOn="{Binding Settings.ShowBadgesGlobalOnly}"
OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}" />
</ui:SettingsCard>
</ui:SettingsExpander.Items>
</ui:SettingsExpander>
<!-- Settings color scheme -->
<cc:Card
Title="{DynamicResource ColorScheme}"
Margin="0 14 0 0"
Icon="&#xe793;">
<ui:SettingsCard Margin="0 14 0 0" Header="{DynamicResource ColorScheme}">
<ui:SettingsCard.HeaderIcon>
<ui:FontIcon Glyph="&#xe793;" />
</ui:SettingsCard.HeaderIcon>
<ComboBox
MinWidth="180"
DisplayMemberPath="Display"
@ -779,25 +798,26 @@
ItemsSource="{Binding ColorSchemes}"
SelectedValue="{Binding ColorScheme, Mode=TwoWay}"
SelectedValuePath="Value" />
</cc:Card>
</ui:SettingsCard>
<!-- Theme folder -->
<cc:Card
Title="{DynamicResource ThemeFolder}"
Margin="0 14 0 0"
Icon="&#xe838;">
<ui:SettingsCard Margin="0 14 0 0" Header="{DynamicResource ThemeFolder}">
<ui:SettingsCard.HeaderIcon>
<ui:FontIcon Glyph="&#xe838;" />
</ui:SettingsCard.HeaderIcon>
<Button
MinWidth="180"
Command="{Binding OpenThemesFolderCommand}"
Content="{DynamicResource OpenThemeFolder}" />
</cc:Card>
</ui:SettingsCard>
<!-- How to create theme link -->
<cc:HyperLink
Margin="10 10 10 28"
<ui:HyperlinkButton
Margin="10 10 0 28"
HorizontalAlignment="Right"
Text="{DynamicResource howToCreateTheme}"
Uri="{Binding LinkHowToCreateTheme}" />
Content="{DynamicResource howToCreateTheme}"
NavigateUri="{Binding LinkHowToCreateTheme}" />
</StackPanel>
</ScrollViewer>
</ui:ScrollViewerEx>
</ui:Page>

View file

@ -4,7 +4,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="http://schemas.modernwpf.com/2019"
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
xmlns:vm="clr-namespace:Flow.Launcher.ViewModel"
Title="{DynamicResource flowlauncher_settings}"
Width="{Binding SettingWindowWidth, Mode=TwoWay}"
@ -266,8 +266,5 @@
</ui:NavigationView>
</Grid>
</Border>
</Grid>
</Window>

View file

@ -3,14 +3,13 @@ using System.ComponentModel;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Interop;
using CommunityToolkit.Mvvm.DependencyInjection;
using Flow.Launcher.Infrastructure;
using Flow.Launcher.Infrastructure.UserSettings;
using Flow.Launcher.Plugin.SharedModels;
using Flow.Launcher.SettingPages.Views;
using Flow.Launcher.ViewModel;
using ModernWpf.Controls;
using iNKORE.UI.WPF.Modern.Controls;
namespace Flow.Launcher;
@ -43,12 +42,6 @@ public partial class SettingWindow
{
RefreshMaximizeRestoreButton();
// Fix (workaround) for the window freezes after lock screen (Win+L) or sleep
// https://stackoverflow.com/questions/4951058/software-rendering-mode-wpf
HwndSource hwndSource = PresentationSource.FromVisual(this) as HwndSource;
HwndTarget hwndTarget = hwndSource.CompositionTarget;
hwndTarget.RenderMode = RenderMode.SoftwareOnly; // Must use software only render mode here
UpdatePositionAndState();
_viewModel.PropertyChanged += ViewModel_PropertyChanged;

View file

@ -1,7 +1,9 @@
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:cc="clr-namespace:Flow.Launcher.Resources.Controls;assembly=Flow.Launcher"
xmlns:system="clr-namespace:System;assembly=mscorlib"
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
xmlns:userSettings="clr-namespace:Flow.Launcher.Infrastructure.UserSettings;assembly=Flow.Launcher.Infrastructure">
<CornerRadius x:Key="ItemRadius">0</CornerRadius>
<Thickness x:Key="ItemMargin">0</Thickness>
@ -46,20 +48,20 @@
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
SnapsToDevicePixels="True">
<ScrollViewer
<ui:ScrollViewerEx
x:Name="PART_ContentHost"
Background="{TemplateBinding Background}"
Focusable="false"
HorizontalScrollBarVisibility="Hidden"
VerticalScrollBarVisibility="Hidden">
<ScrollViewer.ContentTemplate>
<ui:ScrollViewerEx.ContentTemplate>
<DataTemplate>
<Grid Background="{Binding Background, ElementName=PART_ContentHost}">
<ContentPresenter Content="{Binding Path=Content, ElementName=PART_ContentHost}" />
</Grid>
</DataTemplate>
</ScrollViewer.ContentTemplate>
</ScrollViewer>
</ui:ScrollViewerEx.ContentTemplate>
</ui:ScrollViewerEx>
</Border>
</ControlTemplate>
</Setter.Value>
@ -250,9 +252,12 @@
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ListBox">
<ScrollViewer Focusable="false" Template="{DynamicResource ScrollViewerControlTemplate}">
<ScrollViewer.Style>
<Style TargetType="ScrollViewer">
<cc:CustomScrollViewerEx
x:Name="ListBoxScrollViewer"
Focusable="False"
Template="{DynamicResource ScrollViewerControlTemplate}">
<cc:CustomScrollViewerEx.Style>
<Style TargetType="cc:CustomScrollViewerEx">
<Style.Triggers>
<Trigger Property="ComputedVerticalScrollBarVisibility" Value="Visible">
<Setter Property="Margin" Value="0 0 0 0" />
@ -264,9 +269,9 @@
</Trigger>
</Style.Triggers>
</Style>
</ScrollViewer.Style>
</cc:CustomScrollViewerEx.Style>
<VirtualizingStackPanel IsItemsHost="True" />
</ScrollViewer>
</cc:CustomScrollViewerEx>
</ControlTemplate>
</Setter.Value>
</Setter>

View file

@ -15,7 +15,7 @@
<Color x:Key="LightBG">#BFFAFAFA</Color>
<Color x:Key="DarkBG">#BFFAFAFA</Color>
<Thickness x:Key="ResultMargin">0 0 0 8</Thickness>
<Style
x:Key="ItemGlyph"
BasedOn="{StaticResource BaseGlyphStyle}"

View file

@ -6,7 +6,7 @@
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:m="http://schemas.modernwpf.com/2019"
xmlns:m="clr-namespace:iNKORE.UI.WPF.Modern.Markup;assembly=iNKORE.UI.WPF.Modern"
xmlns:system="clr-namespace:System;assembly=mscorlib">
<ResourceDictionary.MergedDictionaries>

View file

@ -33,7 +33,7 @@
x:Key="QueryBoxStyle"
BasedOn="{StaticResource BaseQueryBoxStyle}"
TargetType="{x:Type TextBox}">
<Setter Property="Padding" Value="0,0,50,0" />
<Setter Property="Padding" Value="0 0 50 0" />
<Setter Property="CaretBrush" Value="#336766" />
<Setter Property="Foreground" Value="#e7e9eb" />
<Setter Property="FontSize" Value="18" />
@ -44,7 +44,7 @@
x:Key="QuerySuggestionBoxStyle"
BasedOn="{StaticResource BaseQuerySuggestionBoxStyle}"
TargetType="{x:Type TextBox}">
<Setter Property="Padding" Value="0,0,50,0" />
<Setter Property="Padding" Value="0 0 50 0" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="Height" Value="38" />
<Setter Property="FontSize" Value="18" />
@ -90,7 +90,7 @@
TargetType="{x:Type Rectangle}">
<Setter Property="Fill" Value="#1e292f" />
<Setter Property="Height" Value="1" />
<Setter Property="Margin" Value="0,0,0,4" />
<Setter Property="Margin" Value="0 0 0 4" />
</Style>
<Style x:Key="HighlightStyle" />
<Style
@ -142,7 +142,7 @@
<Setter Property="Background" Value="Transparent" />
<Setter Property="Width" Value="32" />
<Setter Property="Height" Value="32" />
<Setter Property="Margin" Value="0,8,8,0" />
<Setter Property="Margin" Value="0 8 8 0" />
<Setter Property="HorizontalAlignment" Value="Right" />
</Style>
@ -169,7 +169,7 @@
x:Key="ClockPanel"
BasedOn="{StaticResource ClockPanel}"
TargetType="{x:Type StackPanel}">
<Setter Property="Margin" Value="0,0,54,0" />
<Setter Property="Margin" Value="0 0 54 0" />
</Style>
<Style
x:Key="ClockBox"
@ -188,7 +188,7 @@
BasedOn="{StaticResource BasePreviewBorderStyle}"
TargetType="{x:Type Border}">
<Setter Property="BorderBrush" Value="#1e292f" />
<Setter Property="Margin" Value="0,0,10,4" />
<Setter Property="Margin" Value="0 0 10 4" />
</Style>
<Style
x:Key="PreviewItemTitleStyle"

View file

@ -21,7 +21,7 @@
<Setter Property="Foreground" Value="#f8f8f2" />
<Setter Property="CaretBrush" Value="#ffb86c" />
<Setter Property="FontSize" Value="26" />
<Setter Property="Padding" Value="0,0,66,0" />
<Setter Property="Padding" Value="0 0 66 0" />
<Setter Property="Height" Value="42" />
</Style>
<Style
@ -30,7 +30,7 @@
TargetType="{x:Type TextBox}">
<Setter Property="Foreground" Value="#6272a4" />
<Setter Property="FontSize" Value="26" />
<Setter Property="Padding" Value="0,0,66,0" />
<Setter Property="Padding" Value="0 0 66 0" />
<Setter Property="Height" Value="42" />
</Style>
<Style
@ -143,7 +143,7 @@
TargetType="{x:Type Rectangle}">
<Setter Property="Fill" Value="#44475a" />
<Setter Property="Height" Value="1" />
<Setter Property="Margin" Value="12,0,12,6" />
<Setter Property="Margin" Value="12 0 12 6" />
</Style>
<Style
x:Key="SearchIconStyle"

View file

@ -69,7 +69,7 @@
TargetType="{x:Type Rectangle}">
<Setter Property="Fill" Value="#747881" />
<Setter Property="Height" Value="1" />
<Setter Property="Margin" Value="0,0,0,0" />
<Setter Property="Margin" Value="0 0 0 0" />
</Style>
<Style x:Key="HighlightStyle">
<Setter Property="Inline.FontWeight" Value="Bold" />
@ -122,7 +122,7 @@
<Setter Property="Background" Value="#686d77" />
<Setter Property="Width" Value="32" />
<Setter Property="Height" Value="32" />
<Setter Property="Margin" Value="0,8,8,0" />
<Setter Property="Margin" Value="0 8 8 0" />
<Setter Property="HorizontalAlignment" Value="Right" />
</Style>
@ -149,7 +149,7 @@
x:Key="ClockPanel"
BasedOn="{StaticResource ClockPanel}"
TargetType="{x:Type StackPanel}">
<Setter Property="Margin" Value="0,0,54,0" />
<Setter Property="Margin" Value="0 0 54 0" />
</Style>
<Style
x:Key="ClockBox"
@ -168,7 +168,7 @@
BasedOn="{StaticResource BasePreviewBorderStyle}"
TargetType="{x:Type Border}">
<Setter Property="BorderBrush" Value="#747881" />
<Setter Property="Margin" Value="0,0,10,0" />
<Setter Property="Margin" Value="0 0 10 0" />
</Style>
<Style x:Key="WindowRadius" TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="0" />

View file

@ -21,7 +21,7 @@
<Setter Property="CaretBrush" Value="#FFAA47" />
<Setter Property="FontSize" Value="26" />
<Setter Property="Height" Value="42" />
<Setter Property="Padding" Value="0,0,66,0" />
<Setter Property="Padding" Value="0 0 66 0" />
</Style>
<Style
x:Key="QuerySuggestionBoxStyle"
@ -30,7 +30,7 @@
<Setter Property="Foreground" Value="#798189" />
<Setter Property="FontSize" Value="26" />
<Setter Property="Height" Value="42" />
<Setter Property="Padding" Value="0,0,66,0" />
<Setter Property="Padding" Value="0 0 66 0" />
</Style>
<Style
x:Key="WindowBorderStyle"
@ -141,7 +141,7 @@
TargetType="{x:Type Rectangle}">
<Setter Property="Fill" Value="#3c454e" />
<Setter Property="Height" Value="1" />
<Setter Property="Margin" Value="0,0,0,8" />
<Setter Property="Margin" Value="0 0 0 8" />
</Style>
<Style
x:Key="SearchIconStyle"

View file

@ -6,7 +6,7 @@
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:m="http://schemas.modernwpf.com/2019"
xmlns:m="clr-namespace:iNKORE.UI.WPF.Modern.Markup;assembly=iNKORE.UI.WPF.Modern"
xmlns:system="clr-namespace:System;assembly=mscorlib">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/Themes/Base.xaml" />

View file

@ -6,7 +6,7 @@
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:m="http://schemas.modernwpf.com/2019"
xmlns:m="clr-namespace:iNKORE.UI.WPF.Modern.Markup;assembly=iNKORE.UI.WPF.Modern"
xmlns:system="clr-namespace:System;assembly=mscorlib">
<ResourceDictionary.MergedDictionaries>

View file

@ -23,8 +23,8 @@ using Flow.Launcher.Infrastructure.UserSettings;
using Flow.Launcher.Plugin;
using Flow.Launcher.Plugin.SharedCommands;
using Flow.Launcher.Storage;
using iNKORE.UI.WPF.Modern;
using Microsoft.VisualStudio.Threading;
using ModernWpf;
namespace Flow.Launcher.ViewModel
{

View file

@ -5,7 +5,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Flow.Launcher"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="http://schemas.modernwpf.com/2019"
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
xmlns:vm="clr-namespace:Flow.Launcher.ViewModel"
Name="FlowWelcomeWindow"
Title="{DynamicResource Welcome_Page1_Title}"
@ -82,10 +82,7 @@
<ui:Frame
x:Name="ContentFrame"
HorizontalAlignment="Stretch"
Loaded="ContentFrame_Loaded"
ScrollViewer.CanContentScroll="True"
ScrollViewer.HorizontalScrollBarVisibility="Visible"
ScrollViewer.VerticalScrollBarVisibility="Visible">
Loaded="ContentFrame_Loaded">
<ui:Frame.ContentTransitions>
<ui:TransitionCollection>
<ui:NavigationThemeTransition />

View file

@ -6,7 +6,7 @@ using CommunityToolkit.Mvvm.DependencyInjection;
using Flow.Launcher.Infrastructure.UserSettings;
using Flow.Launcher.Resources.Pages;
using Flow.Launcher.ViewModel;
using ModernWpf.Media.Animation;
using iNKORE.UI.WPF.Modern.Media.Animation;
namespace Flow.Launcher
{

View file

@ -26,6 +26,15 @@
"resolved": "6.9.3",
"contentHash": "1CUGgFdyECDKgi5HaUBhdv6k+VG9Iy4OCforGfHyar3xQXAJypZkzymgKtWj/4SPd6nSG0Qi7NH71qHrDSZLaA=="
},
"iNKORE.UI.WPF.Modern": {
"type": "Direct",
"requested": "[0.10.1, )",
"resolved": "0.10.1",
"contentHash": "nRYmBosiL+42eUpLbHeqP7qJqtp5EpzuIMZTpvq4mFV33VB/JjkFg1y82gk50pjkXlAQWDvRyrfSAmPR5AM+3g==",
"dependencies": {
"iNKORE.UI.WPF": "1.2.8"
}
},
"MdXaml": {
"type": "Direct",
"requested": "[1.27.0, )",
@ -126,12 +135,6 @@
"System.ValueTuple": "4.5.0"
}
},
"ModernWpfUI": {
"type": "Direct",
"requested": "[0.9.4, )",
"resolved": "0.9.4",
"contentHash": "HJ07Be9KOiGKGcMLz/AwY+84h3yGHRPuYpYXCE6h1yPtaFwGMWfanZ70jX7W5XWx8+Qk1vGox+WGKgxxsy6EHw=="
},
"PropertyChanged.Fody": {
"type": "Direct",
"requested": "[4.1.0, )",
@ -215,6 +218,11 @@
"resolved": "2.5.2",
"contentHash": "hp3gKmC/14+6eKLgv7Jd1Z7OV86lO+tNfOXr/stQbwmRhdQuXVSvrRAuAe7G5+lwhkov0XkqZ8/bn1PYWMx6eg=="
},
"iNKORE.UI.WPF": {
"type": "Transitive",
"resolved": "1.2.8",
"contentHash": "7b+z25JFdhGAfyJqlVIF0vLbmgsRvqDZMvhGPTz20gzQigDPMqVUOoCCKB5824GtYsjFCYNilmaowb+4yWATkQ=="
},
"InputSimulator": {
"type": "Transitive",
"resolved": "1.0.4",

View file

@ -5,7 +5,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:qa="clr-namespace:Flow.Launcher.Plugin.Explorer.Search.QuickAccessLinks"
xmlns:ui="http://schemas.modernwpf.com/2019"
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
xmlns:viewModels="clr-namespace:Flow.Launcher.Plugin.Explorer.ViewModels"
d:DataContext="{d:DesignInstance viewModels:SettingsViewModel}"
d:DesignHeight="450"
@ -19,7 +19,7 @@
<DataTemplate x:Key="ListViewActionKeywords" DataType="{x:Type viewModels:ActionKeywordModel}">
<Grid>
<TextBlock
Margin="0 5 0 0"
Margin="0 5 0 5"
IsEnabled="{Binding Enabled}"
Text="{Binding LocalizedDescription, Mode=OneTime}">
<TextBlock.Style>
@ -37,7 +37,7 @@
</TextBlock>
<TextBlock
Margin="250 5 0 0"
Margin="250 5 0 5"
IsEnabled="{Binding Enabled}"
Text="{Binding Keyword}">
<TextBlock.Style>
@ -54,7 +54,7 @@
</TextBlock.Style>
</TextBlock>
<TextBlock Margin="480 5 0 0">
<TextBlock Margin="480 5 0 5">
<TextBlock.Style>
<Style TargetType="{x:Type TextBlock}">
<Style.Triggers>
@ -103,7 +103,7 @@
ContentTemplate="{TemplateBinding HeaderTemplate}"
ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}"
DockPanel.Dock="Top"
FocusVisualStyle="{StaticResource ExpanderHeaderFocusVisual}"
FocusVisualStyle="{DynamicResource ExpanderHeaderFocusVisual}"
FontFamily="{TemplateBinding FontFamily}"
FontSize="{TemplateBinding FontSize}"
FontStretch="{TemplateBinding FontStretch}"
@ -628,11 +628,10 @@
Grid.Column="1"
Margin="{StaticResource SettingPanelItemLeftTopBottomMargin}"
VerticalAlignment="Center"
DisplayMemberPath="Display"
ItemsSource="{Binding AllEverythingSortOptions}"
SelectedValue="{Binding SelectedEverythingSortOption, Mode=TwoWay}"
SelectedValuePath="Value"
DisplayMemberPath="Display">
</ComboBox>
SelectedValuePath="Value" />
<TextBlock
Grid.Row="3"

View file

@ -4,7 +4,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="http://schemas.modernwpf.com/2019"
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
Title="{DynamicResource flowlauncher_plugin_program_suffixes}"
Width="600"
Background="{DynamicResource PopuBGColor}"

View file

@ -51,33 +51,42 @@
ItemsSource="{Binding Settings.SearchSources}"
MouseDoubleClick="MouseDoubleClickItem"
SelectedItem="{Binding Settings.SelectedSearchSource}"
SizeChanged="ListView_SizeChanged"
Style="{StaticResource {x:Static GridView.GridViewStyleKey}}">
<ListView.View>
<GridView>
<GridViewColumn Width="50">
<!-- Margin="0 4" is a workaround to set this TextBlock to vertially center -->
<GridViewColumn Width="45">
<GridViewColumn.CellTemplate>
<DataTemplate>
<Image
Width="20"
Height="20"
Margin="6 0 0 0"
Margin="6 4 0 4"
Source="{Binding Path=IconPath}" />
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
<GridViewColumn
Width="130"
DisplayMemberBinding="{Binding ActionKeyword}"
Header="{DynamicResource flowlauncher_plugin_websearch_action_keyword}" />
<GridViewColumn
Width="239"
DisplayMemberBinding="{Binding Title}"
Header="{DynamicResource flowlauncher_plugin_websearch_title}" />
<GridViewColumn Width="140" Header="{DynamicResource flowlauncher_plugin_websearch_enable}">
<!-- Margin="0 6" is a workaround to set this TextBlock to vertially center -->
<GridViewColumn Width="135" Header="{DynamicResource flowlauncher_plugin_websearch_action_keyword}">
<GridViewColumn.CellTemplate>
<DataTemplate>
<TextBlock>
<TextBlock Margin="0 6" Text="{Binding ActionKeyword}" />
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
<GridViewColumn Width="145" Header="{DynamicResource flowlauncher_plugin_websearch_title}">
<GridViewColumn.CellTemplate>
<DataTemplate>
<TextBlock Margin="0 6" Text="{Binding Title}" />
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
<GridViewColumn Width="112" Header="{DynamicResource flowlauncher_plugin_websearch_enable}">
<GridViewColumn.CellTemplate>
<DataTemplate>
<TextBlock Margin="0 6">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Setter Property="Text" Value="{DynamicResource flowlauncher_plugin_websearch_false}" />
@ -92,17 +101,16 @@
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
<GridViewColumn
Width="120"
Header="{DynamicResource flowlauncher_plugin_websearch_private_mode_label}">
<!-- CheckBox is vertially center by default -->
<GridViewColumn Width="123" Header="{DynamicResource flowlauncher_plugin_websearch_private_mode_label}">
<GridViewColumn.CellTemplate>
<DataTemplate>
<CheckBox
HorizontalAlignment="Center"
VerticalAlignment="Center"
IsChecked="{Binding IsPrivateMode}"
IsEnabled="False"
/>
IsEnabled="False" />
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>

View file

@ -140,5 +140,28 @@ namespace Flow.Launcher.Plugin.WebSearch
webSearch.ShowDialog();
}
}
private void ListView_SizeChanged(object sender, SizeChangedEventArgs e)
{
var listView = sender as ListView;
var gView = listView.View as GridView;
var workingWidth =
listView.ActualWidth - SystemParameters.VerticalScrollBarWidth; // take into account vertical scrollbar
if (workingWidth <= 0) return;
var col1 = 0.08;
var col2 = 0.24;
var col3 = 0.26;
var col4 = 0.20;
var col5 = 0.22;
gView.Columns[0].Width = workingWidth * col1;
gView.Columns[1].Width = workingWidth * col2;
gView.Columns[2].Width = workingWidth * col3;
gView.Columns[3].Width = workingWidth * col4;
gView.Columns[4].Width = workingWidth * col5;
}
}
}

View file

@ -388,19 +388,27 @@ Yes please, let us know in the [Q&A](https://github.com/Flow-Launcher/Flow.Launc
Our project localization is based on [Crowdin](https://crowdin.com). If you would like to change them, please go to https://crowdin.com/project/flow-launcher.
### WPF UI Library
Our UI library is using [iNKORE.UI.WPF.Modern](https://github.com/iNKORE-NET/UI.WPF.Modern).
<a href="https://docs.inkore.net/ui-wpf-modern/introduction">
<img src="https://github.com/iNKORE-NET/UI.WPF.Modern/blob/main/assets/images/banners/UI.WPF.Modern_Main_1280w.png?raw=true" alt="iNKORE.UI.WPF.Modern" width="400">
</a>
### New changes
All changes to flow are captured via pull requests. Some new changes will have been merged but still pending release, this means whilst a change may not exist in the current release, it may very well have been accepted and merged into the dev branch and available as a pre-release download. It is therefore a good idea that before you start to make changes, search through the open and closed pull requests to make sure the change you intend to make is not already done.
All changes to flow are captured via pull requests. Some new changes will have been merged but still pending release, this means while a change may not exist in the current release, it may very well have been accepted and merged into the dev branch and available as a pre-release download. It is therefore a good idea to search through the open and closed pull requests before you start to make changes to ensure the change you intend to make is not already done.
Each of the pull requests will be marked with a milestone indicating the planned release version for the change.
### Contributing
Contributions are very welcome, in addition to the main project(C#) there are also [documentation](https://github.com/Flow-Launcher/docs)(md), [website](https://github.com/Flow-Launcher/flow-launcher.github.io)(html/css) and [others](https://github.com/Flow-Launcher) that can be contributed to. If you are unsure of a change you want to make, let us know in the [Discussions](https://github.com/Flow-Launcher/Flow.Launcher/discussions/categories/ideas), otherwise feel free to put in a pull request.
Contributions are very welcome, in addition to the main project (C#) there are also [documentation](https://github.com/Flow-Launcher/docs) (md), [website](https://github.com/Flow-Launcher/flow-launcher.github.io) (html/css) and [others](https://github.com/Flow-Launcher) that can be contributed to. If you are unsure of a change you want to make, let us know in the [Discussions](https://github.com/Flow-Launcher/Flow.Launcher/discussions/categories/ideas), otherwise feel free to submit a pull request.
You will find the main goals of flow placed under the [Projects board](https://github.com/orgs/Flow-Launcher/projects/4), so feel free to contribute on that. If you would like to make small incremental changes, feel free to do so as well.
Get in touch if you like to join the Flow-Launcher Team and help build this great tool.
Get in touch if you would like to join the Flow-Launcher Team and help build this great tool.
### Developing/Debugging