mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
- Add Pages
This commit is contained in:
parent
a140b118e5
commit
b4570e9aaa
22 changed files with 3235 additions and 3085 deletions
|
|
@ -111,10 +111,6 @@
|
|||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="SettingPages\Views\" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="PreBuild" BeforeTargets="PreBuildEvent">
|
||||
<Exec Command="taskkill /f /fi "IMAGENAME eq Flow.Launcher.exe"" />
|
||||
</Target>
|
||||
|
|
|
|||
|
|
@ -20,6 +20,10 @@
|
|||
</CollectionViewSource.GroupDescriptions>
|
||||
</CollectionViewSource>
|
||||
|
||||
<Style x:Key="SettingPageBasic" TargetType="{x:Type ui:Page}">
|
||||
<Setter Property="FontSize" Value="14" />
|
||||
</Style>
|
||||
|
||||
<Style x:Key="StoreItemFocusVisualStyleKey">
|
||||
<Setter Property="Control.Template">
|
||||
<Setter.Value>
|
||||
|
|
|
|||
|
|
@ -1,19 +0,0 @@
|
|||
<ui:Page
|
||||
x:Class="Flow.Launcher.SettingPages.Views.About"
|
||||
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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:ui="http://schemas.modernwpf.com/2019"
|
||||
Title="About"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
mc:Ignorable="d">
|
||||
<Page.Resources>
|
||||
<ResourceDictionary>
|
||||
<CollectionViewSource x:Key="SortedFonts" Source="{Binding Source={x:Static Fonts.SystemFontFamilies}}" />
|
||||
</ResourceDictionary>
|
||||
</Page.Resources>
|
||||
|
||||
<Grid />
|
||||
</ui:Page>
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Windows;
|
||||
using System.Windows.Forms;
|
||||
using System.Windows.Navigation;
|
||||
using Flow.Launcher.Core.Plugin;
|
||||
using Flow.Launcher.Infrastructure.UserSettings;
|
||||
using Flow.Launcher.Plugin;
|
||||
using Flow.Launcher.SettingPages.ViewModels;
|
||||
using Flow.Launcher.ViewModel;
|
||||
using MessageBox = System.Windows.Forms.MessageBox;
|
||||
using Path = System.IO.Path;
|
||||
|
||||
namespace Flow.Launcher.SettingPages.Views
|
||||
{
|
||||
public partial class General
|
||||
{
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -14,13 +14,60 @@ using Flow.Launcher.Infrastructure.UserSettings;
|
|||
using Flow.Launcher.Plugin;
|
||||
using Flow.Launcher.Plugin.SharedModels;
|
||||
using static Flow.Launcher.SettingPages.ViewModels.GeneralViewModel;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
using Flow.Launcher.Core;
|
||||
using Flow.Launcher.Core.Configuration;
|
||||
using Flow.Launcher.Core.Plugin;
|
||||
using Flow.Launcher.Helper;
|
||||
using Flow.Launcher.Core.Resource;
|
||||
using Flow.Launcher.Infrastructure.UserSettings;
|
||||
using Flow.Launcher.Plugin;
|
||||
using Flow.Launcher.Plugin.SharedModels;
|
||||
|
||||
namespace Flow.Launcher.SettingPages.ViewModels
|
||||
{
|
||||
public partial class GeneralViewModel
|
||||
{
|
||||
|
||||
public Settings Settings { get; set; }
|
||||
private readonly Updater _updater;
|
||||
private readonly IPortable _portable;
|
||||
|
||||
public GeneralViewModel(Settings settings)
|
||||
{
|
||||
Settings = settings;
|
||||
}
|
||||
|
||||
public class SearchWindowScreen
|
||||
{
|
||||
public string Display { get; set; }
|
||||
public SearchWindowScreens Value { get; set; }
|
||||
}
|
||||
|
||||
private Internationalization _translater => InternationalizationManager.Instance;
|
||||
public List<SearchWindowScreen> SearchWindowScreens
|
||||
{
|
||||
get
|
||||
{
|
||||
List<SearchWindowScreen> modes = new List<SearchWindowScreen>();
|
||||
var enums = (SearchWindowScreens[])Enum.GetValues(typeof(SearchWindowScreens));
|
||||
foreach (var e in enums)
|
||||
{
|
||||
var key = $"SearchWindowScreen{e}";
|
||||
var display = _translater.GetTranslation(key);
|
||||
var m = new SearchWindowScreen { Display = display, Value = e, };
|
||||
modes.Add(m);
|
||||
}
|
||||
|
||||
return modes;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
232
Flow.Launcher/SettingPages/Views/About.xaml
Normal file
232
Flow.Launcher/SettingPages/Views/About.xaml
Normal file
|
|
@ -0,0 +1,232 @@
|
|||
<ui:Page
|
||||
x:Class="Flow.Launcher.SettingPages.Views.About"
|
||||
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.SettingPages.Views"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:ui="http://schemas.modernwpf.com/2019"
|
||||
Title="About"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
mc:Ignorable="d">
|
||||
<ui:Page.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/Resources/SettingWindowStyle.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<CollectionViewSource x:Key="SortedFonts" Source="{Binding Source={x:Static Fonts.SystemFontFamilies}}" />
|
||||
</ResourceDictionary>
|
||||
</ui:Page.Resources>
|
||||
<ScrollViewer
|
||||
Margin="0,0,0,0"
|
||||
Background="{DynamicResource Color01B}"
|
||||
ScrollViewer.CanContentScroll="True"
|
||||
VirtualizingStackPanel.IsVirtualizing="True"
|
||||
VirtualizingStackPanel.ScrollUnit="Pixel">
|
||||
<StackPanel Margin="5,14,25,30" Orientation="Vertical">
|
||||
<TextBlock
|
||||
Grid.Row="2"
|
||||
Margin="0,5,0,5"
|
||||
FontSize="30"
|
||||
Style="{DynamicResource PageTitle}"
|
||||
Text="{DynamicResource about}"
|
||||
TextAlignment="left" />
|
||||
|
||||
|
||||
<Border Margin="0,9,0,0" Style="{DynamicResource SettingGroupBox}">
|
||||
<ItemsControl Style="{StaticResource SettingGrid}">
|
||||
<StackPanel Style="{StaticResource TextPanel}">
|
||||
<TextBlock
|
||||
Grid.Column="1"
|
||||
VerticalAlignment="Center"
|
||||
FontWeight="Bold"
|
||||
Style="{DynamicResource SettingTitleLabel}"
|
||||
Text="{Binding Version}" />
|
||||
<TextBlock Style="{DynamicResource SettingSubTitleLabel}" Text="{DynamicResource version}" />
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Column="2" Orientation="Horizontal">
|
||||
<Button
|
||||
Margin="0,0,10,0"
|
||||
HorizontalAlignment="Right"
|
||||
Content="{DynamicResource checkUpdates}" />
|
||||
<Button
|
||||
Margin="0,0,14,0"
|
||||
Padding="0"
|
||||
HorizontalAlignment="Right"
|
||||
Style="{StaticResource AccentButtonStyle}">
|
||||
<Hyperlink
|
||||
NavigateUri="{Binding SponsorPage, Mode=OneWay}"
|
||||
RequestNavigate="OnRequestNavigate"
|
||||
TextDecorations="None">
|
||||
<TextBlock
|
||||
Padding="10,5,10,5"
|
||||
Foreground="White"
|
||||
Text="{DynamicResource BecomeASponsor}" />
|
||||
</Hyperlink>
|
||||
</Button>
|
||||
|
||||
</StackPanel>
|
||||
<TextBlock Style="{StaticResource Glyph}">
|
||||

|
||||
</TextBlock>
|
||||
</ItemsControl>
|
||||
</Border>
|
||||
|
||||
<Border Height="62" Style="{DynamicResource SettingGroupBox}">
|
||||
<ItemsControl Style="{StaticResource SettingGrid}">
|
||||
<StackPanel Style="{StaticResource TextPanel}">
|
||||
<TextBlock Style="{DynamicResource SettingTitleLabel}" Text="{DynamicResource releaseNotes}" />
|
||||
</StackPanel>
|
||||
<TextBlock
|
||||
Margin="0,0,-12,0"
|
||||
VerticalAlignment="Center"
|
||||
Style="{StaticResource SideTextAbout}">
|
||||
<Hyperlink NavigateUri="{Binding ReleaseNotes, Mode=OneWay}" RequestNavigate="OnRequestNavigate">
|
||||
<Run Text="{DynamicResource releaseNotes}" />
|
||||
</Hyperlink>
|
||||
</TextBlock>
|
||||
<TextBlock Style="{StaticResource Glyph}">
|
||||

|
||||
</TextBlock>
|
||||
</ItemsControl>
|
||||
</Border>
|
||||
|
||||
<Border
|
||||
Height="62"
|
||||
Margin="0,14,0,0"
|
||||
Style="{DynamicResource SettingGroupBox}">
|
||||
<ItemsControl Style="{StaticResource SettingGrid}">
|
||||
<StackPanel Style="{StaticResource TextPanel}">
|
||||
<TextBlock Style="{DynamicResource SettingTitleLabel}" Text="{DynamicResource website}" />
|
||||
</StackPanel>
|
||||
<StackPanel
|
||||
Grid.Column="2"
|
||||
Margin="0,0,18,0"
|
||||
VerticalAlignment="Center"
|
||||
Orientation="Horizontal">
|
||||
<TextBlock Margin="0,0,12,0">
|
||||
<Hyperlink NavigateUri="{Binding Website, Mode=OneWay}" RequestNavigate="OnRequestNavigate">
|
||||
<Run Text="{DynamicResource website}" />
|
||||
</Hyperlink>
|
||||
</TextBlock>
|
||||
<TextBlock>
|
||||
<Hyperlink NavigateUri="{Binding Github, Mode=OneWay}" RequestNavigate="OnRequestNavigate">
|
||||
<Run Text="{DynamicResource github}" />
|
||||
</Hyperlink>
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
<TextBlock Style="{StaticResource Glyph}">
|
||||

|
||||
</TextBlock>
|
||||
</ItemsControl>
|
||||
</Border>
|
||||
|
||||
<Border Height="62" Style="{DynamicResource SettingGroupBox}">
|
||||
<ItemsControl Style="{StaticResource SettingGrid}">
|
||||
<StackPanel Style="{StaticResource TextPanel}">
|
||||
<TextBlock Style="{DynamicResource SettingTitleLabel}" Text="{DynamicResource documentation}" />
|
||||
</StackPanel>
|
||||
<StackPanel
|
||||
Grid.Column="2"
|
||||
Margin="0,0,18,0"
|
||||
VerticalAlignment="Center"
|
||||
Orientation="Horizontal">
|
||||
<TextBlock Margin="0,0,12,0">
|
||||
<Hyperlink NavigateUri="{Binding Documentation, Mode=OneWay}" RequestNavigate="OnRequestNavigate">
|
||||
<Run Text="{DynamicResource documentation}" />
|
||||
</Hyperlink>
|
||||
</TextBlock>
|
||||
<TextBlock>
|
||||
<Hyperlink NavigateUri="{Binding Docs, Mode=OneWay}" RequestNavigate="OnRequestNavigate">
|
||||
<Run Text="{DynamicResource docs}" />
|
||||
</Hyperlink>
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
<TextBlock Style="{StaticResource Glyph}">
|
||||

|
||||
</TextBlock>
|
||||
</ItemsControl>
|
||||
</Border>
|
||||
|
||||
<Border
|
||||
Height="62"
|
||||
Margin="0,14,0,0"
|
||||
Style="{DynamicResource SettingGroupBox}">
|
||||
<ItemsControl Style="{StaticResource SettingGrid}">
|
||||
<StackPanel Style="{StaticResource TextPanel}">
|
||||
<TextBlock Style="{DynamicResource SettingTitleLabel}" Text="{DynamicResource icons}" />
|
||||
</StackPanel>
|
||||
<TextBlock
|
||||
Margin="0,0,-12,0"
|
||||
VerticalAlignment="Center"
|
||||
Style="{StaticResource SideTextAbout}">
|
||||
<Hyperlink NavigateUri="https://icons8.com" RequestNavigate="OnRequestNavigate">
|
||||
<Run Text="icons8.com" />
|
||||
</Hyperlink>
|
||||
|
||||
</TextBlock>
|
||||
<TextBlock Style="{StaticResource Glyph}">
|
||||

|
||||
</TextBlock>
|
||||
</ItemsControl>
|
||||
</Border>
|
||||
|
||||
<Border Style="{DynamicResource SettingGroupBox}">
|
||||
<ItemsControl Style="{StaticResource SettingGrid}">
|
||||
<StackPanel Style="{StaticResource TextPanel}">
|
||||
<TextBlock Style="{DynamicResource SettingTitleLabel}" Text="{DynamicResource devtool}" />
|
||||
</StackPanel>
|
||||
<StackPanel
|
||||
Grid.Column="1"
|
||||
Margin="0,0,-20,0"
|
||||
HorizontalAlignment="Right"
|
||||
Orientation="Horizontal">
|
||||
<Button
|
||||
Name="ClearLogFolderBtn"
|
||||
Margin="0,0,12,0"
|
||||
Content="{Binding CheckLogFolder, Mode=OneWay}" />
|
||||
<Button
|
||||
Margin="0,0,8,0"
|
||||
Content=""
|
||||
FontFamily="/Resources/#Segoe Fluent Icons"
|
||||
FontSize="20">
|
||||
<ui:FlyoutService.Flyout>
|
||||
<ui:MenuFlyout>
|
||||
<MenuItem Header="{DynamicResource welcomewindow}">
|
||||
<MenuItem.Icon>
|
||||
<ui:FontIcon Glyph="" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Header="{DynamicResource settingfolder}">
|
||||
<MenuItem.Icon>
|
||||
<ui:FontIcon Glyph="" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Header="{DynamicResource logfolder}">
|
||||
<MenuItem.Icon>
|
||||
<ui:FontIcon Glyph="" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
</ui:MenuFlyout>
|
||||
</ui:FlyoutService.Flyout>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
<TextBlock Style="{StaticResource Glyph}">
|
||||

|
||||
</TextBlock>
|
||||
</ItemsControl>
|
||||
</Border>
|
||||
|
||||
<TextBlock
|
||||
Margin="14,20,0,0"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Bottom"
|
||||
DockPanel.Dock="Bottom"
|
||||
FontSize="12"
|
||||
Foreground="{DynamicResource Color15B}"
|
||||
Text="{Binding ActivatedTimes, Mode=OneWay}"
|
||||
TextWrapping="WrapWithOverflow" />
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</ui:Page>
|
||||
37
Flow.Launcher/SettingPages/Views/About.xaml.cs
Normal file
37
Flow.Launcher/SettingPages/Views/About.xaml.cs
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using System.Windows;
|
||||
using System.Windows.Navigation;
|
||||
using Flow.Launcher.Core.Plugin;
|
||||
using Flow.Launcher.Infrastructure;
|
||||
using Flow.Launcher.Infrastructure.UserSettings;
|
||||
using Path = System.IO.Path;
|
||||
|
||||
namespace Flow.Launcher.SettingPages.Views
|
||||
{
|
||||
|
||||
public partial class About
|
||||
{
|
||||
public About()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
private void OnRequestNavigate(object sender, RequestNavigateEventArgs e)
|
||||
{
|
||||
//API.OpenUrl(e.Uri.AbsoluteUri);
|
||||
e.Handled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
517
Flow.Launcher/SettingPages/Views/General.xaml
Normal file
517
Flow.Launcher/SettingPages/Views/General.xaml
Normal file
|
|
@ -0,0 +1,517 @@
|
|||
<ui:Page
|
||||
x:Class="Flow.Launcher.SettingPages.Views.General"
|
||||
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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:ui="http://schemas.modernwpf.com/2019"
|
||||
xmlns:userSettings="clr-namespace:Flow.Launcher.Infrastructure.UserSettings;assembly=Flow.Launcher.Infrastructure"
|
||||
Title="General"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
Style="{DynamicResource SettingPageBasic}"
|
||||
mc:Ignorable="d">
|
||||
<Page.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/Resources/SettingWindowStyle.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<CollectionViewSource x:Key="SortedFonts" Source="{Binding Source={x:Static Fonts.SystemFontFamilies}}" />
|
||||
</ResourceDictionary>
|
||||
</Page.Resources>
|
||||
<ScrollViewer
|
||||
Margin="0,0,0,0"
|
||||
Background="{DynamicResource Color01B}"
|
||||
CanContentScroll="False"
|
||||
VirtualizingPanel.ScrollUnit="Pixel"
|
||||
VirtualizingStackPanel.IsVirtualizing="True">
|
||||
<VirtualizingStackPanel Margin="5,18,25,30" Orientation="Vertical">
|
||||
<TextBlock
|
||||
Grid.Row="2"
|
||||
Margin="0,5,0,5"
|
||||
FontSize="30"
|
||||
Style="{StaticResource PageTitle}"
|
||||
Text="{DynamicResource general}"
|
||||
TextAlignment="left" />
|
||||
|
||||
<Border Style="{DynamicResource SettingGroupBox}">
|
||||
<ItemsControl Style="{StaticResource SettingGrid}">
|
||||
<StackPanel Style="{StaticResource TextPanel}">
|
||||
<TextBlock Style="{DynamicResource SettingTitleLabel}" Text="{DynamicResource startFlowLauncherOnSystemStartup}" />
|
||||
</StackPanel>
|
||||
<ui:ToggleSwitch
|
||||
Grid.Column="2"
|
||||
FocusVisualMargin="5"
|
||||
IsOn="{Binding StartFlowLauncherOnSystemStartup}"
|
||||
Style="{DynamicResource SideToggleSwitch}" />
|
||||
<TextBlock Style="{StaticResource Glyph}">
|
||||

|
||||
</TextBlock>
|
||||
</ItemsControl>
|
||||
</Border>
|
||||
|
||||
<Border Style="{DynamicResource SettingGroupBox}">
|
||||
<ItemsControl Style="{StaticResource SettingGrid}">
|
||||
<StackPanel Style="{StaticResource TextPanel}">
|
||||
<TextBlock Style="{DynamicResource SettingTitleLabel}" Text="{DynamicResource hideOnStartup}" />
|
||||
</StackPanel>
|
||||
<ui:ToggleSwitch
|
||||
Grid.Column="2"
|
||||
FocusVisualMargin="5"
|
||||
IsOn="{Binding Settings.HideOnStartup}"
|
||||
Style="{DynamicResource SideToggleSwitch}" />
|
||||
<TextBlock Style="{StaticResource Glyph}">
|
||||

|
||||
</TextBlock>
|
||||
</ItemsControl>
|
||||
</Border>
|
||||
|
||||
<Border Margin="0,30,0,0" Style="{DynamicResource SettingGroupBox}">
|
||||
<ItemsControl Style="{StaticResource SettingGrid}">
|
||||
<StackPanel Style="{StaticResource TextPanel}">
|
||||
<TextBlock Style="{DynamicResource SettingTitleLabel}" Text="{DynamicResource hideFlowLauncherWhenLoseFocus}" />
|
||||
</StackPanel>
|
||||
<ui:ToggleSwitch
|
||||
Grid.Column="2"
|
||||
FocusVisualMargin="5"
|
||||
IsOn="{Binding Settings.HideWhenDeactivated}"
|
||||
Style="{DynamicResource SideToggleSwitch}" />
|
||||
</ItemsControl>
|
||||
</Border>
|
||||
|
||||
|
||||
<Border Style="{DynamicResource SettingGroupBox}">
|
||||
<ItemsControl Style="{StaticResource SettingGrid}">
|
||||
<StackPanel Style="{StaticResource TextPanel}">
|
||||
<TextBlock Style="{DynamicResource SettingTitleLabel}" Text="{DynamicResource hideNotifyIcon}" />
|
||||
<TextBlock Style="{DynamicResource SettingSubTitleLabel}" Text="{DynamicResource hideNotifyIconToolTip}" />
|
||||
</StackPanel>
|
||||
<ui:ToggleSwitch
|
||||
Grid.Column="2"
|
||||
FocusVisualMargin="5"
|
||||
IsOn="{Binding Settings.HideNotifyIcon}"
|
||||
Style="{DynamicResource SideToggleSwitch}" />
|
||||
</ItemsControl>
|
||||
</Border>
|
||||
|
||||
<Border
|
||||
Margin="0,30,0,0"
|
||||
Padding="0"
|
||||
Style="{DynamicResource SettingGroupBox}">
|
||||
<StackPanel Orientation="Vertical">
|
||||
<Border
|
||||
Margin="0"
|
||||
BorderThickness="0"
|
||||
Style="{DynamicResource SettingGroupBox}">
|
||||
<ItemsControl Style="{StaticResource SettingGrid}">
|
||||
<StackPanel Style="{StaticResource TextPanel}">
|
||||
<TextBlock Style="{DynamicResource SettingTitleLabel}" Text="{DynamicResource SearchWindowPosition}" />
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Column="2" Orientation="Horizontal">
|
||||
<ComboBox
|
||||
x:Name="SearchWindowScreen"
|
||||
MinWidth="220"
|
||||
Margin="0,0,18,0"
|
||||
VerticalAlignment="Center"
|
||||
DisplayMemberPath="Display"
|
||||
FontSize="14"
|
||||
ItemsSource="{Binding SearchWindowScreens}"
|
||||
SelectedValue="{Binding Settings.SearchWindowScreen}"
|
||||
SelectedValuePath="Value" />
|
||||
<ComboBox
|
||||
x:Name="SelectScreen"
|
||||
MinWidth="160"
|
||||
Margin="0,0,18,0"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="14"
|
||||
ItemsSource="{Binding ScreenNumbers}"
|
||||
SelectedValue="{Binding Settings.CustomScreenNumber}">
|
||||
<ComboBox.Style>
|
||||
<Style BasedOn="{StaticResource DefaultComboBoxStyle}" TargetType="ComboBox">
|
||||
<Setter Property="Visibility" Value="Collapsed" />
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding ElementName=SearchWindowScreen, Path=SelectedValue}" Value="{x:Static userSettings:SearchWindowScreens.Custom}">
|
||||
<Setter Property="Visibility" Value="Visible" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</ComboBox.Style>
|
||||
</ComboBox>
|
||||
</StackPanel>
|
||||
<TextBlock Style="{StaticResource Glyph}">
|
||||

|
||||
</TextBlock>
|
||||
</ItemsControl>
|
||||
</Border>
|
||||
|
||||
<Separator Width="Auto" BorderThickness="1">
|
||||
<Separator.Style>
|
||||
<Style BasedOn="{StaticResource SettingSeparatorStyle}" TargetType="Separator">
|
||||
<Setter Property="Visibility" Value="Visible" />
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding ElementName=SearchWindowScreen, Path=SelectedValue}" Value="{x:Static userSettings:SearchWindowScreens.RememberLastLaunchLocation}">
|
||||
<Setter Property="Visibility" Value="Collapsed" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Separator.Style>
|
||||
</Separator>
|
||||
|
||||
<Border Margin="0" BorderThickness="0">
|
||||
<Border.Style>
|
||||
<Style BasedOn="{StaticResource SettingGroupBox}" TargetType="Border">
|
||||
<Setter Property="Visibility" Value="Visible" />
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding ElementName=SearchWindowScreen, Path=SelectedValue}" Value="{x:Static userSettings:SearchWindowScreens.RememberLastLaunchLocation}">
|
||||
<Setter Property="Visibility" Value="Collapsed" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Border.Style>
|
||||
|
||||
<ItemsControl Style="{StaticResource SettingGrid}">
|
||||
<StackPanel Style="{StaticResource TextPanel}">
|
||||
<TextBlock Style="{DynamicResource SettingTitleLabel}" Text="{DynamicResource SearchWindowAlign}" />
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Column="2" Orientation="Horizontal">
|
||||
<ComboBox
|
||||
x:Name="SearchWindowPosition"
|
||||
MinWidth="160"
|
||||
Margin="0,0,18,0"
|
||||
VerticalAlignment="Center"
|
||||
DisplayMemberPath="Display"
|
||||
FontSize="14"
|
||||
ItemsSource="{Binding SearchWindowAligns}"
|
||||
SelectedValue="{Binding Settings.SearchWindowAlign}"
|
||||
SelectedValuePath="Value" />
|
||||
<StackPanel Margin="0,0,18,0" Orientation="Horizontal">
|
||||
<StackPanel.Style>
|
||||
<Style TargetType="StackPanel">
|
||||
<Setter Property="Visibility" Value="Collapsed" />
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding ElementName=SearchWindowPosition, Path=SelectedValue}" Value="{x:Static userSettings:SearchWindowAligns.Custom}">
|
||||
<Setter Property="Visibility" Value="Visible" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</StackPanel.Style>
|
||||
<TextBox
|
||||
Height="35"
|
||||
MinWidth="80"
|
||||
Text="{Binding Settings.CustomWindowLeft}"
|
||||
TextWrapping="NoWrap" />
|
||||
<TextBlock
|
||||
Margin="10"
|
||||
VerticalAlignment="Center"
|
||||
Foreground="{DynamicResource Color05B}"
|
||||
Text="x" />
|
||||
<TextBox
|
||||
Height="35"
|
||||
MinWidth="80"
|
||||
Text="{Binding Settings.CustomWindowTop}"
|
||||
TextWrapping="NoWrap" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
<TextBlock Style="{StaticResource Glyph}">
|
||||

|
||||
</TextBlock>
|
||||
</ItemsControl>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<Border Style="{DynamicResource SettingGroupBox}">
|
||||
<ItemsControl Style="{StaticResource SettingGrid}">
|
||||
<StackPanel Style="{StaticResource TextPanel}">
|
||||
<TextBlock Style="{DynamicResource SettingTitleLabel}" Text="{DynamicResource ignoreHotkeysOnFullscreen}" />
|
||||
<TextBlock Style="{DynamicResource SettingSubTitleLabel}" Text="{DynamicResource ignoreHotkeysOnFullscreenToolTip}" />
|
||||
</StackPanel>
|
||||
<ui:ToggleSwitch
|
||||
Grid.Column="2"
|
||||
FocusVisualMargin="5"
|
||||
IsOn="{Binding Settings.IgnoreHotkeysOnFullscreen}"
|
||||
Style="{DynamicResource SideToggleSwitch}" />
|
||||
<TextBlock Style="{StaticResource Glyph}">
|
||||

|
||||
</TextBlock>
|
||||
</ItemsControl>
|
||||
</Border>
|
||||
|
||||
<Border Margin="0,30,0,0" Style="{DynamicResource SettingGroupBox}">
|
||||
<ItemsControl Style="{StaticResource SettingGrid}">
|
||||
<StackPanel Style="{StaticResource TextPanel}">
|
||||
<TextBlock Style="{DynamicResource SettingTitleLabel}" Text="{DynamicResource AlwaysPreview}" />
|
||||
<TextBlock Style="{DynamicResource SettingSubTitleLabel}" Text="{Binding AlwaysPreviewToolTip}" />
|
||||
</StackPanel>
|
||||
<ui:ToggleSwitch
|
||||
Grid.Column="2"
|
||||
FocusVisualMargin="5"
|
||||
IsOn="{Binding Settings.AlwaysPreview}"
|
||||
Style="{DynamicResource SideToggleSwitch}"
|
||||
ToolTip="{Binding AlwaysPreviewToolTip}" />
|
||||
<TextBlock Style="{StaticResource Glyph}">
|
||||

|
||||
</TextBlock>
|
||||
</ItemsControl>
|
||||
</Border>
|
||||
|
||||
<Border Margin="0,30,0,0" Style="{DynamicResource SettingGroupBox}">
|
||||
<ItemsControl Style="{StaticResource SettingGrid}">
|
||||
<StackPanel Style="{StaticResource TextPanel}">
|
||||
<TextBlock Style="{DynamicResource SettingTitleLabel}" Text="{DynamicResource autoUpdates}" />
|
||||
</StackPanel>
|
||||
<ui:ToggleSwitch
|
||||
Grid.Column="2"
|
||||
FocusVisualMargin="5"
|
||||
IsOn="{Binding AutoUpdates}"
|
||||
Style="{DynamicResource SideToggleSwitch}" />
|
||||
<TextBlock Style="{StaticResource Glyph}">
|
||||

|
||||
</TextBlock>
|
||||
</ItemsControl>
|
||||
</Border>
|
||||
|
||||
<Border Style="{DynamicResource SettingGroupBox}">
|
||||
<ItemsControl Style="{StaticResource SettingGrid}">
|
||||
<StackPanel Style="{StaticResource TextPanel}">
|
||||
<TextBlock Style="{DynamicResource SettingTitleLabel}" Text="{DynamicResource portableMode}" />
|
||||
<TextBlock Style="{DynamicResource SettingSubTitleLabel}" Text="{DynamicResource portableModeToolTIp}" />
|
||||
</StackPanel>
|
||||
<ui:ToggleSwitch
|
||||
Grid.Column="2"
|
||||
FocusVisualMargin="5"
|
||||
IsOn="{Binding PortableMode}"
|
||||
Style="{DynamicResource SideToggleSwitch}" />
|
||||
<TextBlock Style="{StaticResource Glyph}">
|
||||

|
||||
</TextBlock>
|
||||
</ItemsControl>
|
||||
</Border>
|
||||
|
||||
<Border
|
||||
Margin="0,30,0,0"
|
||||
Padding="0"
|
||||
CornerRadius="5"
|
||||
Style="{DynamicResource SettingGroupBox}">
|
||||
<StackPanel Orientation="Vertical">
|
||||
<Border
|
||||
Margin="0"
|
||||
BorderThickness="0"
|
||||
Style="{DynamicResource SettingGroupBox}">
|
||||
<ItemsControl Style="{StaticResource SettingGrid}">
|
||||
<StackPanel Style="{StaticResource TextPanel}">
|
||||
<TextBlock
|
||||
Grid.Column="1"
|
||||
VerticalAlignment="Center"
|
||||
Style="{DynamicResource SettingTitleLabel}"
|
||||
Text="{DynamicResource querySearchPrecision}" />
|
||||
<TextBlock Style="{DynamicResource SettingSubTitleLabel}" Text="{DynamicResource querySearchPrecisionToolTip}" />
|
||||
</StackPanel>
|
||||
<ComboBox
|
||||
Grid.Column="2"
|
||||
MaxWidth="200"
|
||||
Margin="10,0,18,0"
|
||||
ItemsSource="{Binding QuerySearchPrecisionStrings}"
|
||||
SelectedItem="{Binding Settings.QuerySearchPrecisionString}" />
|
||||
</ItemsControl>
|
||||
</Border>
|
||||
<Separator
|
||||
Width="Auto"
|
||||
BorderThickness="1"
|
||||
Style="{StaticResource SettingSeparatorStyle}" />
|
||||
<Border
|
||||
Margin="0"
|
||||
BorderThickness="0"
|
||||
Style="{DynamicResource SettingGroupBox}">
|
||||
<ItemsControl Style="{StaticResource SettingGrid}">
|
||||
<StackPanel Style="{StaticResource TextPanel}">
|
||||
<TextBlock
|
||||
Grid.Column="1"
|
||||
VerticalAlignment="Center"
|
||||
Style="{DynamicResource SettingTitleLabel}"
|
||||
Text="{DynamicResource lastQueryMode}" />
|
||||
<TextBlock Style="{DynamicResource SettingSubTitleLabel}" Text="{DynamicResource lastQueryModeToolTip}" />
|
||||
</StackPanel>
|
||||
<ComboBox
|
||||
Grid.Column="2"
|
||||
Margin="10,0,18,0"
|
||||
DisplayMemberPath="Display"
|
||||
ItemsSource="{Binding LastQueryModes}"
|
||||
SelectedValue="{Binding Settings.LastQueryMode}"
|
||||
SelectedValuePath="Value" />
|
||||
</ItemsControl>
|
||||
</Border>
|
||||
<Separator
|
||||
Width="Auto"
|
||||
BorderThickness="1"
|
||||
Style="{StaticResource SettingSeparatorStyle}" />
|
||||
<Border
|
||||
Margin="0"
|
||||
BorderThickness="0"
|
||||
Style="{DynamicResource SettingGroupBox}">
|
||||
<ItemsControl Style="{StaticResource SettingGrid}">
|
||||
<StackPanel Grid.Column="1">
|
||||
<TextBlock
|
||||
VerticalAlignment="Center"
|
||||
Style="{DynamicResource SettingTitleLabel}"
|
||||
Text="{DynamicResource maxShowResults}" />
|
||||
<TextBlock Style="{DynamicResource SettingSubTitleLabel}" Text="{DynamicResource maxShowResultsToolTip}" />
|
||||
</StackPanel>
|
||||
<ComboBox
|
||||
Grid.Column="2"
|
||||
Width="100"
|
||||
Margin="10,0,18,0"
|
||||
HorizontalContentAlignment="Center"
|
||||
ItemsSource="{Binding MaxResultsRange}"
|
||||
SelectedItem="{Binding Settings.MaxResultsToShow}" />
|
||||
<TextBlock Style="{StaticResource Glyph}">
|
||||

|
||||
</TextBlock>
|
||||
</ItemsControl>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<Border Margin="0,30,0,0" Style="{DynamicResource SettingGroupBox}">
|
||||
<ItemsControl Style="{StaticResource SettingGrid}">
|
||||
<StackPanel Style="{StaticResource TextPanel}">
|
||||
<TextBlock
|
||||
Grid.Column="1"
|
||||
VerticalAlignment="Center"
|
||||
Style="{DynamicResource SettingTitleLabel}"
|
||||
Text="{DynamicResource defaultFileManager}" />
|
||||
<TextBlock Style="{DynamicResource SettingSubTitleLabel}" Text="{DynamicResource defaultFileManagerToolTip}" />
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Column="2" Orientation="Horizontal">
|
||||
<Button
|
||||
Width="160"
|
||||
MaxWidth="250"
|
||||
Margin="10,0,18,0"
|
||||
Content="{Binding Settings.CustomExplorer.Name}" />
|
||||
</StackPanel>
|
||||
|
||||
<TextBlock Style="{StaticResource Glyph}">
|
||||

|
||||
</TextBlock>
|
||||
</ItemsControl>
|
||||
</Border>
|
||||
|
||||
<Border Margin="0,4,0,0" Style="{DynamicResource SettingGroupBox}">
|
||||
<ItemsControl Style="{StaticResource SettingGrid}">
|
||||
<StackPanel Style="{StaticResource TextPanel}">
|
||||
<TextBlock
|
||||
Grid.Column="1"
|
||||
VerticalAlignment="Center"
|
||||
Style="{DynamicResource SettingTitleLabel}"
|
||||
Text="{DynamicResource defaultBrowser}" />
|
||||
<TextBlock Style="{DynamicResource SettingSubTitleLabel}" Text="{DynamicResource defaultBrowserToolTip}" />
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Column="2" Orientation="Horizontal">
|
||||
<Button
|
||||
Width="160"
|
||||
MaxWidth="250"
|
||||
Margin="10,0,18,0"
|
||||
Content="{Binding Settings.CustomBrowser.Name}" />
|
||||
</StackPanel>
|
||||
<TextBlock Style="{StaticResource Glyph}">
|
||||

|
||||
</TextBlock>
|
||||
</ItemsControl>
|
||||
</Border>
|
||||
|
||||
<Border Margin="0,30,0,0" Style="{DynamicResource SettingGroupBox}">
|
||||
<ItemsControl Style="{StaticResource SettingGrid}">
|
||||
<StackPanel Style="{StaticResource TextPanel}">
|
||||
<TextBlock Style="{DynamicResource SettingTitleLabel}" Text="{DynamicResource pythonFilePath}" />
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Column="2" Orientation="Horizontal">
|
||||
<TextBox
|
||||
Width="300"
|
||||
Height="34"
|
||||
Text="{Binding Settings.PluginSettings.PythonExecutablePath, TargetNullValue='None'}" />
|
||||
<Button
|
||||
Height="34"
|
||||
Margin="10,0,18,0"
|
||||
Content="{DynamicResource select}" />
|
||||
</StackPanel>
|
||||
</ItemsControl>
|
||||
</Border>
|
||||
|
||||
<Border Margin="0,4,0,0" Style="{DynamicResource SettingGroupBox}">
|
||||
<ItemsControl Style="{StaticResource SettingGrid}">
|
||||
<StackPanel Style="{StaticResource TextPanel}">
|
||||
<TextBlock Style="{DynamicResource SettingTitleLabel}" Text="{DynamicResource nodeFilePath}" />
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Column="2" Orientation="Horizontal">
|
||||
<TextBox
|
||||
Width="300"
|
||||
Height="34"
|
||||
Text="{Binding Settings.PluginSettings.NodeExecutablePath, TargetNullValue='None'}" />
|
||||
<Button
|
||||
Height="34"
|
||||
Margin="10,0,18,0"
|
||||
Content="{DynamicResource select}" />
|
||||
</StackPanel>
|
||||
</ItemsControl>
|
||||
</Border>
|
||||
|
||||
<Border Margin="0,30,0,0" Style="{DynamicResource SettingGroupBox}">
|
||||
<ItemsControl Style="{StaticResource SettingGrid}">
|
||||
<StackPanel Style="{StaticResource TextPanel}">
|
||||
<TextBlock
|
||||
Grid.Column="1"
|
||||
VerticalAlignment="Center"
|
||||
Style="{DynamicResource SettingTitleLabel}"
|
||||
Text="{DynamicResource typingStartEn}" />
|
||||
<TextBlock Style="{DynamicResource SettingSubTitleLabel}" Text="{DynamicResource typingStartEnTooltip}" />
|
||||
</StackPanel>
|
||||
<ui:ToggleSwitch
|
||||
Grid.Column="2"
|
||||
FocusVisualMargin="5"
|
||||
IsOn="{Binding Settings.AlwaysStartEn}"
|
||||
Style="{DynamicResource SideToggleSwitch}" />
|
||||
<TextBlock Style="{StaticResource Glyph}">
|
||||

|
||||
</TextBlock>
|
||||
</ItemsControl>
|
||||
</Border>
|
||||
|
||||
<Border Margin="0,4,0,0" Style="{DynamicResource SettingGroupBox}">
|
||||
<ItemsControl Style="{StaticResource SettingGrid}">
|
||||
<StackPanel Style="{StaticResource TextPanel}">
|
||||
<TextBlock Style="{DynamicResource SettingTitleLabel}" Text="{DynamicResource ShouldUsePinyin}" />
|
||||
<TextBlock Style="{DynamicResource SettingSubTitleLabel}" Text="{DynamicResource ShouldUsePinyinToolTip}" />
|
||||
</StackPanel>
|
||||
<ui:ToggleSwitch
|
||||
Grid.Column="2"
|
||||
FocusVisualMargin="5"
|
||||
IsOn="{Binding Settings.ShouldUsePinyin}"
|
||||
Style="{DynamicResource SideToggleSwitch}"
|
||||
ToolTip="{DynamicResource ShouldUsePinyinToolTip}" />
|
||||
<TextBlock Style="{StaticResource Glyph}">
|
||||

|
||||
</TextBlock>
|
||||
</ItemsControl>
|
||||
</Border>
|
||||
|
||||
<Border Margin="0,30,0,0" Style="{DynamicResource SettingGroupBox}">
|
||||
<ItemsControl Style="{StaticResource SettingGrid}">
|
||||
<StackPanel Style="{StaticResource TextPanel}">
|
||||
<TextBlock Style="{DynamicResource SettingTitleLabel}" Text="{DynamicResource language}" />
|
||||
</StackPanel>
|
||||
<ComboBox
|
||||
Grid.Column="2"
|
||||
MaxWidth="200"
|
||||
Margin="10,0,16,0"
|
||||
DisplayMemberPath="Display"
|
||||
ItemsSource="{Binding Languages}"
|
||||
SelectedValue="{Binding Language}"
|
||||
SelectedValuePath="LanguageCode" />
|
||||
<TextBlock Style="{StaticResource Glyph}">
|
||||

|
||||
</TextBlock>
|
||||
</ItemsControl>
|
||||
</Border>
|
||||
</VirtualizingStackPanel>
|
||||
</ScrollViewer>
|
||||
</ui:Page>
|
||||
51
Flow.Launcher/SettingPages/Views/General.xaml.cs
Normal file
51
Flow.Launcher/SettingPages/Views/General.xaml.cs
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using System.Windows;
|
||||
using System.Windows.Navigation;
|
||||
using Flow.Launcher.Core.Plugin;
|
||||
using Flow.Launcher.Infrastructure;
|
||||
using Flow.Launcher.SettingPages.ViewModels;
|
||||
using Flow.Launcher.Infrastructure.UserSettings;
|
||||
using Path = System.IO.Path;
|
||||
using MessageBox = System.Windows.Forms.MessageBox;
|
||||
using Flow.Launcher.SettingPages.ViewModels;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Windows;
|
||||
using System.Windows.Forms;
|
||||
using System.Windows.Navigation;
|
||||
using Flow.Launcher.Core.Plugin;
|
||||
using Flow.Launcher.Infrastructure.UserSettings;
|
||||
using Flow.Launcher.Plugin;
|
||||
using Flow.Launcher.SettingPages.ViewModels;
|
||||
using Flow.Launcher.ViewModel;
|
||||
|
||||
namespace Flow.Launcher.SettingPages.Views
|
||||
{
|
||||
public partial class General
|
||||
{
|
||||
protected override void OnNavigatedTo(NavigationEventArgs e)
|
||||
{
|
||||
if (!IsInitialized)
|
||||
{
|
||||
if (e.ExtraData is not Settings settings)
|
||||
throw new ArgumentException("Settings is not passed to General page");
|
||||
DataContext = new GeneralViewModel(settings);
|
||||
InitializeComponent();
|
||||
}
|
||||
base.OnNavigatedTo(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
471
Flow.Launcher/SettingPages/Views/Hotkey.xaml
Normal file
471
Flow.Launcher/SettingPages/Views/Hotkey.xaml
Normal file
|
|
@ -0,0 +1,471 @@
|
|||
<Page
|
||||
x:Class="Flow.Launcher.SettingPages.Views.Hotkey"
|
||||
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:flowlauncher="clr-namespace:Flow.Launcher"
|
||||
xmlns:local="clr-namespace:Flow.Launcher.SettingPages.Views"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:ui="http://schemas.modernwpf.com/2019"
|
||||
Title="Hotkey"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
mc:Ignorable="d">
|
||||
<Page.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/Resources/SettingWindowStyle.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<CollectionViewSource x:Key="SortedFonts" Source="{Binding Source={x:Static Fonts.SystemFontFamilies}}" />
|
||||
</ResourceDictionary>
|
||||
</Page.Resources>
|
||||
<ScrollViewer
|
||||
Margin="0,0,0,0"
|
||||
Padding="0,0,6,0"
|
||||
ScrollViewer.CanContentScroll="True"
|
||||
VirtualizingStackPanel.IsVirtualizing="True"
|
||||
VirtualizingStackPanel.ScrollUnit="Pixel">
|
||||
<Border>
|
||||
<StackPanel Margin="5,18,18,10">
|
||||
<TextBlock
|
||||
Grid.Row="0"
|
||||
Margin="0,5,0,6"
|
||||
FontSize="30"
|
||||
Style="{StaticResource PageTitle}"
|
||||
Text="{DynamicResource hotkeys}"
|
||||
TextAlignment="left" />
|
||||
<StackPanel Grid.Row="1">
|
||||
<cc:Card
|
||||
Title="{DynamicResource flowlauncherHotkey}"
|
||||
Icon=""
|
||||
Sub="{DynamicResource flowlauncherHotkeyToolTip}">
|
||||
<flowlauncher:HotkeyControl
|
||||
ChangeHotkey="{Binding SetTogglingHotkeyCommand}"
|
||||
DefaultHotkey="Alt+Space"
|
||||
Hotkey="{Binding Settings.Hotkey}"
|
||||
ValidateKeyGesture="True"
|
||||
WindowTitle="{DynamicResource flowlauncherHotkey}" />
|
||||
</cc:Card>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Grid.Row="2">
|
||||
<cc:Card
|
||||
Title="{DynamicResource previewHotkey}"
|
||||
Icon=""
|
||||
Sub="{DynamicResource previewHotkeyToolTip}">
|
||||
<flowlauncher:HotkeyControl
|
||||
DefaultHotkey="F1"
|
||||
Hotkey="{Binding Settings.PreviewHotkey}"
|
||||
ValidateKeyGesture="False"
|
||||
WindowTitle="{DynamicResource previewHotkey}" />
|
||||
</cc:Card>
|
||||
</StackPanel>
|
||||
|
||||
<Border
|
||||
Grid.Row="3"
|
||||
Margin="0,12,0,0"
|
||||
Padding="0"
|
||||
CornerRadius="5"
|
||||
Style="{DynamicResource SettingGroupBox}">
|
||||
<StackPanel Orientation="Vertical">
|
||||
<Border
|
||||
Margin="0"
|
||||
BorderThickness="0"
|
||||
Style="{DynamicResource SettingGroupBox}">
|
||||
<ItemsControl Style="{StaticResource SettingGrid}">
|
||||
<StackPanel Style="{StaticResource TextPanel}">
|
||||
<TextBlock
|
||||
Grid.Column="1"
|
||||
VerticalAlignment="Center"
|
||||
Style="{DynamicResource SettingTitleLabel}"
|
||||
Text="{DynamicResource openResultModifiers}" />
|
||||
<TextBlock Style="{DynamicResource SettingSubTitleLabel}" Text="{DynamicResource openResultModifiersToolTip}" />
|
||||
</StackPanel>
|
||||
<ComboBox
|
||||
Grid.Column="2"
|
||||
Width="120"
|
||||
Margin="0,0,18,0"
|
||||
FontSize="14"
|
||||
ItemsSource="{Binding OpenResultModifiersList}"
|
||||
SelectedItem="{Binding Settings.OpenResultModifiers}" />
|
||||
</ItemsControl>
|
||||
</Border>
|
||||
|
||||
<Separator
|
||||
Width="Auto"
|
||||
BorderThickness="1"
|
||||
Style="{StaticResource SettingSeparatorStyle}" />
|
||||
<Border
|
||||
Margin="0"
|
||||
Padding="0,10,0,10"
|
||||
BorderThickness="0"
|
||||
Style="{DynamicResource SettingGroupBox}">
|
||||
<ItemsControl Style="{StaticResource SettingGrid}">
|
||||
<StackPanel Style="{StaticResource TextPanel}">
|
||||
<TextBlock
|
||||
Grid.Column="1"
|
||||
VerticalAlignment="Center"
|
||||
Style="{DynamicResource SettingTitleLabel}"
|
||||
Text="{DynamicResource showOpenResultHotkey}" />
|
||||
<TextBlock Style="{DynamicResource SettingSubTitleLabel}" Text="{DynamicResource showOpenResultHotkeyToolTip}" />
|
||||
</StackPanel>
|
||||
<ui:ToggleSwitch
|
||||
Grid.Column="2"
|
||||
IsOn="{Binding Settings.ShowOpenResultHotkey}"
|
||||
Style="{DynamicResource SideToggleSwitch}" />
|
||||
</ItemsControl>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<StackPanel Grid.Row="2">
|
||||
<cc:ExCard
|
||||
Title="{DynamicResource hotkeyPresets}"
|
||||
Margin="0,14,0,0"
|
||||
Icon=""
|
||||
Sub="{DynamicResource hotkeyPresetsToolTip}">
|
||||
<StackPanel>
|
||||
<cc:Card
|
||||
Title="{DynamicResource OpenContainFolderHotkey}"
|
||||
Icon=""
|
||||
Type="Inside">
|
||||
<cc:HotkeyDisplay Keys="Ctrl+Enter" />
|
||||
</cc:Card>
|
||||
<cc:Card
|
||||
Title="{DynamicResource RunAsAdminHotkey}"
|
||||
Icon=""
|
||||
Type="Inside">
|
||||
<cc:HotkeyDisplay Keys="Ctrl+Shift+Enter" />
|
||||
</cc:Card>
|
||||
<cc:Card
|
||||
Title="{DynamicResource ToggleHistoryHotkey}"
|
||||
Icon=""
|
||||
Type="Inside">
|
||||
<cc:HotkeyDisplay Keys="Ctrl+H" />
|
||||
</cc:Card>
|
||||
<cc:Card
|
||||
Title="{DynamicResource CopyFilePathHotkey}"
|
||||
Icon=""
|
||||
Type="Inside">
|
||||
<cc:HotkeyDisplay Keys="Ctrl+Shift+C" />
|
||||
</cc:Card>
|
||||
<cc:Card
|
||||
Title="{DynamicResource OpenContextMenuHotkey}"
|
||||
Icon=""
|
||||
Type="Inside">
|
||||
<flowlauncher:HotkeyControl
|
||||
DefaultHotkey="Ctrl+I"
|
||||
Hotkey="{Binding Settings.OpenContextMenuHotkey}"
|
||||
ValidateKeyGesture="False" />
|
||||
</cc:Card>
|
||||
<cc:Card
|
||||
Title="{DynamicResource OpenContextMenuHotkey}"
|
||||
Icon=""
|
||||
Type="Inside">
|
||||
<cc:HotkeyDisplay Keys="Shift+Enter" />
|
||||
</cc:Card>
|
||||
|
||||
<cc:Card
|
||||
Title="{DynamicResource SettingWindowHotkey}"
|
||||
Icon=""
|
||||
Type="Inside">
|
||||
<flowlauncher:HotkeyControl
|
||||
DefaultHotkey="Ctrl+I"
|
||||
Hotkey="{Binding Settings.SettingWindowHotkey}"
|
||||
ValidateKeyGesture="False" />
|
||||
</cc:Card>
|
||||
<cc:Card
|
||||
Title="{DynamicResource ToggleGameModeHotkey}"
|
||||
Icon=""
|
||||
Type="Inside">
|
||||
<cc:HotkeyDisplay Keys="Ctrl+Shift+C" />
|
||||
</cc:Card>
|
||||
<cc:Card
|
||||
Title="{DynamicResource ReloadPluginHotkey}"
|
||||
Icon=""
|
||||
Sub="{DynamicResource ReloadPluginHotkeyToolTip}"
|
||||
Type="Inside">
|
||||
<cc:HotkeyDisplay Keys="F5" />
|
||||
</cc:Card>
|
||||
<cc:Card
|
||||
Title="{DynamicResource SelectPrevPageHotkey}"
|
||||
Icon=""
|
||||
Type="Inside">
|
||||
<flowlauncher:HotkeyControl
|
||||
DefaultHotkey=""
|
||||
Hotkey="{Binding Settings.SelectPrevPageHotkey}"
|
||||
ValidateKeyGesture="False" />
|
||||
</cc:Card>
|
||||
<cc:Card
|
||||
Title="{DynamicResource SelectNextPageHotkey}"
|
||||
Icon=""
|
||||
Type="Inside">
|
||||
<flowlauncher:HotkeyControl
|
||||
DefaultHotkey=""
|
||||
Hotkey="{Binding Settings.SelectNextPageHotkey}"
|
||||
ValidateKeyGesture="False" />
|
||||
</cc:Card>
|
||||
|
||||
<cc:Card
|
||||
Title="{DynamicResource QuickWidthHotkey}"
|
||||
Icon=""
|
||||
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=""
|
||||
Type="Inside">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<cc:HotkeyDisplay Keys="Ctrl+Plus" />
|
||||
<cc:HotkeyDisplay Margin="4,0,0,0" Keys="Ctrl+Minus" />
|
||||
</StackPanel>
|
||||
</cc:Card>
|
||||
</StackPanel>
|
||||
</cc:ExCard>
|
||||
|
||||
|
||||
<cc:ExCard
|
||||
Title="{DynamicResource autoCompleteHotkey}"
|
||||
Margin="0,14,0,0"
|
||||
Icon=""
|
||||
Sub="{DynamicResource autoCompleteHotkeyToolTip}">
|
||||
<cc:ExCard.SideContent>
|
||||
<flowlauncher:HotkeyControl
|
||||
DefaultHotkey="Ctrl+Tab"
|
||||
Hotkey="{Binding Settings.AutoCompleteHotkey}"
|
||||
ValidateKeyGesture="False" />
|
||||
</cc:ExCard.SideContent>
|
||||
<cc:Card
|
||||
Title="{DynamicResource autoCompleteHotkey}"
|
||||
Sub="{DynamicResource AdditionalHotkeyToolTip}"
|
||||
Type="InsideFit">
|
||||
<flowlauncher:HotkeyControl
|
||||
DefaultHotkey=""
|
||||
Hotkey="{Binding Settings.AutoCompleteHotkey2}"
|
||||
ValidateKeyGesture="False" />
|
||||
</cc:Card>
|
||||
</cc:ExCard>
|
||||
|
||||
<cc:ExCard
|
||||
Title="{DynamicResource SelectPrevItemHotkey}"
|
||||
Margin="0,4,0,0"
|
||||
Icon="">
|
||||
<cc:ExCard.SideContent>
|
||||
<flowlauncher:HotkeyControl
|
||||
DefaultHotkey="Shift+Tab"
|
||||
Hotkey="{Binding Settings.SelectPrevItemHotkey}"
|
||||
ValidateKeyGesture="False" />
|
||||
</cc:ExCard.SideContent>
|
||||
<cc:Card
|
||||
Title="{DynamicResource SelectPrevItemHotkey}"
|
||||
Sub="{DynamicResource AdditionalHotkeyToolTip}"
|
||||
Type="InsideFit">
|
||||
<flowlauncher:HotkeyControl
|
||||
DefaultHotkey=""
|
||||
Hotkey="{Binding Settings.SelectPrevItemHotkey2}"
|
||||
ValidateKeyGesture="False" />
|
||||
</cc:Card>
|
||||
</cc:ExCard>
|
||||
|
||||
<cc:ExCard
|
||||
Title="{DynamicResource SelectNextItemHotkey}"
|
||||
Margin="0,4,0,0"
|
||||
Icon="">
|
||||
<cc:ExCard.SideContent>
|
||||
<flowlauncher:HotkeyControl
|
||||
DefaultHotkey="Tab"
|
||||
Hotkey="{Binding Settings.SelectNextItemHotkey}"
|
||||
ValidateKeyGesture="False" />
|
||||
</cc:ExCard.SideContent>
|
||||
<cc:Card
|
||||
Title="{DynamicResource SelectNextItemHotkey}"
|
||||
Sub="{DynamicResource AdditionalHotkeyToolTip}"
|
||||
Type="InsideFit">
|
||||
<flowlauncher:HotkeyControl
|
||||
DefaultHotkey=""
|
||||
Hotkey="{Binding Settings.SelectNextItemHotkey2}"
|
||||
ValidateKeyGesture="False" />
|
||||
</cc:Card>
|
||||
</cc:ExCard>
|
||||
|
||||
<cc:ExCard
|
||||
Title="{DynamicResource customQueryHotkey}"
|
||||
Margin="0,20,0,0"
|
||||
Icon="">
|
||||
<StackPanel Margin="0,0,0,0">
|
||||
<Separator
|
||||
Width="Auto"
|
||||
Margin="0"
|
||||
BorderThickness="1"
|
||||
Style="{StaticResource SettingSeparatorStyle}" />
|
||||
<StackPanel Margin="18,18,18,0">
|
||||
<ListView
|
||||
Grid.Row="5"
|
||||
MinHeight="160"
|
||||
Margin="0,0,0,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
|
||||
Grid.Row="6"
|
||||
Margin="0"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Top"
|
||||
Orientation="Horizontal">
|
||||
<Button
|
||||
MinWidth="100"
|
||||
Margin="10"
|
||||
Content="{DynamicResource delete}" />
|
||||
<Button
|
||||
MinWidth="100"
|
||||
Margin="10"
|
||||
Content="{DynamicResource edit}" />
|
||||
<Button
|
||||
MinWidth="100"
|
||||
Margin="10,10,0,10"
|
||||
Content="{DynamicResource add}" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</cc:ExCard>
|
||||
|
||||
<cc:ExCard
|
||||
Title="{DynamicResource customQueryShortcut}"
|
||||
Margin="0,4,0,0"
|
||||
Icon="">
|
||||
<StackPanel>
|
||||
<Separator
|
||||
Width="Auto"
|
||||
Margin="0"
|
||||
BorderThickness="1"
|
||||
Style="{StaticResource SettingSeparatorStyle}" />
|
||||
<StackPanel Margin="18,12,18,0">
|
||||
<ListView
|
||||
Grid.Row="8"
|
||||
MinHeight="160"
|
||||
Margin="0,6,0,0"
|
||||
Background="{DynamicResource Color02B}"
|
||||
BorderBrush="DarkGray"
|
||||
BorderThickness="1"
|
||||
ItemsSource="{Binding CustomShortcuts}"
|
||||
SelectedItem="{Binding SelectedCustomShortcut}"
|
||||
Style="{StaticResource {x:Static GridView.GridViewStyleKey}}">
|
||||
<ListView.View>
|
||||
<GridView>
|
||||
<GridViewColumn Width="180" Header="{DynamicResource customShortcut}">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Key}" />
|
||||
</DataTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn Width="430" Header="{DynamicResource customShortcutExpansion}">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Value}" />
|
||||
</DataTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
</GridView>
|
||||
</ListView.View>
|
||||
</ListView>
|
||||
<StackPanel
|
||||
Grid.Row="9"
|
||||
Margin="0"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Top"
|
||||
Orientation="Horizontal">
|
||||
<Button
|
||||
MinWidth="100"
|
||||
Margin="10"
|
||||
Content="{DynamicResource delete}" />
|
||||
<Button
|
||||
MinWidth="100"
|
||||
Margin="10"
|
||||
Content="{DynamicResource edit}" />
|
||||
<Button
|
||||
MinWidth="100"
|
||||
Margin="10,10,0,10"
|
||||
Content="{DynamicResource add}" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</cc:ExCard>
|
||||
|
||||
<cc:ExCard
|
||||
Title="{DynamicResource builtinShortcuts}"
|
||||
Margin="0,4,0,14"
|
||||
Icon="">
|
||||
<StackPanel>
|
||||
<Separator
|
||||
Width="Auto"
|
||||
Margin="0"
|
||||
BorderThickness="1"
|
||||
Style="{StaticResource SettingSeparatorStyle}" />
|
||||
<StackPanel Margin="16,8,16,0">
|
||||
<ListView
|
||||
Grid.Row="11"
|
||||
MinHeight="160"
|
||||
Margin="0,6,0,16"
|
||||
Background="{DynamicResource Color02B}"
|
||||
BorderBrush="DarkGray"
|
||||
BorderThickness="1"
|
||||
ItemsSource="{Binding BuiltinShortcuts}"
|
||||
Style="{StaticResource {x:Static GridView.GridViewStyleKey}}">
|
||||
<ListView.View>
|
||||
<GridView>
|
||||
<GridViewColumn Width="180" Header="{DynamicResource customShortcut}">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Key}" />
|
||||
</DataTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn Width="430" Header="{DynamicResource builtinShortcutDescription}">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Description, Converter={StaticResource TranslationConverter}}" />
|
||||
</DataTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
</GridView>
|
||||
</ListView.View>
|
||||
</ListView>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</cc:ExCard>
|
||||
</StackPanel>
|
||||
|
||||
|
||||
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</ScrollViewer>
|
||||
</Page>
|
||||
28
Flow.Launcher/SettingPages/Views/Hotkey.xaml.cs
Normal file
28
Flow.Launcher/SettingPages/Views/Hotkey.xaml.cs
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace Flow.Launcher.SettingPages.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// Hotkey.xaml에 대한 상호 작용 논리
|
||||
/// </summary>
|
||||
public partial class Hotkey : Page
|
||||
{
|
||||
public Hotkey()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
347
Flow.Launcher/SettingPages/Views/PluginStore.xaml
Normal file
347
Flow.Launcher/SettingPages/Views/PluginStore.xaml
Normal file
|
|
@ -0,0 +1,347 @@
|
|||
<Page
|
||||
x:Class="Flow.Launcher.SettingPages.Views.PluginStore"
|
||||
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.SettingPages.Views"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||
xmlns:ui="http://schemas.modernwpf.com/2019"
|
||||
xmlns:wpftk="clr-namespace:WpfToolkit.Controls;assembly=VirtualizingWrapPanel"
|
||||
Title="PluginStore"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
mc:Ignorable="d">
|
||||
<Page.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/Resources/SettingWindowStyle.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<CollectionViewSource x:Key="SortedFonts" Source="{Binding Source={x:Static Fonts.SystemFontFamilies}}" />
|
||||
</ResourceDictionary>
|
||||
</Page.Resources>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="72" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<Border
|
||||
Grid.Row="0"
|
||||
Grid.Column="0"
|
||||
Padding="5,18,0,0">
|
||||
<TextBlock
|
||||
Margin="0,5,0,5"
|
||||
FontSize="30"
|
||||
Style="{StaticResource PageTitle}"
|
||||
Text="{DynamicResource pluginStore}"
|
||||
TextAlignment="left" />
|
||||
</Border>
|
||||
|
||||
<DockPanel
|
||||
Grid.Row="0"
|
||||
Grid.Column="1"
|
||||
Margin="5,24,0,0">
|
||||
|
||||
<TextBox
|
||||
Name="pluginStoreFilterTxb"
|
||||
Width="150"
|
||||
Height="34"
|
||||
Margin="0,0,26,0"
|
||||
HorizontalAlignment="Right"
|
||||
ContextMenu="{StaticResource TextBoxContextMenu}"
|
||||
DockPanel.Dock="Right"
|
||||
FontSize="14"
|
||||
Text=""
|
||||
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>
|
||||
<Button
|
||||
Height="34"
|
||||
Margin="0,5,10,5"
|
||||
Padding="12,4,12,4"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center"
|
||||
Command="{Binding RefreshExternalPluginsCommand}"
|
||||
Content="{DynamicResource refresh}"
|
||||
DockPanel.Dock="Right"
|
||||
FontSize="13" />
|
||||
</DockPanel>
|
||||
<ListView
|
||||
x:Name="StoreListBox"
|
||||
Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
Grid.ColumnSpan="2"
|
||||
Margin="4,0,0,0"
|
||||
Padding="0,0,18,0"
|
||||
ItemContainerStyle="{StaticResource StoreList}"
|
||||
ItemsSource="{Binding Source={StaticResource PluginStoreCollectionView}}"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
||||
SelectionMode="Single"
|
||||
Style="{DynamicResource StoreListStyle}"
|
||||
VirtualizingPanel.CacheLength="1,1"
|
||||
VirtualizingPanel.CacheLengthUnit="Page"
|
||||
VirtualizingPanel.IsVirtualizingWhenGrouping="True"
|
||||
VirtualizingPanel.ScrollUnit="Pixel"
|
||||
VirtualizingPanel.VirtualizationMode="Standard">
|
||||
<ListView.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<wpftk:VirtualizingWrapPanel
|
||||
x:Name="ItemWrapPanel"
|
||||
Margin="0,0,0,10"
|
||||
ItemSize="216,184"
|
||||
MouseWheelDelta="48"
|
||||
Orientation="Vertical"
|
||||
ScrollLineDelta="16"
|
||||
SpacingMode="None"
|
||||
StretchItems="True" />
|
||||
</ItemsPanelTemplate>
|
||||
</ListView.ItemsPanel>
|
||||
<ListView.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>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</GroupStyle.ContainerStyle>
|
||||
<GroupStyle.Panel>
|
||||
<ItemsPanelTemplate>
|
||||
<VirtualizingStackPanel Orientation="{Binding Orientation, Mode=OneWay}" />
|
||||
</ItemsPanelTemplate>
|
||||
</GroupStyle.Panel>
|
||||
</GroupStyle>
|
||||
</ListView.GroupStyle>
|
||||
|
||||
<ListView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<DataTemplate.Resources>
|
||||
<Style x:Key="StoreListItemBtnStyle" TargetType="Button">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Button">
|
||||
<Border
|
||||
x:Name="Background"
|
||||
Background="{DynamicResource Color00B}"
|
||||
BorderBrush="{DynamicResource Color03B}"
|
||||
BorderThickness="1"
|
||||
CornerRadius="4"
|
||||
SnapsToDevicePixels="True">
|
||||
<Border
|
||||
x:Name="Border"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
BorderThickness="1"
|
||||
CornerRadius="4">
|
||||
<ContentPresenter
|
||||
x:Name="ContentPresenter"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
Focusable="False"
|
||||
RecognizesAccessKey="True"
|
||||
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
||||
</Border>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter TargetName="Background" Property="Background" Value="{DynamicResource Color07B}" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="True">
|
||||
<Setter TargetName="Background" Property="Background" Value="{DynamicResource Color07B}" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</DataTemplate.Resources>
|
||||
<Button
|
||||
Name="StoreListItem"
|
||||
Margin="0"
|
||||
Padding="0"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
HorizontalContentAlignment="Stretch"
|
||||
VerticalContentAlignment="Stretch"
|
||||
BorderThickness="0"
|
||||
FocusVisualStyle="{StaticResource StoreItemFocusVisualStyleKey}"
|
||||
Style="{DynamicResource StoreListItemBtnStyle}">
|
||||
<ui:FlyoutService.Flyout>
|
||||
<ui:Flyout x:Name="InstallFlyout" Placement="Bottom">
|
||||
<Grid MinWidth="200">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<VirtualizingStackPanel
|
||||
Grid.Row="0"
|
||||
Grid.Column="0"
|
||||
Margin="5,0,0,0"
|
||||
Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Margin="0,0,5,0"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="14"
|
||||
FontWeight="Bold"
|
||||
Foreground="{DynamicResource Color05B}"
|
||||
Text="{Binding Name}"
|
||||
TextWrapping="Wrap"
|
||||
ToolTip="{Binding Name}" />
|
||||
<TextBlock
|
||||
VerticalAlignment="Center"
|
||||
FontSize="12"
|
||||
Foreground="{DynamicResource Color05B}"
|
||||
Text="{Binding Version}"
|
||||
TextWrapping="Wrap"
|
||||
ToolTip="{Binding Version}" />
|
||||
</VirtualizingStackPanel>
|
||||
<TextBlock
|
||||
Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
Margin="5,4,0,0"
|
||||
TextWrapping="Wrap">
|
||||
<Hyperlink Foreground="{DynamicResource Color04B}" NavigateUri="{Binding Website}">
|
||||
<Run FontSize="12" Text="{Binding Author, Mode=OneWay}" />
|
||||
</Hyperlink>
|
||||
</TextBlock>
|
||||
|
||||
<VirtualizingStackPanel
|
||||
Grid.Row="0"
|
||||
Grid.RowSpan="2"
|
||||
Grid.Column="1"
|
||||
Margin="20,0,0,0"
|
||||
HorizontalAlignment="Right"
|
||||
Orientation="Horizontal">
|
||||
<Button
|
||||
MinHeight="42"
|
||||
Margin="5,0,5,0"
|
||||
Padding="15,5,15,5"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Center"
|
||||
Content="{DynamicResource installbtn}"
|
||||
Visibility="{Binding LabelInstalled, Converter={StaticResource BoolToVisibilityConverter}, ConverterParameter='!'}" />
|
||||
<Button
|
||||
MinHeight="42"
|
||||
Margin="5,0,5,0"
|
||||
Padding="15,5,15,5"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center"
|
||||
Content="{DynamicResource uninstallbtn}"
|
||||
Visibility="{Binding LabelInstalled, Converter={StaticResource BoolToVisibilityConverter}}" />
|
||||
<Button
|
||||
MinHeight="42"
|
||||
Margin="5,0,5,0"
|
||||
Padding="15,5,15,5"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center"
|
||||
Content="{DynamicResource updatebtn}"
|
||||
Style="{DynamicResource AccentButtonStyle}"
|
||||
Visibility="{Binding LabelUpdate, Converter={StaticResource BoolToVisibilityConverter}}" />
|
||||
</VirtualizingStackPanel>
|
||||
</Grid>
|
||||
</ui:Flyout>
|
||||
</ui:FlyoutService.Flyout>
|
||||
<Grid>
|
||||
<StackPanel Width="200">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Image
|
||||
Grid.Column="0"
|
||||
Width="32"
|
||||
Height="32"
|
||||
Margin="18,24,0,0"
|
||||
HorizontalAlignment="Left"
|
||||
RenderOptions.BitmapScalingMode="Fant"
|
||||
Source="{Binding IcoPath, IsAsync=True}" />
|
||||
<Border
|
||||
x:Name="LabelUpdate"
|
||||
Height="12"
|
||||
Margin="10,24,0,0"
|
||||
Padding="6,2,6,2"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Top"
|
||||
Background="#45BD59"
|
||||
CornerRadius="36"
|
||||
ToolTip="{DynamicResource LabelUpdateToolTip}"
|
||||
Visibility="{Binding LabelUpdate, Converter={StaticResource BoolToVisibilityConverter}}" />
|
||||
</StackPanel>
|
||||
<TextBlock
|
||||
Grid.Column="0"
|
||||
Margin="18,10,18,0"
|
||||
FontWeight="SemiBold"
|
||||
Foreground="{DynamicResource Color05B}"
|
||||
Text="{Binding Name}"
|
||||
TextWrapping="Wrap"
|
||||
ToolTip="{Binding Version}" />
|
||||
<TextBlock
|
||||
Grid.Column="0"
|
||||
Height="60"
|
||||
Margin="18,6,18,0"
|
||||
Padding="0,0,0,10"
|
||||
FontSize="12"
|
||||
Foreground="{DynamicResource Color04B}"
|
||||
Text="{Binding Description, Mode=OneWay}"
|
||||
TextTrimming="WordEllipsis"
|
||||
TextWrapping="Wrap" />
|
||||
|
||||
</StackPanel>
|
||||
|
||||
</Grid>
|
||||
</Button>
|
||||
</DataTemplate>
|
||||
</ListView.ItemTemplate>
|
||||
</ListView>
|
||||
</Grid>
|
||||
</Page>
|
||||
28
Flow.Launcher/SettingPages/Views/PluginStore.xaml.cs
Normal file
28
Flow.Launcher/SettingPages/Views/PluginStore.xaml.cs
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace Flow.Launcher.SettingPages.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// PluginStore.xaml에 대한 상호 작용 논리
|
||||
/// </summary>
|
||||
public partial class PluginStore : Page
|
||||
{
|
||||
public PluginStore()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
384
Flow.Launcher/SettingPages/Views/Plugins.xaml
Normal file
384
Flow.Launcher/SettingPages/Views/Plugins.xaml
Normal file
|
|
@ -0,0 +1,384 @@
|
|||
<ui:Page
|
||||
x:Class="Flow.Launcher.SettingPages.Views.Plugins"
|
||||
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.SettingPages.Views"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||
xmlns:ui="http://schemas.modernwpf.com/2019"
|
||||
Title="Plugins"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
mc:Ignorable="d">
|
||||
<ui:Page.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/Resources/SettingWindowStyle.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<CollectionViewSource x:Key="SortedFonts" Source="{Binding Source={x:Static Fonts.SystemFontFamilies}}" />
|
||||
</ResourceDictionary>
|
||||
</ui:Page.Resources>
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="73" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<Border
|
||||
Grid.Row="0"
|
||||
Padding="5,18,0,0"
|
||||
HorizontalAlignment="Stretch">
|
||||
<DockPanel>
|
||||
<TextBlock
|
||||
Margin="0,5,0,0"
|
||||
DockPanel.Dock="Left"
|
||||
FontSize="30"
|
||||
Style="{StaticResource PageTitle}"
|
||||
Text="{DynamicResource plugins}"
|
||||
TextAlignment="Left" />
|
||||
<DockPanel DockPanel.Dock="Right">
|
||||
<TextBox
|
||||
Name="pluginFilterTxb"
|
||||
Width="150"
|
||||
Height="34"
|
||||
Margin="0,5,26,0"
|
||||
HorizontalAlignment="Right"
|
||||
ContextMenu="{StaticResource TextBoxContextMenu}"
|
||||
DockPanel.Dock="Right"
|
||||
FontSize="14"
|
||||
Text=""
|
||||
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>
|
||||
</DockPanel>
|
||||
</DockPanel>
|
||||
</Border>
|
||||
<Border
|
||||
Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
Padding="0,0,0,0"
|
||||
Background="{DynamicResource Color01B}">
|
||||
<ListBox
|
||||
Name="PluginsList"
|
||||
Width="Auto"
|
||||
Margin="5,0,0,0"
|
||||
Padding="0,0,7,0"
|
||||
HorizontalAlignment="Stretch"
|
||||
Background="{DynamicResource Color01B}"
|
||||
ItemContainerStyle="{StaticResource PluginList}"
|
||||
ScrollViewer.CanContentScroll="False"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
||||
SelectedItem="{Binding SelectedPlugin}"
|
||||
SnapsToDevicePixels="True"
|
||||
Style="{DynamicResource PluginListStyle}"
|
||||
VirtualizingPanel.ScrollUnit="Pixel"
|
||||
VirtualizingStackPanel.IsVirtualizing="True"
|
||||
VirtualizingStackPanel.VirtualizationMode="Recycling">
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<VirtualizingStackPanel Margin="0,0,0,10" />
|
||||
</ItemsPanelTemplate>
|
||||
</ListBox.ItemsPanel>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Expander
|
||||
x:Name="expanderHeader"
|
||||
Grid.Column="4"
|
||||
Padding="0"
|
||||
BorderThickness="0"
|
||||
ClipToBounds="True"
|
||||
IsExpanded="{Binding Mode=TwoWay, Path=IsExpanded}"
|
||||
SnapsToDevicePixels="True"
|
||||
Style="{StaticResource ExpanderStyle1}">
|
||||
<Expander.Header>
|
||||
<Border Padding="0,12,0,12">
|
||||
<Grid Width="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Expander}}, Path=ActualWidth}" HorizontalAlignment="Left">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="36" MinWidth="36" />
|
||||
<ColumnDefinition Width="7*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<StackPanel
|
||||
Grid.Column="0"
|
||||
Margin="0,0,0,0"
|
||||
VerticalAlignment="Center">
|
||||
<Image
|
||||
Width="32"
|
||||
Height="32"
|
||||
Margin="0,0,0,0"
|
||||
FlowDirection="LeftToRight"
|
||||
Source="{Binding Image, IsAsync=True}" />
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Column="1" Margin="16,0,14,0">
|
||||
<TextBlock
|
||||
Foreground="{DynamicResource Color05B}"
|
||||
Text="{Binding PluginPair.Metadata.Name}"
|
||||
TextWrapping="Wrap"
|
||||
ToolTip="{Binding PluginPair.Metadata.Version}" />
|
||||
<TextBlock
|
||||
Margin="0,2,0,0"
|
||||
Foreground="{DynamicResource Color04B}"
|
||||
TextWrapping="WrapWithOverflow">
|
||||
<Run FontSize="12" Text="{Binding PluginPair.Metadata.Description}" />
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
<StackPanel
|
||||
Grid.Column="2"
|
||||
HorizontalAlignment="Right"
|
||||
Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Margin="0,0,8,0"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="12"
|
||||
Foreground="{DynamicResource Color08B}"
|
||||
Text="{DynamicResource priority}" />
|
||||
<Button
|
||||
x:Name="PriorityButton"
|
||||
Margin="0,0,22,0"
|
||||
VerticalAlignment="Center"
|
||||
Command="{Binding EditPluginPriorityCommand}"
|
||||
Content="{Binding Priority, UpdateSourceTrigger=PropertyChanged}"
|
||||
Cursor="Hand"
|
||||
ToolTip="{DynamicResource priorityToolTip}">
|
||||
<!--#region Priority Button Style-->
|
||||
<Button.Resources>
|
||||
<Style TargetType="Border">
|
||||
<Setter Property="CornerRadius" Value="2" />
|
||||
</Style>
|
||||
</Button.Resources>
|
||||
<Button.Style>
|
||||
<Style BasedOn="{StaticResource DefaultButtonStyle}" TargetType="Button">
|
||||
<Setter Property="Padding" Value="12,8,12,8" />
|
||||
<Setter Property="BorderThickness" Value="0" />
|
||||
<Setter Property="FontWeight" Value="DemiBold" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource Color05B}" />
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding ElementName=PriorityButton, UpdateSourceTrigger=PropertyChanged, Path=Content}" Value="0">
|
||||
<Setter Property="Foreground" Value="{DynamicResource Color08B}" />
|
||||
<Setter Property="FontWeight" Value="Normal" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Button.Style>
|
||||
<!--#endregion-->
|
||||
</Button>
|
||||
|
||||
</StackPanel>
|
||||
<DockPanel Grid.Column="3">
|
||||
<ui:ToggleSwitch
|
||||
Margin="0,0,60,0"
|
||||
HorizontalAlignment="Right"
|
||||
DockPanel.Dock="Right"
|
||||
IsOn="{Binding PluginState}"
|
||||
OffContent="{DynamicResource disable}"
|
||||
OnContent="{DynamicResource enable}" />
|
||||
</DockPanel>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Expander.Header>
|
||||
|
||||
<Grid FlowDirection="LeftToRight">
|
||||
<StackPanel Margin="0,0,0,0" Orientation="Vertical">
|
||||
<StackPanel>
|
||||
<Border
|
||||
Width="Auto"
|
||||
Height="52"
|
||||
Margin="0"
|
||||
Padding="0"
|
||||
BorderThickness="0,1,0,0"
|
||||
CornerRadius="0"
|
||||
Style="{DynamicResource SettingGroupBox}"
|
||||
Visibility="{Binding ActionKeywordsVisibility}">
|
||||
<ItemsControl Padding="22,0,18,0" VerticalAlignment="Center">
|
||||
<DockPanel>
|
||||
<TextBlock
|
||||
Margin="48,0,10,0"
|
||||
VerticalAlignment="Center"
|
||||
DockPanel.Dock="Left"
|
||||
FontFamily="/Resources/#Segoe Fluent Icons"
|
||||
FontSize="20"
|
||||
Style="{StaticResource Glyph}">
|
||||

|
||||
</TextBlock>
|
||||
<TextBlock
|
||||
Grid.Column="0"
|
||||
Margin="0,0,0,0"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
DockPanel.Dock="Left"
|
||||
Style="{DynamicResource SettingTitleLabel}"
|
||||
Text="{DynamicResource actionKeywords}" />
|
||||
<Button
|
||||
Grid.Column="2"
|
||||
Width="100"
|
||||
Height="34"
|
||||
Margin="5,0,0,0"
|
||||
HorizontalAlignment="Right"
|
||||
Command="{Binding SetActionKeywordsCommand}"
|
||||
Content="{Binding ActionKeywordsText}"
|
||||
Cursor="Hand"
|
||||
DockPanel.Dock="Right"
|
||||
FontWeight="Bold"
|
||||
ToolTip="{DynamicResource actionKeywordsTooltip}"
|
||||
Visibility="{Binding ActionKeywordsVisibility}" />
|
||||
</DockPanel>
|
||||
</ItemsControl>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel>
|
||||
<Border
|
||||
Padding="0"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Center"
|
||||
Background="{DynamicResource Color02B}"
|
||||
BorderBrush="{DynamicResource Color03B}"
|
||||
BorderThickness="0,1,0,0">
|
||||
<!--#region SubInfo Styling-->
|
||||
<Border.Style>
|
||||
<Style TargetType="{x:Type Border}">
|
||||
<Setter Property="Visibility" Value="Visible" />
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding ElementName=PluginSettingControl, Path=ActualHeight}" Value="0">
|
||||
<Setter Property="Visibility" Value="Collapsed" />
|
||||
<Setter Property="BorderThickness" Value="0" />
|
||||
<Setter Property="Padding" Value="0" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Border.Style>
|
||||
|
||||
</Border>
|
||||
<Border Background="{DynamicResource Color00B}">
|
||||
<ContentControl
|
||||
x:Name="PluginSettingControl"
|
||||
Margin="0"
|
||||
Padding="1"
|
||||
VerticalAlignment="Stretch"
|
||||
Content="{Binding SettingControl}" />
|
||||
</Border>
|
||||
<!--#endregion-->
|
||||
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel>
|
||||
<Border
|
||||
Margin="0"
|
||||
Padding="0,10,0,10"
|
||||
VerticalAlignment="Center"
|
||||
BorderThickness="0,1,0,0"
|
||||
CornerRadius="0 0 5 5"
|
||||
Style="{DynamicResource SettingGroupBox}">
|
||||
<ItemsControl Style="{DynamicResource SettingGrid}">
|
||||
<StackPanel
|
||||
Margin="0,0,-14,0"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center"
|
||||
Orientation="Horizontal"
|
||||
Style="{StaticResource TextPanel}">
|
||||
<TextBlock
|
||||
Margin="10,0,0,0"
|
||||
VerticalAlignment="center"
|
||||
FontSize="11"
|
||||
Foreground="{DynamicResource PluginInfoColor}"
|
||||
Text="{DynamicResource author}" />
|
||||
<TextBlock
|
||||
Margin="5,0,0,0"
|
||||
VerticalAlignment="center"
|
||||
FontSize="11"
|
||||
Foreground="{DynamicResource PluginInfoColor}"
|
||||
Text="{Binding PluginPair.Metadata.Author}" />
|
||||
<TextBlock
|
||||
Margin="10,0,0,0"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="11"
|
||||
Foreground="{DynamicResource PluginInfoColor}"
|
||||
Text="|" />
|
||||
<TextBlock
|
||||
Margin="10,0,5,0"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="11"
|
||||
Foreground="{DynamicResource PluginInfoColor}"
|
||||
Text="{Binding Version}"
|
||||
ToolTip="{Binding InitAndQueryTime}"
|
||||
ToolTipService.InitialShowDelay="500" />
|
||||
<TextBlock
|
||||
Margin="5,0,5,0"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="11"
|
||||
Foreground="{DynamicResource PluginInfoColor}"
|
||||
Text="|" />
|
||||
<TextBlock
|
||||
Margin="5,0,0,0"
|
||||
Style="{DynamicResource LinkBtnStyle}"
|
||||
ToolTip="{DynamicResource plugin_query_web}">
|
||||
<Hyperlink
|
||||
NavigateUri="{Binding PluginPair.Metadata.Website}"
|
||||
Style="{DynamicResource HyperLinkBtnStyle}"
|
||||
TextDecorations="None">
|
||||
<Run Text="" />
|
||||
</Hyperlink>
|
||||
</TextBlock>
|
||||
<TextBlock
|
||||
Margin="10,0,0,0"
|
||||
Style="{DynamicResource LinkBtnStyle}"
|
||||
Text=""
|
||||
ToolTip="{DynamicResource plugin_uninstall}" />
|
||||
<TextBlock
|
||||
Margin="10,0,5,0"
|
||||
Style="{DynamicResource LinkBtnStyle}"
|
||||
Text=""
|
||||
ToolTip="{DynamicResource pluginDirectory}">
|
||||
<TextBlock.InputBindings>
|
||||
<MouseBinding Command="{Binding OpenPluginDirectoryCommand}" MouseAction="LeftClick" />
|
||||
</TextBlock.InputBindings>
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
</ItemsControl>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Expander>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
</Border>
|
||||
</Grid>
|
||||
</ui:Page>
|
||||
28
Flow.Launcher/SettingPages/Views/Plugins.xaml.cs
Normal file
28
Flow.Launcher/SettingPages/Views/Plugins.xaml.cs
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace Flow.Launcher.SettingPages.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// Plugins.xaml에 대한 상호 작용 논리
|
||||
/// </summary>
|
||||
public partial class Plugins
|
||||
{
|
||||
public Plugins()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
180
Flow.Launcher/SettingPages/Views/Proxy.xaml
Normal file
180
Flow.Launcher/SettingPages/Views/Proxy.xaml
Normal file
|
|
@ -0,0 +1,180 @@
|
|||
<Page
|
||||
x:Class="Flow.Launcher.SettingPages.Views.Proxy"
|
||||
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.SettingPages.Views"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||
xmlns:ui="http://schemas.modernwpf.com/2019"
|
||||
Title="Proxy"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
mc:Ignorable="d">
|
||||
<Page.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/Resources/SettingWindowStyle.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<CollectionViewSource x:Key="SortedFonts" Source="{Binding Source={x:Static Fonts.SystemFontFamilies}}" />
|
||||
</ResourceDictionary>
|
||||
</Page.Resources>
|
||||
<ScrollViewer
|
||||
Margin="0,0,0,0"
|
||||
Padding="5,0,24,0"
|
||||
ScrollViewer.CanContentScroll="True"
|
||||
VirtualizingStackPanel.IsVirtualizing="True"
|
||||
VirtualizingStackPanel.ScrollUnit="Pixel">
|
||||
<Border>
|
||||
|
||||
<StackPanel>
|
||||
<Border Margin="0,18,0,0">
|
||||
<TextBlock
|
||||
Grid.Row="0"
|
||||
Margin="0,5,0,0"
|
||||
FontSize="30"
|
||||
Style="{StaticResource PageTitle}"
|
||||
Text="{DynamicResource proxy}"
|
||||
TextAlignment="left" />
|
||||
</Border>
|
||||
|
||||
|
||||
<Border
|
||||
Margin="0,10,0,0"
|
||||
Padding="0"
|
||||
CornerRadius="5"
|
||||
Style="{DynamicResource SettingGroupBox}">
|
||||
<StackPanel Orientation="Vertical">
|
||||
<Border
|
||||
Margin="0"
|
||||
BorderThickness="0"
|
||||
Style="{DynamicResource SettingGroupBox}">
|
||||
<ItemsControl Style="{StaticResource SettingGrid}">
|
||||
<TextBlock
|
||||
Grid.Column="1"
|
||||
VerticalAlignment="Center"
|
||||
Style="{DynamicResource SettingTitleLabel}"
|
||||
Text="{DynamicResource enableProxy}" />
|
||||
<ui:ToggleSwitch
|
||||
Grid.Column="2"
|
||||
IsOn="{Binding Settings.Proxy.Enabled}"
|
||||
Style="{DynamicResource SideToggleSwitch}" />
|
||||
</ItemsControl>
|
||||
</Border>
|
||||
<Separator
|
||||
Width="Auto"
|
||||
BorderThickness="1"
|
||||
Style="{StaticResource SettingSeparatorStyle}" />
|
||||
<Border
|
||||
Margin="0"
|
||||
BorderThickness="0"
|
||||
Style="{DynamicResource SettingGroupBox}">
|
||||
<ItemsControl Style="{StaticResource SettingGrid}">
|
||||
<TextBlock
|
||||
Grid.Column="1"
|
||||
Margin="22,0,0,0"
|
||||
VerticalAlignment="Center"
|
||||
Style="{DynamicResource SettingTitleLabel}"
|
||||
Text="{DynamicResource server}" />
|
||||
<TextBox
|
||||
Grid.Column="2"
|
||||
Width="300"
|
||||
Margin="0,0,16,0"
|
||||
Padding="5"
|
||||
IsEnabled="{Binding Settings.Proxy.Enabled}"
|
||||
Text="{Binding Settings.Proxy.Server}" />
|
||||
</ItemsControl>
|
||||
</Border>
|
||||
<Separator
|
||||
Width="Auto"
|
||||
BorderThickness="1"
|
||||
Style="{StaticResource SettingSeparatorStyle}" />
|
||||
<Border
|
||||
Margin="0"
|
||||
BorderThickness="0"
|
||||
Style="{DynamicResource SettingGroupBox}">
|
||||
<ItemsControl Style="{StaticResource SettingGrid}">
|
||||
<TextBlock
|
||||
Grid.Column="1"
|
||||
Margin="22,0,0,0"
|
||||
VerticalAlignment="Center"
|
||||
Style="{DynamicResource SettingTitleLabel}"
|
||||
Text="{DynamicResource port}" />
|
||||
<TextBox
|
||||
Grid.Column="2"
|
||||
Width="100"
|
||||
Margin="0,0,16,0"
|
||||
IsEnabled="{Binding Settings.Proxy.Enabled}"
|
||||
Text="{Binding Settings.Proxy.Port, TargetNullValue={x:Static sys:String.Empty}}" />
|
||||
</ItemsControl>
|
||||
</Border>
|
||||
<Separator
|
||||
Width="Auto"
|
||||
BorderThickness="1"
|
||||
Style="{StaticResource SettingSeparatorStyle}" />
|
||||
<Border
|
||||
Margin="0"
|
||||
BorderThickness="0"
|
||||
Style="{DynamicResource SettingGroupBox}">
|
||||
<ItemsControl Style="{StaticResource SettingGrid}">
|
||||
<TextBlock
|
||||
Grid.Column="1"
|
||||
Margin="22,0,0,0"
|
||||
VerticalAlignment="Center"
|
||||
Style="{DynamicResource SettingTitleLabel}"
|
||||
Text="{DynamicResource userName}" />
|
||||
<TextBox
|
||||
Grid.Column="2"
|
||||
Width="200"
|
||||
Margin="0,0,16,0"
|
||||
Padding="5"
|
||||
IsEnabled="{Binding Settings.Proxy.Enabled}"
|
||||
Text="{Binding Settings.Proxy.UserName}" />
|
||||
</ItemsControl>
|
||||
</Border>
|
||||
<Separator
|
||||
Width="Auto"
|
||||
BorderThickness="1"
|
||||
Style="{StaticResource SettingSeparatorStyle}" />
|
||||
<Border
|
||||
Margin="0"
|
||||
BorderThickness="0"
|
||||
Style="{DynamicResource SettingGroupBox}">
|
||||
<ItemsControl Style="{StaticResource SettingGrid}">
|
||||
<TextBlock
|
||||
Grid.Column="1"
|
||||
Margin="22,0,0,0"
|
||||
VerticalAlignment="Center"
|
||||
Style="{DynamicResource SettingTitleLabel}"
|
||||
Text="{DynamicResource password}" />
|
||||
<TextBox
|
||||
Grid.Column="2"
|
||||
Width="200"
|
||||
Margin="0,0,16,0"
|
||||
Padding="5"
|
||||
IsEnabled="{Binding Settings.Proxy.Enabled}"
|
||||
Text="{Binding Settings.Proxy.Password}" />
|
||||
</ItemsControl>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<Border Margin="0,12,0,0" Style="{DynamicResource SettingGroupBox}">
|
||||
<ItemsControl Style="{StaticResource SettingGrid}">
|
||||
<TextBlock
|
||||
Grid.Column="1"
|
||||
VerticalAlignment="Center"
|
||||
Style="{DynamicResource SettingTitleLabel}"
|
||||
Text="{DynamicResource testProxy}" />
|
||||
<Button
|
||||
Grid.Column="2"
|
||||
Width="150"
|
||||
Margin="0,0,16,0"
|
||||
HorizontalAlignment="Right"
|
||||
Content="{DynamicResource testProxy}"
|
||||
IsEnabled="{Binding Settings.Proxy.Enabled}" />
|
||||
</ItemsControl>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</ScrollViewer>
|
||||
</Page>
|
||||
28
Flow.Launcher/SettingPages/Views/Proxy.xaml.cs
Normal file
28
Flow.Launcher/SettingPages/Views/Proxy.xaml.cs
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace Flow.Launcher.SettingPages.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// Proxy.xaml에 대한 상호 작용 논리
|
||||
/// </summary>
|
||||
public partial class Proxy : Page
|
||||
{
|
||||
public Proxy()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
744
Flow.Launcher/SettingPages/Views/Theme.xaml
Normal file
744
Flow.Launcher/SettingPages/Views/Theme.xaml
Normal file
|
|
@ -0,0 +1,744 @@
|
|||
<ui:Page
|
||||
x:Class="Flow.Launcher.SettingPages.Views.Theme"
|
||||
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:flowlauncher="clr-namespace:Flow.Launcher"
|
||||
xmlns:local="clr-namespace:Flow.Launcher.SettingPages.Views"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:ui="http://schemas.modernwpf.com/2019"
|
||||
xmlns:userSettings="clr-namespace:Flow.Launcher.Infrastructure.UserSettings;assembly=Flow.Launcher.Infrastructure"
|
||||
Title="Theme"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
Style="{DynamicResource SettingPageBasic}"
|
||||
mc:Ignorable="d">
|
||||
<ui:Page.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/Resources/SettingWindowStyle.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<CollectionViewSource x:Key="SortedFonts" Source="{Binding Source={x:Static Fonts.SystemFontFamilies}}" />
|
||||
</ResourceDictionary>
|
||||
</ui:Page.Resources>
|
||||
<ScrollViewer
|
||||
Margin="0,0,0,0"
|
||||
Padding="6,0,24,0"
|
||||
ScrollViewer.CanContentScroll="True"
|
||||
VirtualizingStackPanel.IsVirtualizing="True"
|
||||
VirtualizingStackPanel.ScrollUnit="Pixel">
|
||||
<Grid Margin="0,0,0,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0" />
|
||||
<RowDefinition Height="350" />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<Border Grid.Row="0" Padding="5,18,0,0">
|
||||
<TextBlock
|
||||
Margin="0,5,0,5"
|
||||
FontSize="30"
|
||||
Style="{StaticResource PageTitle}"
|
||||
Text="{DynamicResource appearance}"
|
||||
TextAlignment="left" />
|
||||
</Border>
|
||||
|
||||
<StackPanel
|
||||
Grid.Row="1"
|
||||
Margin="0"
|
||||
Background="{Binding PreviewBackground}">
|
||||
<StackPanel
|
||||
Margin="0,30,0,0"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Orientation="Horizontal">
|
||||
<Border
|
||||
Width="{Binding WindowWidthSize}"
|
||||
Margin="0"
|
||||
SnapsToDevicePixels="True"
|
||||
Style="{DynamicResource WindowBorderStyle}"
|
||||
UseLayoutRounding="True">
|
||||
<Border Style="{DynamicResource WindowRadius}">
|
||||
<Border.Clip>
|
||||
<MultiBinding Converter="{StaticResource BorderClipConverter}">
|
||||
<Binding Path="ActualWidth" RelativeSource="{RelativeSource Self}" />
|
||||
<Binding Path="ActualHeight" RelativeSource="{RelativeSource Self}" />
|
||||
<Binding Path="CornerRadius" RelativeSource="{RelativeSource Self}" />
|
||||
</MultiBinding>
|
||||
</Border.Clip>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<Border Grid.Row="0">
|
||||
<TextBox
|
||||
x:Name="QueryTextBox"
|
||||
IsHitTestVisible="False"
|
||||
IsReadOnly="True"
|
||||
Style="{DynamicResource QueryBoxStyle}"
|
||||
Text="{DynamicResource hiThere}" />
|
||||
</Border>
|
||||
<StackPanel
|
||||
x:Name="ClockPanel"
|
||||
IsHitTestVisible="False"
|
||||
Style="{DynamicResource ClockPanel}"
|
||||
Visibility="Visible">
|
||||
<TextBlock
|
||||
x:Name="ClockBox"
|
||||
Style="{DynamicResource ClockBox}"
|
||||
Text="{Binding ClockText}"
|
||||
Visibility="{Binding Settings.UseClock, Converter={StaticResource BoolToVisibilityConverter}}" />
|
||||
<TextBlock
|
||||
x:Name="DateBox"
|
||||
Style="{DynamicResource DateBox}"
|
||||
Text="{Binding DateText}"
|
||||
Visibility="{Binding Settings.UseDate, Converter={StaticResource BoolToVisibilityConverter}}" />
|
||||
</StackPanel>
|
||||
<Canvas Style="{DynamicResource SearchIconPosition}">
|
||||
<Path
|
||||
Margin="0"
|
||||
Data="{DynamicResource SearchIconImg}"
|
||||
Stretch="Fill"
|
||||
Style="{DynamicResource SearchIconStyle}" />
|
||||
</Canvas>
|
||||
|
||||
<Border Grid.Row="1" Margin="0,0,0,0">
|
||||
<Rectangle
|
||||
Width="Auto"
|
||||
HorizontalAlignment="Stretch"
|
||||
Style="{DynamicResource SeparatorStyle}"
|
||||
Visibility="Visible" />
|
||||
</Border>
|
||||
|
||||
<ContentControl Grid.Row="2">
|
||||
<flowlauncher:ResultListBox
|
||||
DataContext="{Binding PreviewResults, Mode=OneTime}"
|
||||
IsHitTestVisible="False"
|
||||
Visibility="Visible" />
|
||||
</ContentControl>
|
||||
|
||||
</Grid>
|
||||
</Border>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Grid.Row="2" VerticalAlignment="Top">
|
||||
<Border Margin="0,12,0,0" Style="{DynamicResource SettingGroupBox}">
|
||||
<ItemsControl Style="{StaticResource SettingGrid}">
|
||||
<StackPanel Style="{StaticResource TextPanel}">
|
||||
<TextBlock Style="{DynamicResource SettingTitleLabel}" Text="{DynamicResource queryWindowShadowEffect}" />
|
||||
<TextBlock Style="{DynamicResource SettingSubTitleLabel}" Text="{DynamicResource shadowEffectCPUUsage}" />
|
||||
</StackPanel>
|
||||
<ui:ToggleSwitch
|
||||
Grid.Row="0"
|
||||
Grid.Column="2"
|
||||
IsOn="{Binding DropShadowEffect, Mode=TwoWay}"
|
||||
OffContent="{DynamicResource disable}"
|
||||
OnContent="{DynamicResource enable}"
|
||||
Style="{DynamicResource SideToggleSwitch}" />
|
||||
<TextBlock Style="{StaticResource Glyph}">
|
||||

|
||||
</TextBlock>
|
||||
</ItemsControl>
|
||||
</Border>
|
||||
<Border Margin="0,8,0,0" Style="{DynamicResource SettingGroupBox}">
|
||||
<ItemsControl Style="{StaticResource SettingGrid}">
|
||||
<StackPanel Style="{StaticResource TextPanel}">
|
||||
<TextBlock Style="{DynamicResource SettingTitleLabel}" Text="{DynamicResource windowWidthSize}" />
|
||||
<TextBlock Style="{DynamicResource SettingSubTitleLabel}" Text="{DynamicResource windowWidthSizeToolTip}" />
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Column="2" Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Width="Auto"
|
||||
Margin="0,0,8,2"
|
||||
VerticalAlignment="Center"
|
||||
Foreground="{DynamicResource Color05B}"
|
||||
Text="{Binding ElementName=WindowWidthValue, Path=Value, UpdateSourceTrigger=PropertyChanged}"
|
||||
TextAlignment="Right" />
|
||||
<Slider
|
||||
Name="WindowWidthValue"
|
||||
Width="250"
|
||||
Margin="0,0,18,0"
|
||||
VerticalAlignment="Center"
|
||||
IsMoveToPointEnabled="True"
|
||||
IsSnapToTickEnabled="True"
|
||||
Maximum="1920"
|
||||
Minimum="400"
|
||||
TickFrequency="10"
|
||||
Value="{Binding WindowWidthSize, Mode=TwoWay}" />
|
||||
</StackPanel>
|
||||
<TextBlock Style="{StaticResource Glyph}">
|
||||

|
||||
</TextBlock>
|
||||
</ItemsControl>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Grid.Row="3">
|
||||
<Border
|
||||
Height="64"
|
||||
Margin="0,8,0,0"
|
||||
CornerRadius="5 5 0 0"
|
||||
Style="{DynamicResource SettingGroupBox}">
|
||||
<ItemsControl Style="{StaticResource SettingGrid}">
|
||||
<StackPanel Style="{StaticResource TextPanel}">
|
||||
<TextBlock Style="{DynamicResource SettingTitleLabel}" Text="{DynamicResource theme}" />
|
||||
</StackPanel>
|
||||
<TextBlock Style="{StaticResource Glyph}">
|
||||

|
||||
</TextBlock>
|
||||
</ItemsControl>
|
||||
</Border>
|
||||
<Border
|
||||
Margin="0,0,0,0"
|
||||
Padding="0"
|
||||
HorizontalAlignment="Stretch"
|
||||
BorderThickness="1,0,1,1"
|
||||
CornerRadius="0 0 5 5"
|
||||
Style="{DynamicResource SettingGroupBox}">
|
||||
<ListBox
|
||||
Margin="12,12,12,12"
|
||||
HorizontalAlignment="Center"
|
||||
HorizontalContentAlignment="Center"
|
||||
ui:ScrollViewerHelper.AutoHideScrollBars="True"
|
||||
Background="#ffffff"
|
||||
ItemsSource="{Binding Themes}"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Disabled"
|
||||
SelectedItem="{Binding SelectedTheme}">
|
||||
<ListBox.ItemContainerStyle>
|
||||
<Style TargetType="ListBoxItem">
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
|
||||
<Setter Property="VerticalContentAlignment" Value="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
|
||||
<Setter Property="Padding" Value="0,0,0,0" />
|
||||
<Setter Property="Margin" Value="4" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ListBoxItem}">
|
||||
<Border
|
||||
x:Name="Bd"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
Background="{DynamicResource Color12B}"
|
||||
BorderBrush="{DynamicResource Color03B}"
|
||||
BorderThickness="1,1,1,0"
|
||||
CornerRadius="4"
|
||||
SnapsToDevicePixels="true">
|
||||
<Border
|
||||
x:Name="Bd2"
|
||||
BorderBrush="{DynamicResource Color14B}"
|
||||
BorderThickness="0,0,0,2"
|
||||
CornerRadius="4">
|
||||
<ContentPresenter
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
||||
</Border>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="true">
|
||||
<Setter TargetName="Bd" Property="Background" Value="{DynamicResource ThemeHoverButton}" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsSelected" Value="true">
|
||||
<Setter TargetName="Bd" Property="Background" Value="{DynamicResource ToggleSwitchFillOn}" />
|
||||
<Setter TargetName="Bd2" Property="BorderThickness" Value="0" />
|
||||
<Setter TargetName="Bd2" Property="TextElement.Foreground" Value="{DynamicResource Color02B}" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</ListBox.ItemContainerStyle>
|
||||
<ListBox.Template>
|
||||
<!-- For Scroll Wheel inside listbox area -->
|
||||
<ControlTemplate>
|
||||
<ItemsPresenter />
|
||||
</ControlTemplate>
|
||||
</ListBox.Template>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid
|
||||
Width="Auto"
|
||||
Height="34"
|
||||
Margin="0,0,0,0">
|
||||
<TextBlock
|
||||
x:Name="ThemeName"
|
||||
Margin="0"
|
||||
Padding="14,12,14,12"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Focusable="True"
|
||||
FontSize="12"
|
||||
Text="{Binding}"
|
||||
TextWrapping="Wrap" />
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel />
|
||||
</ItemsPanelTemplate>
|
||||
</ListBox.ItemsPanel>
|
||||
</ListBox>
|
||||
|
||||
</Border>
|
||||
<Border>
|
||||
<TextBlock
|
||||
Margin="10"
|
||||
HorizontalAlignment="Right"
|
||||
DockPanel.Dock="Top">
|
||||
<Hyperlink NavigateUri="{Binding ThemeGallery, Mode=OneWay}">
|
||||
<Run Text="{DynamicResource browserMoreThemes}" />
|
||||
</Hyperlink>
|
||||
</TextBlock>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
|
||||
|
||||
<StackPanel
|
||||
Grid.Row="4"
|
||||
Margin="0,0,0,10"
|
||||
Orientation="Vertical">
|
||||
|
||||
<Border
|
||||
Margin="0,30,0,0"
|
||||
Padding="0"
|
||||
CornerRadius="5"
|
||||
Style="{DynamicResource SettingGroupBox}">
|
||||
<StackPanel Orientation="Vertical">
|
||||
<Border
|
||||
Margin="0"
|
||||
BorderThickness="0"
|
||||
Style="{DynamicResource SettingGroupBox}">
|
||||
<ItemsControl Style="{StaticResource SettingGrid}">
|
||||
<StackPanel Style="{StaticResource TextPanel}">
|
||||
<TextBlock Style="{DynamicResource SettingTitleLabel}" Text="{DynamicResource useGlyphUI}" />
|
||||
<TextBlock Style="{DynamicResource SettingSubTitleLabel}" Text="{DynamicResource useGlyphUIEffect}" />
|
||||
</StackPanel>
|
||||
<ui:ToggleSwitch
|
||||
Grid.Row="0"
|
||||
Grid.Column="2"
|
||||
IsOn="{Binding UseGlyphIcons, Mode=TwoWay}"
|
||||
Style="{DynamicResource SideToggleSwitch}" />
|
||||
<TextBlock Style="{StaticResource Glyph}">
|
||||

|
||||
</TextBlock>
|
||||
</ItemsControl>
|
||||
</Border>
|
||||
<Separator
|
||||
Width="Auto"
|
||||
BorderThickness="1"
|
||||
Style="{StaticResource SettingSeparatorStyle}" />
|
||||
<Border
|
||||
Margin="0"
|
||||
BorderThickness="0"
|
||||
Style="{DynamicResource SettingGroupBox}">
|
||||
<ItemsControl Style="{StaticResource SettingGrid}">
|
||||
<TextBlock
|
||||
Grid.Column="1"
|
||||
VerticalAlignment="Center"
|
||||
Style="{DynamicResource SettingTitleLabel}"
|
||||
Text="{DynamicResource queryBoxFont}" />
|
||||
<StackPanel
|
||||
Grid.Column="2"
|
||||
Margin="0,0,20,0"
|
||||
Orientation="Horizontal">
|
||||
<ComboBox
|
||||
Width="180"
|
||||
Margin="20,0,0,0"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Top"
|
||||
IsSynchronizedWithCurrentItem="False"
|
||||
ItemsSource="{Binding Source={StaticResource SortedFonts}}"
|
||||
SelectedItem="{Binding SelectedQueryBoxFont}" />
|
||||
<ComboBox
|
||||
Width="130"
|
||||
Margin="10,0,0,0"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Top"
|
||||
ItemsSource="{Binding SelectedQueryBoxFont.FamilyTypefaces}"
|
||||
SelectedItem="{Binding SelectedQueryBoxFontFaces}">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<ItemsControl ItemsSource="{Binding AdjustedFaceNames}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Value}" />
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
</StackPanel>
|
||||
<TextBlock Style="{StaticResource Glyph}">
|
||||

|
||||
</TextBlock>
|
||||
</ItemsControl>
|
||||
</Border>
|
||||
<Separator
|
||||
Width="Auto"
|
||||
BorderThickness="1"
|
||||
Style="{StaticResource SettingSeparatorStyle}" />
|
||||
<Border
|
||||
Margin="0"
|
||||
BorderThickness="0"
|
||||
Style="{DynamicResource SettingGroupBox}">
|
||||
<ItemsControl Style="{StaticResource SettingGrid}">
|
||||
<TextBlock
|
||||
Grid.Column="1"
|
||||
VerticalAlignment="Center"
|
||||
Style="{DynamicResource SettingTitleLabel}"
|
||||
Text="{DynamicResource resultItemFont}" />
|
||||
<StackPanel
|
||||
Grid.Column="2"
|
||||
Margin="0,0,20,0"
|
||||
Orientation="Horizontal">
|
||||
<ComboBox
|
||||
Width="180"
|
||||
Margin="20,-2,0,0"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Top"
|
||||
IsSynchronizedWithCurrentItem="False"
|
||||
ItemsSource="{Binding Source={StaticResource SortedFonts}}"
|
||||
SelectedItem="{Binding SelectedResultFont}" />
|
||||
<ComboBox
|
||||
Width="130"
|
||||
Margin="10,-2,0,0"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Top"
|
||||
ItemsSource="{Binding SelectedResultFont.FamilyTypefaces}"
|
||||
SelectedItem="{Binding SelectedResultFontFaces}">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<ItemsControl ItemsSource="{Binding AdjustedFaceNames}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Value}" />
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
</StackPanel>
|
||||
<TextBlock Style="{StaticResource Glyph}">
|
||||

|
||||
</TextBlock>
|
||||
</ItemsControl>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<StackPanel>
|
||||
|
||||
<Border
|
||||
Margin="0,24,0,12"
|
||||
Padding="0"
|
||||
CornerRadius="5"
|
||||
Style="{DynamicResource SettingGroupBox}">
|
||||
<StackPanel Orientation="Vertical">
|
||||
<Border
|
||||
Margin="0"
|
||||
BorderThickness="0"
|
||||
Style="{DynamicResource SettingGroupBox}">
|
||||
<ItemsControl Style="{StaticResource SettingGrid}">
|
||||
<StackPanel Style="{StaticResource TextPanel}">
|
||||
<TextBlock Style="{DynamicResource SettingTitleLabel}" Text="{DynamicResource Clock}" />
|
||||
</StackPanel>
|
||||
<StackPanel
|
||||
Grid.Row="0"
|
||||
Grid.Column="2"
|
||||
Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Margin="0,0,10,0"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="14"
|
||||
Foreground="{DynamicResource Color04B}"
|
||||
Text="{Binding ClockText}" />
|
||||
<ComboBox
|
||||
x:Name="TimeFormat"
|
||||
Grid.Column="2"
|
||||
MinWidth="180"
|
||||
Margin="0,0,18,0"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="14"
|
||||
ItemsSource="{Binding TimeFormatList}"
|
||||
SelectedItem="{Binding TimeFormat}" />
|
||||
<ui:ToggleSwitch
|
||||
IsOn="{Binding UseClock, Mode=TwoWay}"
|
||||
OffContent="{DynamicResource disable}"
|
||||
OnContent="{DynamicResource enable}"
|
||||
Style="{DynamicResource SideToggleSwitch}" />
|
||||
</StackPanel>
|
||||
<TextBlock Style="{StaticResource Glyph}">
|
||||

|
||||
</TextBlock>
|
||||
</ItemsControl>
|
||||
</Border>
|
||||
<Separator
|
||||
Width="Auto"
|
||||
BorderThickness="1"
|
||||
Style="{StaticResource SettingSeparatorStyle}" />
|
||||
<Border
|
||||
Margin="0"
|
||||
BorderThickness="0"
|
||||
Style="{DynamicResource SettingGroupBox}">
|
||||
<ItemsControl Style="{StaticResource SettingGrid}">
|
||||
<StackPanel Style="{StaticResource TextPanel}">
|
||||
<TextBlock Style="{DynamicResource SettingTitleLabel}" Text="{DynamicResource Date}" />
|
||||
</StackPanel>
|
||||
<StackPanel
|
||||
Grid.Row="0"
|
||||
Grid.Column="2"
|
||||
Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Margin="0,0,10,0"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="14"
|
||||
Foreground="{DynamicResource Color04B}"
|
||||
Text="{Binding DateText}" />
|
||||
<ComboBox
|
||||
x:Name="DateFormat"
|
||||
Grid.Column="2"
|
||||
MinWidth="180"
|
||||
Margin="0,0,18,0"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="14"
|
||||
ItemsSource="{Binding DateFormatList}"
|
||||
SelectedItem="{Binding DateFormat}" />
|
||||
<ui:ToggleSwitch
|
||||
IsOn="{Binding UseDate, Mode=TwoWay}"
|
||||
OffContent="{DynamicResource disable}"
|
||||
OnContent="{DynamicResource enable}"
|
||||
Style="{DynamicResource SideToggleSwitch}" />
|
||||
</StackPanel>
|
||||
<TextBlock Style="{StaticResource Glyph}">
|
||||

|
||||
</TextBlock>
|
||||
</ItemsControl>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<Border
|
||||
Margin="0,12,0,12"
|
||||
Padding="0"
|
||||
CornerRadius="5"
|
||||
Style="{DynamicResource SettingGroupBox}">
|
||||
<StackPanel Orientation="Vertical">
|
||||
<Border
|
||||
Margin="0"
|
||||
BorderThickness="0"
|
||||
Style="{DynamicResource SettingGroupBox}">
|
||||
<ItemsControl Style="{StaticResource SettingGrid}">
|
||||
<StackPanel Style="{StaticResource TextPanel}">
|
||||
<TextBlock Style="{DynamicResource SettingTitleLabel}" Text="{DynamicResource Animation}" />
|
||||
<TextBlock Style="{DynamicResource SettingSubTitleLabel}" Text="{DynamicResource AnimationTip}" />
|
||||
</StackPanel>
|
||||
<ui:ToggleSwitch
|
||||
x:Name="Animation"
|
||||
Grid.Row="0"
|
||||
Grid.Column="2"
|
||||
IsOn="{Binding UseAnimation, Mode=TwoWay}"
|
||||
OffContent="{DynamicResource disable}"
|
||||
OnContent="{DynamicResource enable}"
|
||||
Style="{DynamicResource SideToggleSwitch}" />
|
||||
<TextBlock Style="{StaticResource Glyph}">
|
||||

|
||||
</TextBlock>
|
||||
</ItemsControl>
|
||||
</Border>
|
||||
<Separator
|
||||
Width="Auto"
|
||||
BorderThickness="1"
|
||||
Style="{StaticResource SettingSeparatorStyle}" />
|
||||
<Border Margin="0" BorderThickness="0">
|
||||
<Border.Style>
|
||||
<Style BasedOn="{StaticResource SettingGroupBox}" TargetType="Border">
|
||||
<Setter Property="Visibility" Value="Collapsed" />
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding ElementName=Animation, Path=IsOn}" Value="True">
|
||||
<Setter Property="Visibility" Value="Visible" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Border.Style>
|
||||
|
||||
<ItemsControl Style="{StaticResource SettingGrid}">
|
||||
<StackPanel Style="{StaticResource TextPanel}">
|
||||
<TextBlock Style="{DynamicResource SettingTitleLabel}" Text="{DynamicResource AnimationSpeed}" />
|
||||
<TextBlock Style="{DynamicResource SettingSubTitleLabel}" Text="{DynamicResource AnimationSpeedTip}" />
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Column="2" Orientation="Horizontal">
|
||||
<ComboBox
|
||||
x:Name="AnimationSpeed"
|
||||
MinWidth="160"
|
||||
Margin="0,0,18,0"
|
||||
VerticalAlignment="Center"
|
||||
DisplayMemberPath="Display"
|
||||
FontSize="14"
|
||||
ItemsSource="{Binding AnimationSpeeds}"
|
||||
SelectedValue="{Binding Settings.AnimationSpeed}"
|
||||
SelectedValuePath="Value" />
|
||||
<StackPanel Margin="0,0,18,0" Orientation="Horizontal">
|
||||
<StackPanel.Style>
|
||||
<Style TargetType="StackPanel">
|
||||
<Setter Property="Visibility" Value="Collapsed" />
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding ElementName=AnimationSpeed, Path=SelectedValue}" Value="{x:Static userSettings:AnimationSpeeds.Custom}">
|
||||
<Setter Property="Visibility" Value="Visible" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</StackPanel.Style>
|
||||
<TextBox
|
||||
Height="35"
|
||||
MinWidth="80"
|
||||
Text="{Binding Settings.CustomAnimationLength}"
|
||||
TextWrapping="NoWrap" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
<TextBlock Style="{StaticResource Glyph}">
|
||||

|
||||
</TextBlock>
|
||||
</ItemsControl>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<Border
|
||||
Margin="0,12,0,12"
|
||||
Padding="0"
|
||||
CornerRadius="5"
|
||||
Style="{DynamicResource SettingGroupBox}">
|
||||
<StackPanel Orientation="Vertical">
|
||||
<Border
|
||||
Margin="0"
|
||||
BorderThickness="0"
|
||||
Style="{DynamicResource SettingGroupBox}">
|
||||
<ItemsControl Style="{StaticResource SettingGrid}">
|
||||
<StackPanel Style="{StaticResource TextPanel}">
|
||||
<TextBlock Style="{DynamicResource SettingTitleLabel}" Text="{DynamicResource SoundEffect}" />
|
||||
<TextBlock Style="{DynamicResource SettingSubTitleLabel}" Text="{DynamicResource SoundEffectTip}" />
|
||||
</StackPanel>
|
||||
<ui:ToggleSwitch
|
||||
x:Name="SoundEffect"
|
||||
Grid.Row="0"
|
||||
Grid.Column="2"
|
||||
IsOn="{Binding UseSound, Mode=TwoWay}"
|
||||
OffContent="{DynamicResource disable}"
|
||||
OnContent="{DynamicResource enable}"
|
||||
Style="{DynamicResource SideToggleSwitch}" />
|
||||
<TextBlock Style="{StaticResource Glyph}">
|
||||

|
||||
</TextBlock>
|
||||
</ItemsControl>
|
||||
</Border>
|
||||
<Separator
|
||||
Width="Auto"
|
||||
BorderThickness="1"
|
||||
Style="{StaticResource SettingSeparatorStyle}" />
|
||||
<Border Margin="0" BorderThickness="0">
|
||||
<Border.Style>
|
||||
<Style BasedOn="{StaticResource SettingGroupBox}" TargetType="Border">
|
||||
<Setter Property="Visibility" Value="Collapsed" />
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding ElementName=SoundEffect, Path=IsOn}" Value="True">
|
||||
<Setter Property="Visibility" Value="Visible" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Border.Style>
|
||||
|
||||
<ItemsControl Style="{StaticResource SettingGrid}">
|
||||
<StackPanel Style="{StaticResource TextPanel}">
|
||||
<TextBlock Style="{DynamicResource SettingTitleLabel}" Text="{DynamicResource SoundEffectVolume}" />
|
||||
<TextBlock Style="{DynamicResource SettingSubTitleLabel}" Text="{DynamicResource SoundEffectVolumeTip}" />
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Column="2" Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Width="Auto"
|
||||
Margin="0,0,8,2"
|
||||
VerticalAlignment="Center"
|
||||
Foreground="{DynamicResource Color05B}"
|
||||
Text="{Binding ElementName=SoundEffectValue, Path=Value, UpdateSourceTrigger=PropertyChanged}"
|
||||
TextAlignment="Right" />
|
||||
<Slider
|
||||
Name="SoundEffectValue"
|
||||
Width="250"
|
||||
Margin="0,0,18,0"
|
||||
VerticalAlignment="Center"
|
||||
IsMoveToPointEnabled="True"
|
||||
IsSnapToTickEnabled="True"
|
||||
Maximum="100"
|
||||
Minimum="0"
|
||||
TickFrequency="1"
|
||||
Value="{Binding SoundEffectVolume, Mode=TwoWay}" />
|
||||
</StackPanel>
|
||||
<TextBlock Style="{StaticResource Glyph}">
|
||||

|
||||
</TextBlock>
|
||||
</ItemsControl>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<Border Margin="0,12,0,12" Style="{DynamicResource SettingGroupBox}">
|
||||
<ItemsControl Style="{StaticResource SettingGrid}">
|
||||
<StackPanel Style="{StaticResource TextPanel}">
|
||||
<TextBlock Style="{DynamicResource SettingTitleLabel}" Text="{DynamicResource ColorScheme}" />
|
||||
</StackPanel>
|
||||
<ComboBox
|
||||
x:Name="ColorSchemeComboBox"
|
||||
Grid.Column="2"
|
||||
MinWidth="180"
|
||||
Margin="0,0,18,0"
|
||||
DisplayMemberPath="Display"
|
||||
FontSize="14"
|
||||
ItemsSource="{Binding ColorSchemes}"
|
||||
SelectedValue="{Binding Settings.ColorScheme}"
|
||||
SelectedValuePath="Value" />
|
||||
<TextBlock Style="{StaticResource Glyph}">
|
||||

|
||||
</TextBlock>
|
||||
</ItemsControl>
|
||||
</Border>
|
||||
|
||||
<Border Margin="0,0,0,0" Style="{DynamicResource SettingGroupBox}">
|
||||
<ItemsControl Style="{StaticResource SettingGrid}">
|
||||
<StackPanel Style="{StaticResource TextPanel}">
|
||||
<TextBlock Style="{DynamicResource SettingTitleLabel}" Text="{DynamicResource ThemeFolder}" />
|
||||
</StackPanel>
|
||||
<Button
|
||||
Grid.Column="2"
|
||||
MinWidth="180"
|
||||
Margin="0,0,18,0"
|
||||
HorizontalAlignment="Center"
|
||||
Content="{DynamicResource OpenThemeFolder}"
|
||||
DockPanel.Dock="Top" />
|
||||
<TextBlock Style="{StaticResource Glyph}">
|
||||

|
||||
</TextBlock>
|
||||
</ItemsControl>
|
||||
</Border>
|
||||
<Border>
|
||||
<TextBlock
|
||||
Margin="10,10,10,18"
|
||||
HorizontalAlignment="Right"
|
||||
DockPanel.Dock="Top">
|
||||
<Hyperlink NavigateUri="{Binding Theme, Mode=OneWay}">
|
||||
<Run Text="{DynamicResource howToCreateTheme}" />
|
||||
</Hyperlink>
|
||||
</TextBlock>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
</ui:Page>
|
||||
25
Flow.Launcher/SettingPages/Views/Theme.xaml.cs
Normal file
25
Flow.Launcher/SettingPages/Views/Theme.xaml.cs
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace Flow.Launcher.SettingPages.Views
|
||||
{
|
||||
public partial class Theme
|
||||
{
|
||||
public Theme()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -42,7 +42,7 @@ namespace Flow.Launcher
|
|||
API = api;
|
||||
InitializePosition();
|
||||
InitializeComponent();
|
||||
|
||||
NavView.SelectedItem = NavView.MenuItems[0]; /* Set First Page */
|
||||
}
|
||||
|
||||
#region General
|
||||
|
|
@ -54,28 +54,28 @@ namespace Flow.Launcher
|
|||
// https://stackoverflow.com/questions/4951058/software-rendering-mode-wpf
|
||||
HwndSource hwndSource = PresentationSource.FromVisual(this) as HwndSource;
|
||||
HwndTarget hwndTarget = hwndSource.CompositionTarget;
|
||||
hwndTarget.RenderMode = RenderMode.SoftwareOnly;
|
||||
hwndTarget.RenderMode = RenderMode.Default;
|
||||
|
||||
pluginListView = (CollectionView)CollectionViewSource.GetDefaultView(Plugins.ItemsSource);
|
||||
pluginListView.Filter = PluginListFilter;
|
||||
//pluginListView = (CollectionView)CollectionViewSource.GetDefaultView(Plugins.ItemsSource);
|
||||
//pluginListView.Filter = PluginListFilter;
|
||||
|
||||
pluginStoreView = (CollectionView)CollectionViewSource.GetDefaultView(StoreListBox.ItemsSource);
|
||||
pluginStoreView.Filter = PluginStoreFilter;
|
||||
//pluginStoreView = (CollectionView)CollectionViewSource.GetDefaultView(StoreListBox.ItemsSource);
|
||||
//pluginStoreView.Filter = PluginStoreFilter;
|
||||
|
||||
viewModel.PropertyChanged += new PropertyChangedEventHandler(SettingsWindowViewModelChanged);
|
||||
//viewModel.PropertyChanged += new PropertyChangedEventHandler(SettingsWindowViewModelChanged);
|
||||
|
||||
InitializePosition();
|
||||
}
|
||||
|
||||
private void SettingsWindowViewModelChanged(object sender, PropertyChangedEventArgs e)
|
||||
{
|
||||
if (e.PropertyName == nameof(viewModel.ExternalPlugins))
|
||||
{
|
||||
pluginStoreView = (CollectionView)CollectionViewSource.GetDefaultView(StoreListBox.ItemsSource);
|
||||
pluginStoreView.Filter = PluginStoreFilter;
|
||||
pluginStoreView.Refresh();
|
||||
}
|
||||
}
|
||||
//private void SettingsWindowViewModelChanged(object sender, PropertyChangedEventArgs e)
|
||||
//{
|
||||
// if (e.PropertyName == nameof(viewModel.ExternalPlugins))
|
||||
// {
|
||||
// pluginStoreView = (CollectionView)CollectionViewSource.GetDefaultView(StoreListBox.ItemsSource);
|
||||
// pluginStoreView.Filter = PluginStoreFilter;
|
||||
// pluginStoreView.Refresh();
|
||||
// }
|
||||
//}
|
||||
|
||||
private void OnSelectPythonPathClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
|
|
@ -375,75 +375,75 @@ namespace Flow.Launcher
|
|||
private CollectionView pluginListView;
|
||||
private CollectionView pluginStoreView;
|
||||
|
||||
private bool PluginListFilter(object item)
|
||||
{
|
||||
if (string.IsNullOrEmpty(pluginFilterTxb.Text))
|
||||
return true;
|
||||
if (item is PluginViewModel model)
|
||||
{
|
||||
return StringMatcher.FuzzySearch(pluginFilterTxb.Text, model.PluginPair.Metadata.Name).IsSearchPrecisionScoreMet();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
//private bool PluginListFilter(object item)
|
||||
//{
|
||||
// if (string.IsNullOrEmpty(pluginFilterTxb.Text))
|
||||
// return true;
|
||||
// if (item is PluginViewModel model)
|
||||
// {
|
||||
// return StringMatcher.FuzzySearch(pluginFilterTxb.Text, model.PluginPair.Metadata.Name).IsSearchPrecisionScoreMet();
|
||||
// }
|
||||
// return false;
|
||||
//}
|
||||
|
||||
private bool PluginStoreFilter(object item)
|
||||
{
|
||||
if (string.IsNullOrEmpty(pluginStoreFilterTxb.Text))
|
||||
return true;
|
||||
if (item is PluginStoreItemViewModel model)
|
||||
{
|
||||
return StringMatcher.FuzzySearch(pluginStoreFilterTxb.Text, model.Name).IsSearchPrecisionScoreMet()
|
||||
|| StringMatcher.FuzzySearch(pluginStoreFilterTxb.Text, model.Description).IsSearchPrecisionScoreMet();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
//private bool PluginStoreFilter(object item)
|
||||
//{
|
||||
// if (string.IsNullOrEmpty(pluginStoreFilterTxb.Text))
|
||||
// return true;
|
||||
// if (item is PluginStoreItemViewModel model)
|
||||
// {
|
||||
// return StringMatcher.FuzzySearch(pluginStoreFilterTxb.Text, model.Name).IsSearchPrecisionScoreMet()
|
||||
// || StringMatcher.FuzzySearch(pluginStoreFilterTxb.Text, model.Description).IsSearchPrecisionScoreMet();
|
||||
// }
|
||||
// return false;
|
||||
//}
|
||||
|
||||
private string lastPluginListSearch = "";
|
||||
private string lastPluginStoreSearch = "";
|
||||
|
||||
private void RefreshPluginListEventHandler(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (pluginFilterTxb.Text != lastPluginListSearch)
|
||||
{
|
||||
lastPluginListSearch = pluginFilterTxb.Text;
|
||||
pluginListView.Refresh();
|
||||
}
|
||||
}
|
||||
//private void RefreshPluginListEventHandler(object sender, RoutedEventArgs e)
|
||||
//{
|
||||
// if (pluginFilterTxb.Text != lastPluginListSearch)
|
||||
// {
|
||||
// lastPluginListSearch = pluginFilterTxb.Text;
|
||||
// pluginListView.Refresh();
|
||||
// }
|
||||
//}
|
||||
|
||||
private void RefreshPluginStoreEventHandler(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (pluginStoreFilterTxb.Text != lastPluginStoreSearch)
|
||||
{
|
||||
lastPluginStoreSearch = pluginStoreFilterTxb.Text;
|
||||
pluginStoreView.Refresh();
|
||||
}
|
||||
}
|
||||
//private void RefreshPluginStoreEventHandler(object sender, RoutedEventArgs e)
|
||||
//{
|
||||
// if (pluginStoreFilterTxb.Text != lastPluginStoreSearch)
|
||||
// {
|
||||
// lastPluginStoreSearch = pluginStoreFilterTxb.Text;
|
||||
// pluginStoreView.Refresh();
|
||||
// }
|
||||
//}
|
||||
|
||||
private void PluginFilterTxb_OnKeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (e.Key == Key.Enter)
|
||||
RefreshPluginListEventHandler(sender, e);
|
||||
}
|
||||
//private void PluginFilterTxb_OnKeyDown(object sender, KeyEventArgs e)
|
||||
//{
|
||||
// if (e.Key == Key.Enter)
|
||||
// RefreshPluginListEventHandler(sender, e);
|
||||
//}
|
||||
|
||||
private void PluginStoreFilterTxb_OnKeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (e.Key == Key.Enter)
|
||||
RefreshPluginStoreEventHandler(sender, e);
|
||||
}
|
||||
//private void PluginStoreFilterTxb_OnKeyDown(object sender, KeyEventArgs e)
|
||||
//{
|
||||
// if (e.Key == Key.Enter)
|
||||
// RefreshPluginStoreEventHandler(sender, e);
|
||||
//}
|
||||
|
||||
private void OnPluginSettingKeydown(object sender, KeyEventArgs e)
|
||||
{
|
||||
if ((Keyboard.Modifiers & ModifierKeys.Control) == ModifierKeys.Control && e.Key == Key.F)
|
||||
pluginFilterTxb.Focus();
|
||||
}
|
||||
//private void OnPluginSettingKeydown(object sender, KeyEventArgs e)
|
||||
//{
|
||||
// if ((Keyboard.Modifiers & ModifierKeys.Control) == ModifierKeys.Control && e.Key == Key.F)
|
||||
// pluginFilterTxb.Focus();
|
||||
//}
|
||||
|
||||
private void PluginStore_OnKeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (e.Key == Key.F && (Keyboard.Modifiers & ModifierKeys.Control) != 0)
|
||||
{
|
||||
pluginStoreFilterTxb.Focus();
|
||||
}
|
||||
}
|
||||
//private void PluginStore_OnKeyDown(object sender, KeyEventArgs e)
|
||||
//{
|
||||
// if (e.Key == Key.F && (Keyboard.Modifiers & ModifierKeys.Control) != 0)
|
||||
// {
|
||||
// pluginStoreFilterTxb.Focus();
|
||||
// }
|
||||
//}
|
||||
|
||||
public void InitializePosition()
|
||||
{
|
||||
|
|
@ -495,15 +495,15 @@ namespace Flow.Launcher
|
|||
|
||||
}
|
||||
|
||||
private void PluginStore_GotFocus(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Keyboard.Focus(pluginStoreFilterTxb);
|
||||
}
|
||||
//private void PluginStore_GotFocus(object sender, RoutedEventArgs e)
|
||||
//{
|
||||
// Keyboard.Focus(pluginStoreFilterTxb);
|
||||
//}
|
||||
|
||||
private void Plugin_GotFocus(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Keyboard.Focus(pluginFilterTxb);
|
||||
}
|
||||
//private void Plugin_GotFocus(object sender, RoutedEventArgs e)
|
||||
//{
|
||||
// Keyboard.Focus(pluginFilterTxb);
|
||||
//}
|
||||
|
||||
/** For Navigation View **/
|
||||
private void NavigationView_SelectionChanged(ModernWpf.Controls.NavigationView sender, ModernWpf.Controls.NavigationViewSelectionChangedEventArgs args)
|
||||
|
|
|
|||
|
|
@ -481,29 +481,6 @@ namespace Flow.Launcher.ViewModel
|
|||
}
|
||||
}
|
||||
|
||||
public class SearchWindowScreen
|
||||
{
|
||||
public string Display { get; set; }
|
||||
public SearchWindowScreens Value { get; set; }
|
||||
}
|
||||
|
||||
public List<SearchWindowScreen> SearchWindowScreens
|
||||
{
|
||||
get
|
||||
{
|
||||
List<SearchWindowScreen> modes = new List<SearchWindowScreen>();
|
||||
var enums = (SearchWindowScreens[])Enum.GetValues(typeof(SearchWindowScreens));
|
||||
foreach (var e in enums)
|
||||
{
|
||||
var key = $"SearchWindowScreen{e}";
|
||||
var display = _translater.GetTranslation(key);
|
||||
var m = new SearchWindowScreen { Display = display, Value = e, };
|
||||
modes.Add(m);
|
||||
}
|
||||
|
||||
return modes;
|
||||
}
|
||||
}
|
||||
|
||||
public class SearchWindowAlign
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue