Merge branch 'dev' into UpdateWording

This commit is contained in:
DB P 2022-11-18 21:00:49 +09:00 committed by GitHub
commit 9487aa054c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 884 additions and 369 deletions

View file

@ -1,4 +1,4 @@
using System.Diagnostics;
using System.Diagnostics;
using System.IO;
using System.Reflection;
@ -21,6 +21,7 @@ namespace Flow.Launcher.Infrastructure
public static readonly string PreinstalledDirectory = Path.Combine(ProgramDirectory, Plugins);
public const string Issue = "https://github.com/Flow-Launcher/Flow.Launcher/issues/new";
public static readonly string Version = FileVersionInfo.GetVersionInfo(Assembly.Location.NonNull()).ProductVersion;
public static readonly string Dev = "Dev";
public const string Documentation = "https://flowlauncher.com/docs/#/usage-tips";
public static readonly int ThumbnailSize = 64;

View file

@ -38,9 +38,8 @@
FontSize="13"
FontWeight="SemiBold"
Foreground="{DynamicResource Color05B}"
Visibility="Visible">
Press key
</TextBlock>
Text="{DynamicResource flowlauncherPressHotkey}"
Visibility="Visible" />
</Border>
</Popup>
@ -49,8 +48,8 @@
Margin="0,0,18,0"
VerticalContentAlignment="Center"
input:InputMethod.IsInputMethodEnabled="False"
LostFocus="tbHotkey_LostFocus"
PreviewKeyDown="TbHotkey_OnPreviewKeyDown"
TabIndex="100"
LostFocus="tbHotkey_LostFocus"/>
TabIndex="100" />
</Grid>
</UserControl>

View file

@ -9,6 +9,7 @@ using Flow.Launcher.Helper;
using Flow.Launcher.Infrastructure.Hotkey;
using Flow.Launcher.Plugin;
using System.Threading;
using System.Windows.Interop;
namespace Flow.Launcher
{
@ -113,7 +114,7 @@ namespace Flow.Launcher
private void tbHotkey_LostFocus(object sender, RoutedEventArgs e)
{
tbMsg.Text = tbMsgTextOriginal;
tbMsg.Foreground = tbMsgForegroundColorOriginal;
tbMsg.SetResourceReference(TextBox.ForegroundProperty, "Color05B");
}
}
}

View file

@ -27,7 +27,7 @@
<system:String x:Key="PositionResetToolTip">Reset search window position</system:String>
<!-- Setting General -->
<system:String x:Key="flowlauncher_settings">Flow Launcher Settings</system:String>
<system:String x:Key="flowlauncher_settings">Settings</system:String>
<system:String x:Key="general">General</system:String>
<system:String x:Key="portableMode">Portable Mode</system:String>
<system:String x:Key="portableModeToolTIp">Store all settings and user data in one folder (Useful when used with removable drives or cloud services).</system:String>
@ -146,6 +146,7 @@
<system:String x:Key="showOpenResultHotkeyToolTip">Show result selection hotkey with results.</system:String>
<system:String x:Key="customQueryHotkey">Custom Query Hotkey</system:String>
<system:String x:Key="customQueryShortcut">Custom Query Shortcut</system:String>
<system:String x:Key="builtinShortcuts">Built-in Shortcuts</system:String>
<system:String x:Key="customQuery">Query</system:String>
<system:String x:Key="customShortcut">Shortcut</system:String>
<system:String x:Key="customShortcutExpansion">Expanded</system:String>
@ -163,6 +164,7 @@
<system:String x:Key="windowWidthSizeToolTip">You can also quickly adjust this by using Ctrl+[ and Ctrl+].</system:String>
<system:String x:Key="useGlyphUI">Use Segoe Fluent Icons</system:String>
<system:String x:Key="useGlyphUIEffect">Use Segoe Fluent Icons for query results where supported</system:String>
<system:String x:Key="flowlauncherPressHotkey">Press Key</system:String>
<!-- Setting Proxy -->
<system:String x:Key="proxy">HTTP Proxy</system:String>
@ -186,6 +188,7 @@
<system:String x:Key="github">Github</system:String>
<system:String x:Key="docs">Docs</system:String>
<system:String x:Key="version">Version</system:String>
<system:String x:Key="icons">Icons</system:String>
<system:String x:Key="about_activate_times">You have activated Flow Launcher {0} times</system:String>
<system:String x:Key="checkUpdates">Check for Updates</system:String>
<system:String x:Key="newVersionTips">New version {0} is available, would you like to restart Flow Launcher to use the update?</system:String>

View file

@ -1,4 +1,5 @@
<Window x:Class="Flow.Launcher.MainWindow"
<Window
x:Class="Flow.Launcher.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:converters="clr-namespace:Flow.Launcher.Converters"
@ -6,6 +7,7 @@
xmlns:flowlauncher="clr-namespace:Flow.Launcher"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:svgc="http://sharpvectors.codeplex.com/svgc/"
xmlns:ui="http://schemas.modernwpf.com/2019"
xmlns:vm="clr-namespace:Flow.Launcher.ViewModel"
Name="FlowMainWindow"
Title="Flow Launcher"
@ -38,48 +40,52 @@
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
</Window.Resources>
<Window.InputBindings>
<KeyBinding Key="Escape"
Command="{Binding EscCommand}" />
<KeyBinding Key="F1"
Command="{Binding StartHelpCommand}" />
<KeyBinding Key="F5"
Command="{Binding ReloadPluginDataCommand}" />
<KeyBinding Key="Tab"
Command="{Binding AutocompleteQueryCommand}" />
<KeyBinding Key="Tab"
<KeyBinding Key="Escape" Command="{Binding EscCommand}" />
<KeyBinding Key="F1" Command="{Binding StartHelpCommand}" />
<KeyBinding Key="F5" Command="{Binding ReloadPluginDataCommand}" />
<KeyBinding Key="Tab" Command="{Binding AutocompleteQueryCommand}" />
<KeyBinding
Key="Tab"
Command="{Binding AutocompleteQueryCommand}"
Modifiers="Shift" />
<KeyBinding Key="I"
<KeyBinding
Key="I"
Command="{Binding OpenSettingCommand}"
Modifiers="Ctrl" />
<KeyBinding Key="N"
<KeyBinding
Key="N"
Command="{Binding SelectNextItemCommand}"
Modifiers="Ctrl" />
<KeyBinding Key="J"
<KeyBinding
Key="J"
Command="{Binding SelectNextItemCommand}"
Modifiers="Ctrl" />
<KeyBinding Key="D"
<KeyBinding
Key="D"
Command="{Binding SelectNextPageCommand}"
Modifiers="Ctrl" />
<KeyBinding Key="P"
<KeyBinding
Key="P"
Command="{Binding SelectPrevItemCommand}"
Modifiers="Ctrl" />
<KeyBinding Key="K"
<KeyBinding
Key="K"
Command="{Binding SelectPrevItemCommand}"
Modifiers="Ctrl" />
<KeyBinding Key="U"
<KeyBinding
Key="U"
Command="{Binding SelectPrevPageCommand}"
Modifiers="Ctrl" />
<KeyBinding Key="Home"
<KeyBinding
Key="Home"
Command="{Binding SelectFirstResultCommand}"
Modifiers="Alt" />
<KeyBinding Key="O"
<KeyBinding
Key="O"
Command="{Binding LoadContextMenuCommand}"
Modifiers="Ctrl" />
<KeyBinding Key="Right"
Command="{Binding LoadContextMenuCommand}" />
<KeyBinding Key="Left"
Command="{Binding EscCommand}" />
<KeyBinding Key="Right" Command="{Binding LoadContextMenuCommand}" />
<KeyBinding Key="Left" Command="{Binding EscCommand}" />
<KeyBinding
Key="H"
Command="{Binding LoadHistoryCommand}"
@ -106,81 +112,92 @@
Key="H"
Command="{Binding LoadHistoryCommand}"
Modifiers="Ctrl" />
<KeyBinding Key="Enter"
<KeyBinding
Key="Enter"
Command="{Binding OpenResultCommand}"
Modifiers="Ctrl+Shift" />
<KeyBinding Key="Enter"
<KeyBinding
Key="Enter"
Command="{Binding LoadContextMenuCommand}"
Modifiers="Shift" />
<KeyBinding Key="Enter"
Command="{Binding OpenResultCommand}" />
<KeyBinding Key="Enter"
<KeyBinding Key="Enter" Command="{Binding OpenResultCommand}" />
<KeyBinding
Key="Enter"
Command="{Binding OpenResultCommand}"
Modifiers="Ctrl" />
<KeyBinding Key="Enter"
<KeyBinding
Key="Enter"
Command="{Binding OpenResultCommand}"
Modifiers="Alt" />
<KeyBinding Key="D1"
<KeyBinding
Key="D1"
Command="{Binding OpenResultCommand}"
CommandParameter="0"
Modifiers="{Binding OpenResultCommandModifiers}" />
<KeyBinding Key="D2"
<KeyBinding
Key="D2"
Command="{Binding OpenResultCommand}"
CommandParameter="1"
Modifiers="{Binding OpenResultCommandModifiers}" />
<KeyBinding Key="D3"
<KeyBinding
Key="D3"
Command="{Binding OpenResultCommand}"
CommandParameter="2"
Modifiers="{Binding OpenResultCommandModifiers}" />
<KeyBinding Key="D4"
<KeyBinding
Key="D4"
Command="{Binding OpenResultCommand}"
CommandParameter="3"
Modifiers="{Binding OpenResultCommandModifiers}" />
<KeyBinding Key="D5"
<KeyBinding
Key="D5"
Command="{Binding OpenResultCommand}"
CommandParameter="4"
Modifiers="{Binding OpenResultCommandModifiers}" />
<KeyBinding Key="D6"
<KeyBinding
Key="D6"
Command="{Binding OpenResultCommand}"
CommandParameter="5"
Modifiers="{Binding OpenResultCommandModifiers}" />
<KeyBinding Key="D7"
<KeyBinding
Key="D7"
Command="{Binding OpenResultCommand}"
CommandParameter="6"
Modifiers="{Binding OpenResultCommandModifiers}" />
<KeyBinding Key="D8"
<KeyBinding
Key="D8"
Command="{Binding OpenResultCommand}"
CommandParameter="7"
Modifiers="{Binding OpenResultCommandModifiers}" />
<KeyBinding Key="D9"
<KeyBinding
Key="D9"
Command="{Binding OpenResultCommand}"
CommandParameter="8"
Modifiers="{Binding OpenResultCommandModifiers}" />
<KeyBinding Key="D0"
<KeyBinding
Key="D0"
Command="{Binding OpenResultCommand}"
CommandParameter="9"
Modifiers="{Binding OpenResultCommandModifiers}" />
</Window.InputBindings>
<Grid>
<Border MouseDown="OnMouseDown"
Style="{DynamicResource WindowBorderStyle}">
<Border MouseDown="OnMouseDown" Style="{DynamicResource WindowBorderStyle}">
<StackPanel Orientation="Vertical">
<Grid>
<TextBox x:Name="QueryTextSuggestionBox"
<TextBox
x:Name="QueryTextSuggestionBox"
IsEnabled="False"
Style="{DynamicResource QuerySuggestionBoxStyle}">
<TextBox.Text>
<MultiBinding Converter="{StaticResource QuerySuggestionBoxConverter}">
<Binding ElementName="QueryTextBox"
Mode="OneTime" />
<Binding ElementName="ResultListBox"
Path="SelectedItem" />
<Binding ElementName="QueryTextBox"
Path="Text" />
<Binding ElementName="QueryTextBox" Mode="OneTime" />
<Binding ElementName="ResultListBox" Path="SelectedItem" />
<Binding ElementName="QueryTextBox" Path="Text" />
</MultiBinding>
</TextBox.Text>
</TextBox>
<TextBox x:Name="QueryTextBox"
<TextBox
x:Name="QueryTextBox"
AllowDrop="True"
Background="Transparent"
PreviewDragOver="OnPreviewDragOver"
@ -189,42 +206,60 @@
Text="{Binding QueryText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Visibility="Visible">
<TextBox.CommandBindings>
<CommandBinding Command="ApplicationCommands.Copy"
Executed="OnCopy" />
<CommandBinding Command="ApplicationCommands.Copy" Executed="OnCopy" />
</TextBox.CommandBindings>
<TextBox.ContextMenu>
<ContextMenu>
<MenuItem Command="ApplicationCommands.Cut"
Header="{DynamicResource cut}" />
<MenuItem Command="ApplicationCommands.Copy"
Header="{DynamicResource copy}" />
<MenuItem Command="ApplicationCommands.Paste"
Header="{DynamicResource paste}" />
<Separator Margin="0"
<MenuItem Command="ApplicationCommands.Cut" Header="{DynamicResource cut}">
<MenuItem.Icon>
<ui:FontIcon Glyph="&#xe8c6;" />
</MenuItem.Icon>
</MenuItem>
<MenuItem Command="ApplicationCommands.Copy" Header="{DynamicResource copy}">
<MenuItem.Icon>
<ui:FontIcon Glyph="&#xe8c8;" />
</MenuItem.Icon>
</MenuItem>
<MenuItem Command="ApplicationCommands.Paste" Header="{DynamicResource paste}">
<MenuItem.Icon>
<ui:FontIcon Glyph="&#xe77f;" />
</MenuItem.Icon>
</MenuItem>
<Separator
Margin="0"
Padding="0,4,0,4"
Background="{DynamicResource ContextSeparator}" />
<MenuItem Click="OnContextMenusForSettingsClick"
Header="{DynamicResource flowlauncher_settings}" />
<MenuItem Command="{Binding EscCommand}"
Header="{DynamicResource closeWindow}" />
<MenuItem Click="OnContextMenusForSettingsClick" Header="{DynamicResource flowlauncher_settings}">
<MenuItem.Icon>
<ui:FontIcon Glyph="&#xe713;" />
</MenuItem.Icon>
</MenuItem>
<MenuItem Command="{Binding EscCommand}" Header="{DynamicResource closeWindow}">
<MenuItem.Icon>
<ui:FontIcon Glyph="&#xe711;" />
</MenuItem.Icon>
</MenuItem>
</ContextMenu>
</TextBox.ContextMenu>
</TextBox>
<StackPanel x:Name="ClockPanel"
Style="{DynamicResource ClockPanel}"
IsHitTestVisible="False">
<StackPanel
x:Name="ClockPanel"
IsHitTestVisible="False"
Style="{DynamicResource ClockPanel}">
<TextBlock
Visibility="{Binding Settings.UseDate, Converter={StaticResource BooleanToVisibilityConverter}}"
Style="{DynamicResource DateBox}"
Text="{Binding DateText}" />
<TextBlock Style="{DynamicResource ClockBox}"
Visibility="{Binding Settings.UseClock, Converter={StaticResource BooleanToVisibilityConverter}}"
Text="{Binding ClockText}"/>
Text="{Binding DateText}"
Visibility="{Binding Settings.UseDate, Converter={StaticResource BooleanToVisibilityConverter}}" />
<TextBlock
Style="{DynamicResource ClockBox}"
Text="{Binding ClockText}"
Visibility="{Binding Settings.UseClock, Converter={StaticResource BooleanToVisibilityConverter}}" />
</StackPanel>
<Canvas Style="{DynamicResource SearchIconPosition}">
<Image x:Name="PluginActivationIcon"
<Image
x:Name="PluginActivationIcon"
Width="32"
Height="32"
Margin="0,0,0,0"
@ -235,7 +270,8 @@
Source="{Binding PluginIconPath}"
Stretch="Uniform"
Style="{DynamicResource PluginActivationIcon}" />
<Path Name="SearchIcon"
<Path
Name="SearchIcon"
Margin="0"
Data="{DynamicResource SearchIconImg}"
Stretch="Fill"
@ -248,32 +284,27 @@
<ContentControl>
<ContentControl.Style>
<Style TargetType="ContentControl">
<Setter Property="Visibility"
Value="Collapsed" />
<Setter Property="Visibility" Value="Collapsed" />
<Style.Triggers>
<DataTrigger Binding="{Binding ElementName=ResultListBox, Path=Visibility}"
Value="Visible">
<Setter Property="Visibility"
Value="Visible" />
<DataTrigger Binding="{Binding ElementName=ResultListBox, Path=Visibility}" Value="Visible">
<Setter Property="Visibility" Value="Visible" />
</DataTrigger>
<DataTrigger Binding="{Binding ElementName=ContextMenu, Path=Visibility}"
Value="Visible">
<Setter Property="Visibility"
Value="Visible" />
<DataTrigger Binding="{Binding ElementName=ContextMenu, Path=Visibility}" Value="Visible">
<Setter Property="Visibility" Value="Visible" />
</DataTrigger>
<DataTrigger Binding="{Binding ElementName=History, Path=Visibility}"
Value="Visible">
<Setter Property="Visibility"
Value="Visible" />
<DataTrigger Binding="{Binding ElementName=History, Path=Visibility}" Value="Visible">
<Setter Property="Visibility" Value="Visible" />
</DataTrigger>
</Style.Triggers>
</Style>
</ContentControl.Style>
<Rectangle Width="Auto"
<Rectangle
Width="Auto"
HorizontalAlignment="Stretch"
Style="{DynamicResource SeparatorStyle}" />
</ContentControl>
<Line x:Name="ProgressBar"
<Line
x:Name="ProgressBar"
Width="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Grid}}, Path=ActualWidth}"
Height="2"
HorizontalAlignment="Right"
@ -289,16 +320,14 @@
<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}" />
<Binding Path="ActualWidth" RelativeSource="{RelativeSource Self}" />
<Binding Path="ActualHeight" RelativeSource="{RelativeSource Self}" />
<Binding Path="CornerRadius" RelativeSource="{RelativeSource Self}" />
</MultiBinding>
</Border.Clip>
<ContentControl>
<flowlauncher:ResultListBox x:Name="ResultListBox"
<flowlauncher:ResultListBox
x:Name="ResultListBox"
DataContext="{Binding Results}"
PreviewMouseLeftButtonUp="OnPreviewMouseButtonDown" />
</ContentControl>
@ -306,16 +335,14 @@
<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}" />
<Binding Path="ActualWidth" RelativeSource="{RelativeSource Self}" />
<Binding Path="ActualHeight" RelativeSource="{RelativeSource Self}" />
<Binding Path="CornerRadius" RelativeSource="{RelativeSource Self}" />
</MultiBinding>
</Border.Clip>
<ContentControl>
<flowlauncher:ResultListBox x:Name="ContextMenu"
<flowlauncher:ResultListBox
x:Name="ContextMenu"
DataContext="{Binding ContextMenu}"
PreviewMouseDown="OnPreviewMouseButtonDown" />
</ContentControl>
@ -323,16 +350,14 @@
<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}" />
<Binding Path="ActualWidth" RelativeSource="{RelativeSource Self}" />
<Binding Path="ActualHeight" RelativeSource="{RelativeSource Self}" />
<Binding Path="CornerRadius" RelativeSource="{RelativeSource Self}" />
</MultiBinding>
</Border.Clip>
<ContentControl>
<flowlauncher:ResultListBox x:Name="History"
<flowlauncher:ResultListBox
x:Name="History"
DataContext="{Binding History}"
PreviewMouseDown="OnPreviewMouseButtonDown" />
</ContentControl>

View file

@ -1,4 +1,4 @@
using System;
using System;
using System.ComponentModel;
using System.Threading.Tasks;
using System.Windows;
@ -27,6 +27,9 @@ using Microsoft.AspNetCore.Http;
using System.IO;
using System.Windows.Threading;
using System.Windows.Data;
using ModernWpf.Controls;
using System.Drawing;
using System.Windows.Forms.Design.Behavior;
namespace Flow.Launcher
{
@ -224,11 +227,12 @@ namespace Flow.Launcher
private void UpdateNotifyIconText()
{
var menu = contextMenu;
((MenuItem)menu.Items[1]).Header = InternationalizationManager.Instance.GetTranslation("iconTrayOpen") + " (" + _settings.Hotkey + ")";
((MenuItem)menu.Items[2]).Header = InternationalizationManager.Instance.GetTranslation("GameMode");
((MenuItem)menu.Items[3]).Header = InternationalizationManager.Instance.GetTranslation("PositionReset");
((MenuItem)menu.Items[4]).Header = InternationalizationManager.Instance.GetTranslation("iconTraySettings");
((MenuItem)menu.Items[5]).Header = InternationalizationManager.Instance.GetTranslation("iconTrayExit");
((MenuItem)menu.Items[0]).Header = InternationalizationManager.Instance.GetTranslation("iconTrayOpen") + " (" + _settings.Hotkey + ")";
((MenuItem)menu.Items[1]).Header = InternationalizationManager.Instance.GetTranslation("GameMode");
((MenuItem)menu.Items[2]).Header = InternationalizationManager.Instance.GetTranslation("PositionReset");
((MenuItem)menu.Items[3]).Header = InternationalizationManager.Instance.GetTranslation("iconTraySettings");
((MenuItem)menu.Items[4]).Header = InternationalizationManager.Instance.GetTranslation("iconTrayExit");
}
private void InitializeNotifyIcon()
@ -240,31 +244,35 @@ namespace Flow.Launcher
Visible = !_settings.HideNotifyIcon
};
contextMenu = new ContextMenu();
var header = new MenuItem
{
Header = "Flow Launcher",
IsEnabled = false
};
var openIcon = new FontIcon { Glyph = "\ue71e" };
var open = new MenuItem
{
Header = InternationalizationManager.Instance.GetTranslation("iconTrayOpen") + " (" +_settings.Hotkey + ")"
Header = InternationalizationManager.Instance.GetTranslation("iconTrayOpen") + " (" + _settings.Hotkey + ")",
Icon = openIcon
};
var gamemodeIcon = new FontIcon { Glyph = "\ue7fc" };
var gamemode = new MenuItem
{
Header = InternationalizationManager.Instance.GetTranslation("GameMode")
Header = InternationalizationManager.Instance.GetTranslation("GameMode"),
Icon = gamemodeIcon
};
var positionresetIcon = new FontIcon { Glyph = "\ue73f" };
var positionreset = new MenuItem
{
Header = InternationalizationManager.Instance.GetTranslation("PositionReset")
Header = InternationalizationManager.Instance.GetTranslation("PositionReset"),
Icon = positionresetIcon
};
var settingsIcon = new FontIcon { Glyph = "\ue713" };
var settings = new MenuItem
{
Header = InternationalizationManager.Instance.GetTranslation("iconTraySettings")
Header = InternationalizationManager.Instance.GetTranslation("iconTraySettings"),
Icon = settingsIcon
};
var exitIcon = new FontIcon { Glyph = "\ue7e8" };
var exit = new MenuItem
{
Header = InternationalizationManager.Instance.GetTranslation("iconTrayExit")
Header = InternationalizationManager.Instance.GetTranslation("iconTrayExit"),
Icon = exitIcon
};
open.Click += (o, e) => _viewModel.ToggleFlowLauncher();
@ -272,7 +280,6 @@ namespace Flow.Launcher
positionreset.Click += (o, e) => PositionReset();
settings.Click += (o, e) => App.API.OpenSettingDialog();
exit.Click += (o, e) => Close();
contextMenu.Items.Add(header);
contextMenu.Items.Add(open);
gamemode.ToolTip = InternationalizationManager.Instance.GetTranslation("GameModeToolTip");
positionreset.ToolTip = InternationalizationManager.Instance.GetTranslation("PositionResetToolTip");

View file

@ -1407,7 +1407,8 @@
Padding="{TemplateBinding Padding}"
BorderBrush="{DynamicResource ButtonInsideBorder}"
BorderThickness="{DynamicResource CustomButtonInsideBorderThickness}"
CornerRadius="4">
CornerRadius="4"
SnapsToDevicePixels="True">
<ContentPresenter
x:Name="ContentPresenter"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
@ -2727,73 +2728,491 @@
</Style>
<!--#endregion-->
<Style TargetType="{x:Type MenuItem}">
<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="Background" Value="Transparent" />
<Setter Property="Foreground" Value="{DynamicResource Color05B}" />
<Setter Property="Stylus.IsFlicksEnabled" Value="False" />
<Setter Property="OverridesDefaultStyle" Value="True" />
<system:Double x:Key="MenuBarHeight">40</system:Double>
<Thickness x:Key="MenuFlyoutScrollerMargin">4,4,4,4</Thickness>
<Thickness x:Key="MenuFlyoutItemRevealBorderThickness">1</Thickness>
<Thickness x:Key="ToggleMenuFlyoutItemRevealBorderThickness">1</Thickness>
<Thickness x:Key="MenuFlyoutSubItemRevealBorderThickness">1</Thickness>
<ui:SharedSizeGroupConverter x:Key="SharedSizeGroupConverter" />
<Style x:Key="{ComponentResourceKey TypeInTargetAssembly={x:Type FrameworkElement}, ResourceId=MenuScrollViewer}" TargetType="ScrollViewer">
<Setter Property="HorizontalScrollBarVisibility" Value="Disabled" />
<Setter Property="VerticalScrollBarVisibility" Value="Auto" />
<Setter Property="PanningMode" Value="VerticalOnly" />
</Style>
<Style x:Key="DefaultMenuItemSeparatorStyle" TargetType="Separator">
<Setter Property="Background" Value="{DynamicResource MenuFlyoutSeparatorBackground}" />
<Setter Property="Padding" Value="{DynamicResource MenuFlyoutSeparatorThemePadding}" />
<Setter Property="SnapsToDevicePixels" Value="true" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type MenuItem}">
<Border
Name="bdr"
Padding="24,6,24,6"
Background="Transparent">
<TextBlock
Name="Menu"
VerticalAlignment="Center"
FontSize="14"
Foreground="{DynamicResource Color05B}"
Text="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=Header}" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsVisible" Value="True">
<Setter TargetName="bdr" Property="Background" Value="{DynamicResource CustomContextBackground}" />
<Setter TargetName="Menu" Property="Foreground" Value="{DynamicResource Color05B}" />
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="bdr" Property="Background" Value="{DynamicResource CustomContextHover}" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter TargetName="Menu" Property="Foreground" Value="{DynamicResource CustomContextDisabled}" />
</Trigger>
</ControlTemplate.Triggers>
<ControlTemplate TargetType="Separator">
<Rectangle
Height="{DynamicResource MenuFlyoutSeparatorThemeHeight}"
Margin="{TemplateBinding Padding}"
Fill="{TemplateBinding Background}" />
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="{x:Type ContextMenu}">
<Style
x:Key="{x:Static MenuItem.SeparatorStyleKey}"
BasedOn="{StaticResource DefaultMenuItemSeparatorStyle}"
TargetType="Separator" />
<ControlTemplate x:Key="{ComponentResourceKey TypeInTargetAssembly={x:Type MenuItem}, ResourceId=TopLevelItemTemplateKey}" TargetType="{x:Type MenuItem}">
<Grid
x:Name="ContentRoot"
Background="{TemplateBinding Background}"
SnapsToDevicePixels="True">
<Border
x:Name="Background"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}" />
<ContentPresenter
Margin="12,0,12,0"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
ContentSource="Header"
RecognizesAccessKey="True"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Background" Property="Background" Value="{DynamicResource MenuBarItemBackgroundPointerOver}" />
<Setter TargetName="Background" Property="BorderBrush" Value="{DynamicResource MenuBarItemBorderBrushPointerOver}" />
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="Background" Property="Background" Value="{DynamicResource MenuBarItemBackgroundPressed}" />
<Setter TargetName="Background" Property="BorderBrush" Value="{DynamicResource MenuBarItemBorderBrushPressed}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
<ControlTemplate x:Key="{ComponentResourceKey TypeInTargetAssembly={x:Type MenuItem}, ResourceId=TopLevelHeaderTemplateKey}" TargetType="{x:Type MenuItem}">
<Grid
x:Name="ContentRoot"
Background="{TemplateBinding Background}"
SnapsToDevicePixels="True">
<Border
x:Name="Background"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}" />
<ContentPresenter
Margin="12,0,12,0"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
ContentSource="Header"
RecognizesAccessKey="True"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
<ui:MenuPopup
x:Name="PART_Popup"
AllowsTransparency="true"
Focusable="false"
IsOpen="{Binding IsSubmenuOpen, RelativeSource={RelativeSource TemplatedParent}}"
Placement="Bottom"
PopupAnimation="{DynamicResource {x:Static SystemParameters.MenuPopupAnimationKey}}">
<ui:ThemeShadowChrome CornerRadius="{TemplateBinding ui:ControlHelper.CornerRadius}" IsShadowEnabled="{DynamicResource {x:Static SystemParameters.DropShadowKey}}">
<Border
x:Name="SubMenuRoot"
Background="{DynamicResource MenuFlyoutPresenterBackground}"
CornerRadius="{TemplateBinding ui:ControlHelper.CornerRadius}">
<Grid>
<ScrollViewer
x:Name="SubMenuScrollViewer"
MinWidth="{DynamicResource FlyoutThemeMinWidth}"
Margin="{DynamicResource MenuFlyoutPresenterThemePadding}"
Style="{DynamicResource {ComponentResourceKey ResourceId=MenuScrollViewer,
TypeInTargetAssembly={x:Type FrameworkElement}}}">
<ItemsPresenter
Grid.IsSharedSizeScope="true"
KeyboardNavigation.DirectionalNavigation="Cycle"
KeyboardNavigation.TabNavigation="Cycle"
RenderOptions.ClearTypeHint="Enabled"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</ScrollViewer>
<Border
x:Name="SubMenuBorder"
BorderBrush="{DynamicResource MenuFlyoutPresenterBorderBrush}"
BorderThickness="{DynamicResource MenuFlyoutPresenterBorderThemeThickness}"
CornerRadius="{TemplateBinding ui:ControlHelper.CornerRadius}" />
</Grid>
</Border>
</ui:ThemeShadowChrome>
</ui:MenuPopup>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsSuspendingPopupAnimation" Value="true">
<Setter TargetName="PART_Popup" Property="PopupAnimation" Value="None" />
</Trigger>
<Trigger SourceName="PART_Popup" Property="IsSuspendingAnimation" Value="true">
<Setter TargetName="PART_Popup" Property="PopupAnimation" Value="None" />
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Background" Property="Background" Value="{DynamicResource MenuBarItemBackgroundPointerOver}" />
<Setter TargetName="Background" Property="BorderBrush" Value="{DynamicResource MenuBarItemBorderBrushPointerOver}" />
</Trigger>
<!-- Selected -->
<Trigger Property="IsSubmenuOpen" Value="True">
<Setter TargetName="Background" Property="Background" Value="{DynamicResource MenuBarItemBackgroundSelected}" />
<Setter TargetName="Background" Property="BorderBrush" Value="{DynamicResource MenuBarItemBorderBrushSelected}" />
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="Background" Property="Background" Value="{DynamicResource MenuBarItemBackgroundPressed}" />
<Setter TargetName="Background" Property="BorderBrush" Value="{DynamicResource MenuBarItemBorderBrushPressed}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
<!-- DefaultMenuFlyoutSubItemStyle -->
<ControlTemplate x:Key="{ComponentResourceKey TypeInTargetAssembly={x:Type MenuItem}, ResourceId=SubmenuItemTemplateKey}" TargetType="{x:Type MenuItem}">
<ControlTemplate.Resources>
<StreamGeometry x:Key="CheckMark">F1 M 17.939453 5.439453 L 7.5 15.888672 L 2.060547 10.439453 L 2.939453 9.560547 L 7.5 14.111328 L 17.060547 4.560547 Z</StreamGeometry>
</ControlTemplate.Resources>
<Border
x:Name="LayoutRoot"
Height="Auto"
Margin="5,2,5,2"
Padding="{TemplateBinding Padding}"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{TemplateBinding ui:ControlHelper.CornerRadius}"
SnapsToDevicePixels="true"
TextElement.Foreground="{DynamicResource Color05B}"
UseLayoutRounding="True">
<Grid x:Name="AnimationRoot">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" SharedSizeGroup="{TemplateBinding Visibility, Converter={StaticResource SharedSizeGroupConverter}, ConverterParameter=MenuItemCheckColumnGroup}" />
<ColumnDefinition Width="Auto" SharedSizeGroup="{TemplateBinding Visibility, Converter={StaticResource SharedSizeGroupConverter}, ConverterParameter=MenuItemIconColumnGroup}" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<ui:FontIconFallback
x:Name="CheckGlyph"
Margin="0,0,16,0"
Data="{StaticResource CheckMark}"
FontFamily="{DynamicResource SymbolThemeFontFamily}"
FontSize="12"
Foreground="{DynamicResource ToggleMenuFlyoutItemCheckGlyphForeground}"
Opacity="0"
Visibility="Collapsed" />
<Viewbox
x:Name="IconRoot"
Grid.Column="1"
Width="16"
Height="16"
Margin="0,1,12,0"
HorizontalAlignment="Left"
VerticalAlignment="Stretch"
TextBlock.FontFamily="/Resources/#Segoe Fluent Icons">
<ContentPresenter
x:Name="IconContent"
ContentSource="Icon"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</Viewbox>
<ContentPresenter
x:Name="ContentPresenter"
Grid.Column="2"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
ContentSource="Header"
RecognizesAccessKey="True"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
TextElement.Foreground="{DynamicResource Color05B}" />
<TextBlock
x:Name="KeyboardAcceleratorTextBlock"
Grid.Column="3"
Margin="24,4,0,0"
HorizontalAlignment="Right"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
Foreground="{DynamicResource MenuFlyoutItemKeyboardAcceleratorTextForeground}"
Style="{StaticResource CaptionTextBlockStyle}"
Text="{TemplateBinding InputGestureText}"
Visibility="Collapsed" />
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsVisible" Value="True">
<Setter TargetName="LayoutRoot" Property="TextElement.Foreground" Value="{DynamicResource Color05B}" />
<Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource Color05B}" />
</Trigger>
<Trigger Property="Icon" Value="{x:Null}">
<Setter TargetName="IconRoot" Property="Visibility" Value="Collapsed" />
</Trigger>
<Trigger Property="InputGestureText" Value="">
<Setter TargetName="KeyboardAcceleratorTextBlock" Property="Visibility" Value="Collapsed" />
</Trigger>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="CheckGlyph" Property="Opacity" Value="1" />
</Trigger>
<Trigger Property="IsCheckable" Value="True">
<Setter TargetName="CheckGlyph" Property="Visibility" Value="Visible" />
</Trigger>
<Trigger Property="IsHighlighted" Value="True">
<Setter TargetName="LayoutRoot" Property="Background" Value="{DynamicResource CustomContextHover}" />
<Setter TargetName="LayoutRoot" Property="TextElement.Foreground" Value="{DynamicResource Color05B}" />
<Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource Color05B}" />
<Setter TargetName="KeyboardAcceleratorTextBlock" Property="Foreground" Value="{DynamicResource MenuFlyoutItemKeyboardAcceleratorTextForegroundPointerOver}" />
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="LayoutRoot" Property="Background" Value="{DynamicResource CustomContextClick}" />
<Setter TargetName="LayoutRoot" Property="TextElement.Foreground" Value="{DynamicResource Color05B}" />
<Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource Color05B}" />
<Setter TargetName="KeyboardAcceleratorTextBlock" Property="Foreground" Value="{DynamicResource MenuFlyoutItemKeyboardAcceleratorTextForegroundPressed}" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter TargetName="LayoutRoot" Property="Background" Value="{DynamicResource MenuFlyoutItemBackgroundDisabled}" />
<Setter TargetName="LayoutRoot" Property="TextElement.Foreground" Value="{DynamicResource MenuFlyoutItemForegroundDisabled}" />
<Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource MenuFlyoutItemForegroundDisabled}" />
<Setter TargetName="KeyboardAcceleratorTextBlock" Property="Foreground" Value="{DynamicResource MenuFlyoutItemKeyboardAcceleratorTextForegroundDisabled}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
<!-- DefaultMenuFlyoutItemStyle -->
<ControlTemplate x:Key="{ComponentResourceKey TypeInTargetAssembly={x:Type MenuItem}, ResourceId=SubmenuHeaderTemplateKey}" TargetType="{x:Type MenuItem}">
<ControlTemplate.Resources>
<StreamGeometry x:Key="ChevronRight">M 5.029297 19.091797 L 14.111328 10 L 5.029297 0.908203 L 5.908203 0.029297 L 15.888672 10 L 5.908203 19.970703 Z</StreamGeometry>
</ControlTemplate.Resources>
<Border
x:Name="LayoutRoot"
Margin="{DynamicResource MenuFlyoutItemMargin}"
Padding="{TemplateBinding Padding}"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{TemplateBinding ui:ControlHelper.CornerRadius}"
SnapsToDevicePixels="True">
<Grid x:Name="AnimationRoot">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" SharedSizeGroup="MenuItemCheckColumnGroup" />
<ColumnDefinition Width="Auto" SharedSizeGroup="MenuItemIconColumnGroup" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Viewbox
x:Name="IconRoot"
Grid.Column="1"
Width="16"
Height="16"
Margin="0,0,12,0"
HorizontalAlignment="Left"
VerticalAlignment="Center">
<ContentPresenter
x:Name="IconContent"
ContentSource="Icon"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</Viewbox>
<ContentPresenter
x:Name="ContentPresenter"
Grid.Column="2"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
ContentSource="Header"
RecognizesAccessKey="True"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
TextElement.Foreground="{TemplateBinding Foreground}" />
<ui:FontIconFallback
x:Name="SubItemChevron"
Grid.Column="3"
Margin="{DynamicResource MenuFlyoutItemChevronMargin}"
Data="{StaticResource ChevronRight}"
FontFamily="{DynamicResource SymbolThemeFontFamily}"
FontSize="12"
Foreground="{DynamicResource MenuFlyoutSubItemChevron}">
<UIElement.RenderTransform>
<TranslateTransform Y="1" />
</UIElement.RenderTransform>
</ui:FontIconFallback>
<Popup
x:Name="PART_Popup"
AllowsTransparency="true"
Focusable="false"
IsOpen="{Binding IsSubmenuOpen, RelativeSource={RelativeSource TemplatedParent}}"
Placement="Right"
PlacementTarget="{Binding ElementName=LayoutRoot}"
PopupAnimation="{DynamicResource {x:Static SystemParameters.MenuPopupAnimationKey}}">
<Popup.PlacementRectangle>
<MultiBinding>
<MultiBinding.Converter>
<ui:PlacementRectangleConverter Margin="4,-1" />
</MultiBinding.Converter>
<Binding ElementName="LayoutRoot" Path="ActualWidth" />
<Binding ElementName="LayoutRoot" Path="ActualHeight" />
</MultiBinding>
</Popup.PlacementRectangle>
<ui:ThemeShadowChrome CornerRadius="{TemplateBinding ui:ControlHelper.CornerRadius}" IsShadowEnabled="{DynamicResource {x:Static SystemParameters.DropShadowKey}}">
<Border
x:Name="SubMenuRoot"
Background="{DynamicResource MenuFlyoutPresenterBackground}"
CornerRadius="{TemplateBinding ui:ControlHelper.CornerRadius}">
<Grid>
<ScrollViewer
x:Name="SubMenuScrollViewer"
MinWidth="{DynamicResource FlyoutThemeMinWidth}"
Margin="{DynamicResource MenuFlyoutPresenterThemePadding}"
Style="{DynamicResource {ComponentResourceKey ResourceId=MenuScrollViewer,
TypeInTargetAssembly={x:Type FrameworkElement}}}">
<ItemsPresenter
Grid.IsSharedSizeScope="true"
KeyboardNavigation.DirectionalNavigation="Cycle"
KeyboardNavigation.TabNavigation="Cycle"
RenderOptions.ClearTypeHint="Enabled"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</ScrollViewer>
<Border
x:Name="SubMenuBorder"
BorderBrush="{DynamicResource MenuFlyoutPresenterBorderBrush}"
BorderThickness="{DynamicResource MenuFlyoutPresenterBorderThemeThickness}"
CornerRadius="{TemplateBinding ui:ControlHelper.CornerRadius}" />
</Grid>
</Border>
</ui:ThemeShadowChrome>
</Popup>
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsVisible" Value="True">
<Setter TargetName="LayoutRoot" Property="TextElement.Foreground" Value="{DynamicResource Color05B}" />
<Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource Color05B}" />
</Trigger>
<Trigger Property="IsSuspendingPopupAnimation" Value="true">
<Setter TargetName="PART_Popup" Property="PopupAnimation" Value="None" />
</Trigger>
<Trigger Property="Icon" Value="{x:Null}">
<Setter TargetName="IconRoot" Property="Visibility" Value="Collapsed" />
</Trigger>
<Trigger Property="IsHighlighted" Value="True">
<Setter TargetName="LayoutRoot" Property="Background" Value="{DynamicResource MenuFlyoutSubItemBackgroundPointerOver}" />
<Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource MenuFlyoutSubItemForegroundPointerOver}" />
<Setter TargetName="SubItemChevron" Property="Foreground" Value="{DynamicResource MenuFlyoutSubItemChevronPointerOver}" />
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="LayoutRoot" Property="Background" Value="{DynamicResource MenuFlyoutSubItemBackgroundPressed}" />
<Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource MenuFlyoutSubItemForegroundPressed}" />
<Setter TargetName="SubItemChevron" Property="Foreground" Value="{DynamicResource MenuFlyoutSubItemChevronPressed}" />
</Trigger>
<Trigger Property="IsSubmenuOpen" Value="True">
<Setter TargetName="LayoutRoot" Property="Background" Value="{DynamicResource MenuFlyoutSubItemBackgroundSubMenuOpened}" />
<Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource MenuFlyoutSubItemForegroundSubMenuOpened}" />
<Setter TargetName="SubItemChevron" Property="Foreground" Value="{DynamicResource MenuFlyoutSubItemChevronSubMenuOpened}" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter TargetName="LayoutRoot" Property="Background" Value="{DynamicResource MenuFlyoutSubItemBackgroundDisabled}" />
<Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource MenuFlyoutSubItemForegroundDisabled}" />
<Setter TargetName="SubItemChevron" Property="Foreground" Value="{DynamicResource MenuFlyoutSubItemChevronDisabled}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
<Style x:Key="DefaultMenuItemStyle" TargetType="{x:Type MenuItem}">
<Setter Property="OverridesDefaultStyle" Value="True" />
<Setter Property="SnapsToDevicePixels" Value="True" />
<Setter Property="Background" Value="{DynamicResource MenuFlyoutItemBackground}" />
<Setter Property="Foreground" Value="{DynamicResource MenuFlyoutItemForeground}" />
<Setter Property="Padding" Value="{DynamicResource MenuFlyoutItemThemePaddingNarrow}" />
<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="ScrollViewer.PanningMode" Value="Both" />
<Setter Property="Stylus.IsFlicksEnabled" Value="False" />
<Setter Property="FocusVisualStyle" Value="{DynamicResource {x:Static SystemParameters.FocusVisualStyleKey}}" />
<Setter Property="ui:FocusVisualHelper.UseSystemFocusVisuals" Value="{DynamicResource UseSystemFocusVisuals}" />
<Setter Property="ui:ControlHelper.CornerRadius" Value="{DynamicResource ControlCornerRadius}" />
<Setter Property="Template" Value="{DynamicResource {ComponentResourceKey TypeInTargetAssembly={x:Type MenuItem}, ResourceId=SubmenuItemTemplateKey}}" />
<Style.Triggers>
<Trigger Property="Role" Value="TopLevelHeader">
<Setter Property="Background" Value="{DynamicResource MenuBarItemBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource MenuBarItemBorderBrush}" />
<Setter Property="BorderThickness" Value="{DynamicResource MenuBarItemBorderThickness}" />
<Setter Property="Template" Value="{DynamicResource {ComponentResourceKey TypeInTargetAssembly={x:Type MenuItem}, ResourceId=TopLevelHeaderTemplateKey}}" />
<Setter Property="IsTabStop" Value="True" />
<Setter Property="Height" Value="{StaticResource MenuBarHeight}" />
</Trigger>
<Trigger Property="Role" Value="TopLevelItem">
<Setter Property="Background" Value="{DynamicResource MenuBarItemBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource MenuBarItemBorderBrush}" />
<Setter Property="BorderThickness" Value="{DynamicResource MenuBarItemBorderThickness}" />
<Setter Property="Template" Value="{DynamicResource {ComponentResourceKey TypeInTargetAssembly={x:Type MenuItem}, ResourceId=TopLevelItemTemplateKey}}" />
<Setter Property="IsTabStop" Value="True" />
<Setter Property="Height" Value="{StaticResource MenuBarHeight}" />
</Trigger>
<Trigger Property="Role" Value="SubmenuHeader">
<Setter Property="Background" Value="{DynamicResource MenuFlyoutSubItemBackground}" />
<Setter Property="Foreground" Value="{DynamicResource MenuFlyoutSubItemForeground}" />
<Setter Property="Template" Value="{DynamicResource {ComponentResourceKey TypeInTargetAssembly={x:Type MenuItem}, ResourceId=SubmenuHeaderTemplateKey}}" />
</Trigger>
<Trigger Property="IsCheckable" Value="True">
<Setter Property="Background" Value="Transparent" />
<Setter Property="ui:FocusVisualHelper.UseSystemFocusVisuals" Value="True" />
</Trigger>
</Style.Triggers>
</Style>
<Style BasedOn="{StaticResource DefaultMenuItemStyle}" TargetType="{x:Type MenuItem}" />
<Style TargetType="{x:Type ContextMenu}">
<Setter Property="Background" Value="{DynamicResource CustomContextBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource CustomContextBorder}" />
<Setter Property="BorderThickness" Value="{DynamicResource MenuFlyoutPresenterBorderThemeThickness}" />
<Setter Property="Padding" Value="{DynamicResource MenuFlyoutPresenterThemePadding}" />
<Setter Property="FontFamily" Value="{DynamicResource ContentControlThemeFontFamily}" />
<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />
<Setter Property="FontStyle" Value="Normal" />
<Setter Property="FontWeight" Value="Normal" />
<Setter Property="Grid.IsSharedSizeScope" Value="true" />
<Setter Property="HasDropShadow" Value="{DynamicResource {x:Static SystemParameters.DropShadowKey}}" />
<!--<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled" />-->
<!--<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />-->
<!--<Setter Property="ScrollViewer.PanningMode" Value="VerticalOnly" />-->
<Setter Property="Stylus.IsFlicksEnabled" Value="False" />
<Setter Property="MaxWidth" Value="{DynamicResource FlyoutThemeMaxWidth}" />
<Setter Property="MinHeight" Value="{DynamicResource MenuFlyoutThemeMinHeight}" />
<Setter Property="ui:ControlHelper.CornerRadius" Value="{DynamicResource OverlayCornerRadius}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ContextMenu}">
<Border
x:Name="Border"
Margin="5,4,5,12"
Padding="0,4,0,4"
Background="{DynamicResource CustomContextBackground}"
BorderBrush="{DynamicResource CustomContextBorder}"
BorderThickness="1"
CornerRadius="8"
UseLayoutRounding="True">
<Border.Effect>
<DropShadowEffect
BlurRadius="12"
Direction="-90"
Opacity=".15"
ShadowDepth="6"
Color="Black" />
</Border.Effect>
<StackPanel
x:Name="Panel"
ClipToBounds="True"
IsItemsHost="True"
Orientation="Vertical" />
</Border>
<ui:ThemeShadowChrome
x:Name="Shdw"
CornerRadius="{TemplateBinding ui:ControlHelper.CornerRadius}"
IsShadowEnabled="{TemplateBinding HasDropShadow}"
SnapsToDevicePixels="True">
<Border
x:Name="Border"
Padding="0,4,0,4"
Background="{DynamicResource CustomContextBackground}"
BorderBrush="{DynamicResource CustomContextBorder}"
BorderThickness="1"
CornerRadius="8">
<Grid>
<ScrollViewer
x:Name="ContextMenuScrollViewer"
MinWidth="{DynamicResource FlyoutThemeMinWidth}"
Margin="{TemplateBinding Padding}"
Style="{DynamicResource {ComponentResourceKey ResourceId=MenuScrollViewer,
TypeInTargetAssembly={x:Type FrameworkElement}}}">
<ItemsPresenter
KeyboardNavigation.DirectionalNavigation="Cycle"
RenderOptions.ClearTypeHint="Enabled"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</ScrollViewer>
<Border
x:Name="ContextMenuBorder"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="0"
CornerRadius="{TemplateBinding ui:ControlHelper.CornerRadius}" />
</Grid>
</Border>
</ui:ThemeShadowChrome>
<ControlTemplate.Triggers>
<Trigger Property="IsVisible" Value="true">
<Setter TargetName="Border" Property="Background" Value="{DynamicResource CustomContextBackground}" />
@ -2808,4 +3227,7 @@
</Setter.Value>
</Setter>
</Style>
<ui:TextContextMenu x:Key="TextControlContextMenu" x:Shared="False" />
</ResourceDictionary>

View file

@ -65,7 +65,8 @@
<SolidColorBrush x:Key="CustomContextBorder" Color="#1b1b1b" />
<SolidColorBrush x:Key="CustomContextBackground" Color="#2b2b2b" />
<SolidColorBrush x:Key="CustomContextHover" Color="#3c3c3c" />
<SolidColorBrush x:Key="CustomContextHover" Color="#3a3a3a" />
<SolidColorBrush x:Key="CustomContextClick" Color="#353535" />
<SolidColorBrush x:Key="CustomContextDisabled" Color="#868686" />
<SolidColorBrush x:Key="ContextSeparator" Color="#3c3c3c" />

View file

@ -58,7 +58,8 @@
<SolidColorBrush x:Key="CustomContextBorder" Color="#dadada" />
<SolidColorBrush x:Key="CustomContextBackground" Color="#f2f2f2" />
<SolidColorBrush x:Key="CustomContextHover" Color="#DBDBDB" />
<SolidColorBrush x:Key="CustomContextHover" Color="#e4e4e4" />
<SolidColorBrush x:Key="CustomContextClick" Color="#ececec" />
<SolidColorBrush x:Key="CustomContextDisabled" Color="#868686" />
<SolidColorBrush x:Key="ContextSeparator" Color="#dadada" />

View file

@ -15,7 +15,7 @@
Title="{DynamicResource flowlauncher_settings}"
Width="{Binding SettingWindowWidth, Mode=TwoWay}"
Height="{Binding SettingWindowHeight, Mode=TwoWay}"
MinWidth="900"
MinWidth="940"
MinHeight="600"
d:DataContext="{d:DesignInstance vm:SettingWindowViewModel}"
Closed="OnClosed"
@ -98,6 +98,7 @@
<Style x:Key="SettingTitleLabel" TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="{DynamicResource Color05B}" />
<Setter Property="Margin" Value="0,0,0,0" />
<Setter Property="TextWrapping" Value="Wrap" />
</Style>
<Style x:Key="SettingSubTitleLabel" TargetType="{x:Type TextBlock}">
@ -201,52 +202,46 @@
</Setter>
<!--#endregion-->
</Style>
<Style TargetType="{x:Type TabItem}">
<Style x:Key="NavTabItem" TargetType="{x:Type TabItem}">
<Setter Property="DockPanel.Dock" Value="Top" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TabItem}">
<Border>
<Grid>
<Grid>
<Border
x:Name="border"
Height="40"
Margin="14,4,8,4"
Padding="0,0,0,0"
HorizontalAlignment="Stretch"
Background="{DynamicResource Color01B}"
CornerRadius="5">
<Grid>
<Border
x:Name="Spacer"
Width="Auto"
Height="Auto"
Margin="14,4,8,4"
Padding="0,0,0,0"
BorderBrush="Transparent"
BorderThickness="0">
<Border
x:Name="border"
Height="40"
Background="{DynamicResource Color01B}"
CornerRadius="5">
<Grid>
<Canvas>
<Rectangle
x:Name="Bullet"
Canvas.Left="0"
Width="4"
Height="18"
Margin="0,11,0,11"
Fill="{DynamicResource ToggleSwitchFillOn}"
RadiusX="2"
RadiusY="2"
Visibility="Hidden" />
<ContentPresenter
x:Name="ContentSite"
Margin="12,11,0,11"
HorizontalAlignment="LEFT"
VerticalAlignment="Center"
ContentSource="Header"
TextBlock.Foreground="#000" />
</Canvas>
</Grid>
</Border>
</Border>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="4" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Rectangle
x:Name="Bullet"
Grid.Column="0"
Width="4"
Height="18"
Margin="0,11,0,11"
Fill="{DynamicResource ToggleSwitchFillOn}"
RadiusX="2"
RadiusY="2"
Visibility="Hidden" />
<ContentPresenter
x:Name="ContentSite"
Grid.Column="1"
Margin="12,11,18,11"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
ContentSource="Header"
TextBlock.Foreground="#000" />
</Grid>
</Grid>
</Border>
</Border>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="border" Property="Background" Value="{DynamicResource Color06B}" />
@ -418,30 +413,62 @@
</Style.Triggers>
</Style>
<!-- For Tab Header responsive Width -->
<Style TargetType="{x:Type TabControl}">
<Style x:Key="NavTabControl" TargetType="{x:Type TabControl}">
<Setter Property="Padding" Value="0" />
<Setter Property="HorizontalContentAlignment" Value="Left" />
<Setter Property="VerticalContentAlignment" Value="Top" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="BorderBrush" Value="Transparent" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="FontSize" Value="14" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TabControl}">
<Grid>
<Grid
x:Name="templateRoot"
ClipToBounds="true"
KeyboardNavigation.TabNavigation="Local"
SnapsToDevicePixels="true">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2.2*" />
<ColumnDefinition Width="7.8*" />
<ColumnDefinition
x:Name="ColumnDefinition0"
Width="Auto"
MinWidth="230" />
<ColumnDefinition x:Name="ColumnDefinition1" Width="7.5*" />
</Grid.ColumnDefinitions>
<TabPanel
<!-- here is the edit -->
<DockPanel
x:Name="headerPanel"
Grid.Row="0"
Grid.Column="0"
Margin="0,0,0,0"
Margin="2,2,2,0"
Panel.ZIndex="1"
Background="{DynamicResource Color01B}"
IsItemsHost="True" />
Background="Transparent"
IsItemsHost="true"
KeyboardNavigation.TabIndex="1"
LastChildFill="False" />
<Border
x:Name="contentPanel"
Grid.Row="0"
Grid.Column="1"
BorderBrush="Black"
BorderThickness="0"
CornerRadius="0">
<ContentPresenter Grid.Column="1" ContentSource="SelectedContent" />
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
KeyboardNavigation.DirectionalNavigation="Contained"
KeyboardNavigation.TabIndex="2"
KeyboardNavigation.TabNavigation="Local">
<ContentPresenter
x:Name="PART_SelectedContentHost"
Margin="{TemplateBinding Padding}"
ContentSource="SelectedContent"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</Border>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled" Value="false">
<Setter TargetName="templateRoot" Property="TextElement.Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
@ -568,8 +595,9 @@
Grid.ColumnSpan="5"
Height="auto"
SelectedIndex="1"
Style="{DynamicResource NavTabControl}"
TabStripPlacement="Left">
<TabItem Style="{DynamicResource logo}">
<TabItem DockPanel.Dock="Top" Style="{DynamicResource logo}">
<TabItem.Header>
<Grid Margin="0,18,0,0">
<Grid.RowDefinitions>
@ -591,7 +619,7 @@
</Grid>
</TabItem.Header>
</TabItem>
<TabItem>
<TabItem DockPanel.Dock="Top" Style="{DynamicResource NavTabItem}">
<!-- LEFT TAB WIDTH -->
<TabItem.Header>
<Grid>
@ -947,7 +975,7 @@
</VirtualizingStackPanel>
</ScrollViewer>
</TabItem>
<TabItem KeyDown="OnPluginSettingKeydown">
<TabItem KeyDown="OnPluginSettingKeydown" Style="{DynamicResource NavTabItem}">
<TabItem.Header>
<Grid>
<Grid.ColumnDefinitions>
@ -1047,7 +1075,7 @@
Background="{DynamicResource Color01B}"
ItemContainerStyle="{StaticResource PluginList}"
ItemsSource="{Binding PluginViewModels}"
ScrollViewer.CanContentScroll="True"
ScrollViewer.CanContentScroll="False"
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
SelectedItem="{Binding SelectedPlugin}"
SnapsToDevicePixels="True"
@ -1057,7 +1085,7 @@
VirtualizingStackPanel.VirtualizationMode="Recycling">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<VirtualizingStackPanel Margin="0,0,0,0" />
<VirtualizingStackPanel Margin="0,0,0,10" />
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.ItemTemplate>
@ -1368,7 +1396,7 @@
</TabItem>
<!--#region Plugin Store-->
<TabItem KeyDown="PluginStore_OnKeyDown">
<TabItem KeyDown="PluginStore_OnKeyDown" Style="{DynamicResource NavTabItem}">
<TabItem.Header>
<Grid>
<Grid.ColumnDefinitions>
@ -1721,7 +1749,7 @@
</TabItem>
<!--#endregion-->
<TabItem>
<TabItem Style="{DynamicResource NavTabItem}">
<TabItem.Header>
<Grid>
<Grid.ColumnDefinitions>
@ -1848,7 +1876,7 @@
</StackPanel>
<StackPanel Grid.Column="2" Orientation="Horizontal">
<TextBlock
Width="100"
Width="Auto"
Margin="0,0,8,2"
VerticalAlignment="Center"
Foreground="{DynamicResource Color05B}"
@ -1856,7 +1884,7 @@
TextAlignment="Right" />
<Slider
Name="WindowWidthValue"
Width="300"
Width="250"
Margin="0,0,18,0"
VerticalAlignment="Center"
IsMoveToPointEnabled="True"
@ -2300,7 +2328,7 @@
</TabItem>
<TabItem>
<TabItem Style="{DynamicResource NavTabItem}">
<TabItem.Header>
<Grid>
<Grid.ColumnDefinitions>
@ -2323,23 +2351,7 @@
VirtualizingStackPanel.IsVirtualizing="True"
VirtualizingStackPanel.ScrollUnit="Pixel">
<Border>
<Grid Margin="5,18,18,10">
<Grid.RowDefinitions>
<RowDefinition Height="43" />
<RowDefinition Height="80" />
<RowDefinition Height="146" />
<RowDefinition Height="50" />
<RowDefinition Height="*" />
<RowDefinition Height="50" />
<RowDefinition Height="50" />
<RowDefinition Height="*" />
<RowDefinition Height="50" />
<RowDefinition Height="50" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel Margin="5,18,18,10">
<TextBlock
Grid.Row="0"
Margin="0,5,0,2"
@ -2349,7 +2361,7 @@
TextAlignment="left" />
<StackPanel Grid.Row="1">
<Border Margin="0,12,0,0" Style="{DynamicResource SettingGroupBox}">
<Border Margin="0,8,0,0" Style="{DynamicResource SettingGroupBox}">
<ItemsControl Style="{StaticResource SettingGrid}">
<StackPanel Style="{StaticResource TextPanel}">
<TextBlock Style="{DynamicResource SettingTitleLabel}" Text="{DynamicResource flowlauncherHotkey}" />
@ -2411,7 +2423,7 @@
Style="{StaticResource SettingSeparatorStyle}" />
<Border
Margin="0"
Padding="0,10,0,0"
Padding="0,10,0,10"
BorderThickness="0"
Style="{DynamicResource SettingGroupBox}">
<ItemsControl Style="{StaticResource SettingGrid}">
@ -2434,7 +2446,7 @@
<TextBlock
Grid.Row="3"
Margin="0,0,12,2"
Margin="0,10,12,10"
Padding="0,12,0,0"
VerticalAlignment="Center"
FontSize="14"
@ -2459,7 +2471,7 @@
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
<GridViewColumn Width="540" Header="{DynamicResource customQuery}">
<GridViewColumn Width="430" Header="{DynamicResource customQuery}">
<GridViewColumn.CellTemplate>
<DataTemplate DataType="userSettings:CustomPluginHotkey">
<TextBlock Text="{Binding ActionKeyword}" />
@ -2520,7 +2532,7 @@
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
<GridViewColumn Width="540" Header="{DynamicResource customShortcutExpansion}">
<GridViewColumn Width="430" Header="{DynamicResource customShortcutExpansion}">
<GridViewColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Value}" />
@ -2560,11 +2572,11 @@
VerticalAlignment="Center"
FontSize="14"
Foreground="{DynamicResource Color05B}"
Text="Built-in Shortcuts" />
Text="{DynamicResource builtinShortcuts}" />
<ListView
Grid.Row="10"
MinHeight="160"
Margin="0,6,0,0"
Margin="0,6,0,20"
Background="{DynamicResource Color02B}"
BorderBrush="DarkGray"
BorderThickness="1"
@ -2579,7 +2591,7 @@
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
<GridViewColumn Width="540" Header="{DynamicResource builtinShortcutDescription}">
<GridViewColumn Width="430" Header="{DynamicResource builtinShortcutDescription}">
<GridViewColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Description, Converter={StaticResource TranlationConverter}}" />
@ -2589,13 +2601,13 @@
</GridView>
</ListView.View>
</ListView>
</Grid>
</StackPanel>
</Border>
</ScrollViewer>
</TabItem>
<TabItem>
<TabItem Style="{DynamicResource NavTabItem}">
<TabItem.Header>
<Grid>
<Grid.ColumnDefinitions>
@ -2771,7 +2783,7 @@
</Border>
</ScrollViewer>
</TabItem>
<TabItem>
<TabItem Style="{DynamicResource NavTabItem}">
<TabItem.Header>
<Grid>
<Grid.ColumnDefinitions>
@ -2802,54 +2814,54 @@
Style="{DynamicResource PageTitle}"
Text="{DynamicResource about}"
TextAlignment="left" />
<StackPanel Orientation="Horizontal">
<Border
Width="200"
Height="120"
Margin="0,8,0,0"
Padding="24,24,24,24"
HorizontalAlignment="Left"
Style="{DynamicResource SettingGroupBox}">
<Grid>
<TextBlock
FontSize="14"
Foreground="{DynamicResource Color05B}"
Text="{DynamicResource version}"
TextWrapping="WrapWithOverflow" />
<TextBlock
HorizontalAlignment="Right"
VerticalAlignment="Bottom"
DockPanel.Dock="Bottom"
FontSize="22"
Foreground="{DynamicResource Color05B}"
Text="{Binding Version}"
TextWrapping="WrapWithOverflow" />
</Grid>
</Border>
</StackPanel>
<Border Margin="0,4,0,0" Style="{DynamicResource SettingGroupBox}">
<Border Margin="0,9,0,0" Style="{DynamicResource SettingGroupBox}">
<ItemsControl Style="{StaticResource SettingGrid}">
<StackPanel Style="{StaticResource TextPanel}">
<TextBlock Style="{DynamicResource SettingTitleLabel}" Text="{DynamicResource update}" />
<TextBlock
Grid.Column="1"
VerticalAlignment="Center"
FontWeight="Bold"
Style="{DynamicResource SettingTitleLabel}"
Text="{Binding Version}" />
<TextBlock Style="{DynamicResource SettingSubTitleLabel}" Text="{DynamicResource version}" />
</StackPanel>
<Button
Grid.Column="1"
Margin="0,0,-20,0"
Margin="0,0,-14,0"
HorizontalAlignment="Right"
Click="OnCheckUpdates"
Content="{DynamicResource checkUpdates}"
Style="{StaticResource AccentButtonStyle}" />
<TextBlock Style="{StaticResource Glyph}">
&#xe895;
&#xe946;
</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}">
&#xe8fd;
</TextBlock>
</ItemsControl>
</Border>
<Border
Height="62"
Margin="0,4,0,0"
Margin="0,14,0,0"
Style="{DynamicResource SettingGroupBox}">
<ItemsControl Style="{StaticResource SettingGrid}">
<StackPanel Style="{StaticResource TextPanel}">
@ -2877,25 +2889,6 @@
</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}">
&#xe8fd;
</TextBlock>
</ItemsControl>
</Border>
<Border Height="62" Style="{DynamicResource SettingGroupBox}">
<ItemsControl Style="{StaticResource SettingGrid}">
<StackPanel Style="{StaticResource TextPanel}">
@ -2923,10 +2916,13 @@
</ItemsControl>
</Border>
<Border Height="62" Style="{DynamicResource SettingGroupBox}">
<Border
Height="62"
Margin="0,14,0,0"
Style="{DynamicResource SettingGroupBox}">
<ItemsControl Style="{StaticResource SettingGrid}">
<StackPanel Style="{StaticResource TextPanel}">
<TextBlock Style="{DynamicResource SettingTitleLabel}" Text="Icons" />
<TextBlock Style="{DynamicResource SettingTitleLabel}" Text="{DynamicResource icons}" />
</StackPanel>
<TextBlock
Margin="0,0,-12,0"
@ -2953,26 +2949,43 @@
Margin="0,0,-20,0"
HorizontalAlignment="Right"
Orientation="Horizontal">
<Button
Margin="0,0,12,0"
Click="OpenWelcomeWindow"
Content="{DynamicResource welcomewindow}" />
<Button
Margin="0,0,12,0"
Click="OpenSettingFolder"
Content="{DynamicResource settingfolder}" />
<Button
Name="ClearLogFolderBtn"
Margin="0,0,12,0"
Click="ClearLogFolder"
Content="{Binding CheckLogFolder, UpdateSourceTrigger=PropertyChanged}" />
<Button Click="OpenLogFolder" Content="{DynamicResource logfolder}" />
<Button
Margin="0,0,8,0"
Content="&#xec7a;"
FontFamily="/Resources/#Segoe Fluent Icons"
FontSize="20">
<ui:FlyoutService.Flyout>
<ui:MenuFlyout>
<MenuItem Click="OpenWelcomeWindow" Header="{DynamicResource welcomewindow}">
<MenuItem.Icon>
<ui:FontIcon Glyph="&#xe939;" />
</MenuItem.Icon>
</MenuItem>
<MenuItem Click="OpenSettingFolder" Header="{DynamicResource settingfolder}">
<MenuItem.Icon>
<ui:FontIcon Glyph="&#xe8b7;" />
</MenuItem.Icon>
</MenuItem>
<MenuItem Click="OpenLogFolder" Header="{DynamicResource logfolder}">
<MenuItem.Icon>
<ui:FontIcon Glyph="&#xe8b7;" />
</MenuItem.Icon>
</MenuItem>
</ui:MenuFlyout>
</ui:FlyoutService.Flyout>
</Button>
</StackPanel>
<TextBlock Style="{StaticResource Glyph}">
&#xec7a;
&#xf12b;
</TextBlock>
</ItemsControl>
</Border>
<TextBlock
Margin="14,20,0,0"
HorizontalAlignment="Center"
@ -2982,7 +2995,6 @@
Foreground="{DynamicResource Color15B}"
Text="{Binding ActivatedTimes, Mode=OneWay}"
TextWrapping="WrapWithOverflow" />
</StackPanel>
</ScrollViewer>
</Border>

View file

@ -758,7 +758,20 @@ namespace Flow.Launcher.ViewModel
public string Documentation => Constant.Documentation;
public string Docs => Constant.Docs;
public string Github => Constant.GitHub;
public static string Version => Constant.Version;
public string Version
{
get
{
if (Constant.Version == "1.0.0")
{
return Constant.Dev;
}
else
{
return Constant.Version;
}
}
}
public string ActivatedTimes => string.Format(_translater.GetTranslation("about_activate_times"), Settings.ActivateTimes);
public string CheckLogFolder

View file

@ -6,12 +6,13 @@
xmlns:local="clr-namespace:Flow.Launcher.Plugin.Explorer.Views"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Title="{DynamicResource plugin_explorer_manageactionkeywords_header}"
Width="400"
SizeToContent="Height"
Width="Auto"
Height="255"
Background="{DynamicResource PopuBGColor}"
DataContext="{Binding RelativeSource={RelativeSource Self}}"
Foreground="{DynamicResource PopupTextColor}"
ResizeMode="NoResize"
SizeToContent="Width"
WindowStartupLocation="CenterScreen"
mc:Ignorable="d">
<WindowChrome.WindowChrome>
@ -68,7 +69,7 @@
<StackPanel Margin="0,10,0,0" Orientation="Horizontal">
<TextBlock
Width="150"
MinWidth="150"
Margin="0,10,15,10"
HorizontalAlignment="Left"
VerticalAlignment="Center"
@ -78,18 +79,19 @@
Name="TxtCurrentActionKeyword"
Grid.Row="0"
Grid.Column="1"
Width="105"
Width="135"
HorizontalAlignment="Left"
VerticalAlignment="Center"
PreviewKeyDown="TxtCurrentActionKeyword_OnKeyDown"
Text="{Binding ActionKeyword}" />
</StackPanel>
<StackPanel Margin="0,10,0,15" Orientation="Horizontal">
<TextBlock Margin="0 0 15 0 "
<TextBlock
MinWidth="150"
Margin="0,0,18,0"
HorizontalAlignment="Left"
VerticalAlignment="Center"
FontSize="14"
Width="150"
Text="{DynamicResource plugin_explorer_actionkeyword_enabled}" />
<CheckBox
Name="ChkActionKeywordEnabled"

View file

@ -8,8 +8,8 @@
Title="{DynamicResource flowlauncher_plugin_program_suffixes}"
Width="600"
Background="{DynamicResource PopuBGColor}"
Foreground="{DynamicResource PopupTextColor}"
DataContext="{Binding RelativeSource={RelativeSource Self}}"
Foreground="{DynamicResource PopupTextColor}"
ResizeMode="NoResize"
SizeToContent="Height"
WindowStartupLocation="CenterScreen"
@ -163,17 +163,32 @@
FontSize="16"
FontWeight="SemiBold"
Text="{DynamicResource flowlauncher_plugin_program_suffixes_excutable_types}" />
<CheckBox Name="apprefMS" Margin="10,0,0,0" IsChecked="{Binding SuffixesStatus[appref-ms]}">appref-ms</CheckBox>
<CheckBox Name="exe" Margin="10,0,0,0" IsChecked="{Binding SuffixesStatus[exe]}">exe</CheckBox>
<CheckBox Name="lnk" Margin="10,0,0,0" IsChecked="{Binding SuffixesStatus[lnk]}">lnk</CheckBox>
<CheckBox
Name="apprefMS"
Margin="10,0,0,0"
IsChecked="{Binding SuffixesStatus[appref-ms]}">
appref-ms
</CheckBox>
<CheckBox
Name="exe"
Margin="10,0,0,0"
IsChecked="{Binding SuffixesStatus[exe]}">
exe
</CheckBox>
<CheckBox
Name="lnk"
Margin="10,0,0,0"
IsChecked="{Binding SuffixesStatus[lnk]}">
lnk
</CheckBox>
<CheckBox
Name="CustomFiles"
Margin="10,0,0,0"
IsChecked="{Binding UseCustomSuffixes}"
Content="{DynamicResource flowlauncher_plugin_program_suffixes_custom_file_types}" />
Content="{DynamicResource flowlauncher_plugin_program_suffixes_custom_file_types}"
IsChecked="{Binding UseCustomSuffixes}" />
<TextBox
x:Name="tbSuffixes"
Margin="10,4,0,6"
Margin="10,4,0,10"
Style="{StaticResource CustomFileTypeTextBox}" />
</StackPanel>
@ -189,17 +204,29 @@
FontSize="16"
FontWeight="SemiBold"
Text="{DynamicResource flowlauncher_plugin_program_suffixes_URL_types}" />
<CheckBox Name="steam" Margin="10,0,0,0" IsChecked="{Binding ProtocolsStatus[steam]}" Content="{DynamicResource flowlauncher_plugin_program_suffixes_URL_steam}"></CheckBox>
<CheckBox Name="epic" Margin="10,0,0,0" IsChecked="{Binding ProtocolsStatus[epic]}" Content="{DynamicResource flowlauncher_plugin_program_suffixes_URL_epic}"></CheckBox>
<CheckBox Name="http" Margin="10,0,0,0" IsChecked="{Binding ProtocolsStatus[http]}" Content="{DynamicResource flowlauncher_plugin_program_suffixes_URL_http}"></CheckBox>
<CheckBox
Name="steam"
Margin="10,0,0,0"
Content="{DynamicResource flowlauncher_plugin_program_suffixes_URL_steam}"
IsChecked="{Binding ProtocolsStatus[steam]}" />
<CheckBox
Name="epic"
Margin="10,0,0,0"
Content="{DynamicResource flowlauncher_plugin_program_suffixes_URL_epic}"
IsChecked="{Binding ProtocolsStatus[epic]}" />
<CheckBox
Name="http"
Margin="10,0,0,0"
Content="{DynamicResource flowlauncher_plugin_program_suffixes_URL_http}"
IsChecked="{Binding ProtocolsStatus[http]}" />
<CheckBox
Name="CustomProtocol"
Margin="10,0,0,0"
IsChecked="{Binding UseCustomProtocols}"
Content="{DynamicResource flowlauncher_plugin_program_suffixes_custom_urls}" />
Content="{DynamicResource flowlauncher_plugin_program_suffixes_custom_urls}"
IsChecked="{Binding UseCustomProtocols}" />
<TextBox
x:Name="tbProtocols"
Margin="10,4,0,6"
Margin="10,4,0,0"
Style="{StaticResource CustomURLTypeTextBox}" />
</StackPanel>
</Border>

View file

@ -91,6 +91,7 @@
BorderThickness="1" />
<StackPanel
Width="Auto"
Height="55"
Margin="60,6,0,0"
HorizontalAlignment="Left"
Orientation="Horizontal">
@ -145,8 +146,8 @@
DragEnter="programSourceView_DragEnter"
Drop="programSourceView_Drop"
GridViewColumnHeader.Click="GridViewColumnHeaderClickedHandler"
PreviewMouseRightButtonUp="ProgramSourceView_PreviewMouseRightButtonUp"
MouseDoubleClick="programSourceView_MouseDoubleClick"
PreviewMouseRightButtonUp="ProgramSourceView_PreviewMouseRightButtonUp"
SelectionChanged="programSourceView_SelectionChanged"
SelectionMode="Extended">
<ListView.View>