Merge branch 'dev' into 240605-Fix-RightTop-Position

This commit is contained in:
Jeremy Wu 2024-06-16 12:33:43 +10:00 committed by GitHub
commit 586752fc70
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
51 changed files with 1174 additions and 1430 deletions

75
.cm/gitstream.cm Normal file
View file

@ -0,0 +1,75 @@
# -*- mode: yaml -*-
# This example configuration for provides basic automations to get started with gitStream.
# View the gitStream quickstart for more examples: https://docs.gitstream.cm/examples/
manifest:
version: 1.0
automations:
# Add a label that indicates how many minutes it will take to review the PR.
estimated_time_to_review:
if:
- true
run:
- action: add-label@v1
args:
label: "{{ calc.etr }} min review"
color: {{ colors.red if (calc.etr >= 20) else ( colors.yellow if (calc.etr >= 5) else colors.green ) }}
# Post a comment that lists the best experts for the files that were modified.
explain_code_experts:
if:
- true
run:
- action: explain-code-experts@v1
args:
gt: 10
# Post a comment that indicates what percentage of the PR is new code.
percent_new_code:
if:
- true
run:
- action: add-comment@v1
args:
comment: |
This PR is {{ changes.ratio }}% new code.
# Post a comment that request changes for a PR that contains a TODO statement.
review_todo_comments:
if:
- {{ source.diff.files | matchDiffLines(regex=r/^[+].*(TODO)|(todo)/) | some }}
run:
- action: request-changes@v1
args:
comment: |
This PR contains a TODO statement. Please check to see if they should be removed.
# Post a comment that request a before and after screenshot
request_screenshot:
# Triggered for PRs that lack an image file or link to an image in the PR description
if:
- {{ not (has.screenshot_link or has.image_uploaded) }}
run:
- action: add-comment@v1
args:
comment: |
Be a legend :trophy: by adding a before and after screenshot of the changes you made, especially if they are around UI/UX.
# +----------------------------------------------------------------------------+
# | Custom Expressions |
# | https://docs.gitstream.cm/how-it-works/#custom-expressions |
# +----------------------------------------------------------------------------+
calc:
etr: {{ branch | estimatedReviewTime }}
colors:
red: 'b60205'
yellow: 'fbca04'
green: '0e8a16'
changes:
# Sum all the lines added/edited in the PR
additions: {{ branch.diff.files_metadata | map(attr='additions') | sum }}
# Sum all the line removed in the PR
deletions: {{ branch.diff.files_metadata | map(attr='deletions') | sum }}
# Calculate the ratio of new code
ratio: {{ (changes.additions / (changes.additions + changes.deletions)) * 100 | round(2) }}

49
.github/workflows/gitstream.yml vendored Normal file
View file

@ -0,0 +1,49 @@
# Code generated by gitStream GitHub app - DO NOT EDIT
name: gitStream workflow automation
run-name: |
/:\ gitStream: PR #${{ fromJSON(fromJSON(github.event.inputs.client_payload)).pullRequestNumber }} from ${{ github.event.inputs.full_repository }}
on:
workflow_dispatch:
inputs:
client_payload:
description: The Client payload
required: true
full_repository:
description: the repository name include the owner in `owner/repo_name` format
required: true
head_ref:
description: the head sha
required: true
base_ref:
description: the base ref
required: true
installation_id:
description: the installation id
required: false
resolver_url:
description: the resolver url to pass results to
required: true
resolver_token:
description: Optional resolver token for resolver service
required: false
default: ''
jobs:
gitStream:
timeout-minutes: 5
runs-on: ubuntu-latest
name: gitStream workflow automation
steps:
- name: Evaluate Rules
uses: linear-b/gitstream-github-action@v2
id: rules-engine
with:
full_repository: ${{ github.event.inputs.full_repository }}
head_ref: ${{ github.event.inputs.head_ref }}
base_ref: ${{ github.event.inputs.base_ref }}
client_payload: ${{ github.event.inputs.client_payload }}
installation_id: ${{ github.event.inputs.installation_id }}
resolver_url: ${{ github.event.inputs.resolver_url }}
resolver_token: ${{ github.event.inputs.resolver_token }}

View file

@ -82,10 +82,10 @@ namespace Flow.Launcher.Core.Plugin
public override async ValueTask DisposeAsync()
{
await base.DisposeAsync();
ClientProcess.Kill(true);
await ClientProcess.WaitForExitAsync();
ClientProcess.Dispose();
await base.DisposeAsync();
}
}
}

View file

@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Xml;
using System.Runtime.InteropServices;
using System.Windows;
using System.Windows.Controls;
@ -17,6 +18,10 @@ namespace Flow.Launcher.Core.Resource
{
public class Theme
{
private const string ThemeMetadataNamePrefix = "Name:";
private const string ThemeMetadataIsDarkPrefix = "IsDark:";
private const string ThemeMetadataHasBlurPrefix = "HasBlur:";
private const int ShadowExtraMargin = 32;
private readonly List<string> _themeDirectories = new List<string>();
@ -79,14 +84,14 @@ namespace Flow.Launcher.Core.Resource
{
if (string.IsNullOrEmpty(path))
throw new DirectoryNotFoundException("Theme path can't be found <{path}>");
// reload all resources even if the theme itself hasn't changed in order to pickup changes
// to things like fonts
UpdateResourceDictionary(GetResourceDictionary(theme));
Settings.Theme = theme;
//always allow re-loading default theme, in case of failure of switching to a new theme from default theme
if (_oldTheme != theme || theme == defaultTheme)
{
@ -148,7 +153,7 @@ namespace Flow.Launcher.Core.Resource
public ResourceDictionary GetResourceDictionary(string theme)
{
var dict = GetThemeResourceDictionary(theme);
if (dict["QueryBoxStyle"] is Style queryBoxStyle &&
dict["QuerySuggestionBoxStyle"] is Style querySuggestionBoxStyle)
{
@ -187,7 +192,7 @@ namespace Flow.Launcher.Core.Resource
Setter[] setters = { fontFamily, fontStyle, fontWeight, fontStretch };
Array.ForEach(
new[] { resultItemStyle, resultItemSelectedStyle, resultHotkeyItemStyle, resultHotkeyItemSelectedStyle }, o
new[] { resultItemStyle, resultItemSelectedStyle, resultHotkeyItemStyle, resultHotkeyItemSelectedStyle }, o
=> Array.ForEach(setters, p => o.Setters.Add(p)));
}
@ -219,17 +224,53 @@ namespace Flow.Launcher.Core.Resource
return GetResourceDictionary(Settings.Theme);
}
public List<string> LoadAvailableThemes()
public List<ThemeData> LoadAvailableThemes()
{
List<string> themes = new List<string>();
List<ThemeData> themes = new List<ThemeData>();
foreach (var themeDirectory in _themeDirectories)
{
themes.AddRange(
Directory.GetFiles(themeDirectory)
.Where(filePath => filePath.EndsWith(Extension) && !filePath.EndsWith("Base.xaml"))
.ToList());
var filePaths = Directory
.GetFiles(themeDirectory)
.Where(filePath => filePath.EndsWith(Extension) && !filePath.EndsWith("Base.xaml"))
.Select(GetThemeDataFromPath);
themes.AddRange(filePaths);
}
return themes.OrderBy(o => o).ToList();
return themes.OrderBy(o => o.Name).ToList();
}
private ThemeData GetThemeDataFromPath(string path)
{
using var reader = XmlReader.Create(path);
reader.Read();
var extensionlessName = Path.GetFileNameWithoutExtension(path);
if (reader.NodeType is not XmlNodeType.Comment)
return new ThemeData(extensionlessName, extensionlessName);
var commentLines = reader.Value.Trim().Split('\n').Select(v => v.Trim());
var name = extensionlessName;
bool? isDark = null;
bool? hasBlur = null;
foreach (var line in commentLines)
{
if (line.StartsWith(ThemeMetadataNamePrefix, StringComparison.OrdinalIgnoreCase))
{
name = line.Remove(0, ThemeMetadataNamePrefix.Length).Trim();
}
else if (line.StartsWith(ThemeMetadataIsDarkPrefix, StringComparison.OrdinalIgnoreCase))
{
isDark = bool.Parse(line.Remove(0, ThemeMetadataIsDarkPrefix.Length).Trim());
}
else if (line.StartsWith(ThemeMetadataHasBlurPrefix, StringComparison.OrdinalIgnoreCase))
{
hasBlur = bool.Parse(line.Remove(0, ThemeMetadataHasBlurPrefix.Length).Trim());
}
}
return new ThemeData(extensionlessName, name, isDark, hasBlur);
}
private string GetThemePath(string themeName)
@ -407,5 +448,7 @@ namespace Flow.Launcher.Core.Resource
Marshal.FreeHGlobal(accentPtr);
}
#endregion
public record ThemeData(string FileNameWithoutExtension, string Name, bool? IsDark = null, bool? HasBlur = null);
}
}

View file

@ -55,7 +55,7 @@ namespace Flow.Launcher.Infrastructure.UserSettings
OnPropertyChanged(nameof(MaxResultsToShow));
}
}
public bool UseDropShadowEffect { get; set; } = false;
public bool UseDropShadowEffect { get; set; } = true;
/* Appearance Settings. It should be separated from the setting later.*/
public double WindowHeightSize { get; set; } = 42;

View file

@ -25,7 +25,7 @@
<ui:XamlControlsResources />
<ResourceDictionary Source="pack://application:,,,/Resources/CustomControlTemplate.xaml" />
<ResourceDictionary Source="pack://application:,,,/Resources/SettingWindowStyle.xaml" />
<ResourceDictionary Source="pack://application:,,,/Themes/Win11System.xaml" />
<ResourceDictionary Source="pack://application:,,,/Themes/Win11Light.xaml" />
<ResourceDictionary Source="pack://application:,,,/Languages/en.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

View file

@ -180,6 +180,8 @@
<system:String x:Key="AnimationSpeedCustom">Custom</system:String>
<system:String x:Key="Clock">Clock</system:String>
<system:String x:Key="Date">Date</system:String>
<system:String x:Key="TypeIsDarkToolTip">This theme supports two(light/dark) modes.</system:String>
<system:String x:Key="TypeHasBlurToolTip">This theme supports Blur Transparent Background.</system:String>
<!-- Setting Hotkey -->
@ -204,6 +206,7 @@
<system:String x:Key="CycleHistoryUpHotkey">Cycle Previous Query</system:String>
<system:String x:Key="CycleHistoryDownHotkey">Cycle Next Query</system:String>
<system:String x:Key="OpenContextMenuHotkey">Open Context Menu</system:String>
<system:String x:Key="OpenNativeContextMenuHotkey">Open Native Context Menu</system:String>
<system:String x:Key="SettingWindowHotkey">Open Setting Window</system:String>
<system:String x:Key="CopyFilePathHotkey">Copy File Path</system:String>
<system:String x:Key="ToggleGameModeHotkey">Toggle Game Mode</system:String>
@ -348,6 +351,9 @@
<system:String x:Key="commonCancel">Cancel</system:String>
<system:String x:Key="commonReset">Reset</system:String>
<system:String x:Key="commonDelete">Delete</system:String>
<system:String x:Key="commonOK">OK</system:String>
<system:String x:Key="commonYes">Yes</system:String>
<system:String x:Key="commonNo">No</system:String>
<!-- Crash Reporter -->
<system:String x:Key="reportWindow_version">Version</system:String>

View file

@ -380,24 +380,24 @@
</ContentControl>
</Grid>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" MinWidth="80" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="0.85*" MinWidth="244" />
</Grid.ColumnDefinitions>
<StackPanel
x:Name="ResultArea"
Grid.Column="0"
Grid.ColumnSpan="{Binding ResultAreaColumn}">
<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>
<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.ColumnDefinitions>
<ColumnDefinition Width="*" MinWidth="80" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="0.85*" MinWidth="244" />
</Grid.ColumnDefinitions>
<StackPanel
x:Name="ResultArea"
Grid.Column="0"
Grid.ColumnSpan="{Binding ResultAreaColumn}">
<ContentControl>
<flowlauncher:ResultListBox
x:Name="ResultListBox"
@ -405,15 +405,6 @@
LeftClickResultCommand="{Binding LeftClickResultCommand}"
RightClickResultCommand="{Binding RightClickResultCommand}" />
</ContentControl>
</Border>
<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>
<ContentControl>
<flowlauncher:ResultListBox
x:Name="ContextMenu"
@ -421,15 +412,6 @@
LeftClickResultCommand="{Binding LeftClickResultCommand}"
RightClickResultCommand="{Binding RightClickResultCommand}" />
</ContentControl>
</Border>
<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>
<ContentControl>
<flowlauncher:ResultListBox
x:Name="History"
@ -437,109 +419,114 @@
LeftClickResultCommand="{Binding LeftClickResultCommand}"
RightClickResultCommand="{Binding RightClickResultCommand}" />
</ContentControl>
</Border>
</StackPanel>
<GridSplitter
Grid.Column="1"
Width="{Binding PreviewVisible, Converter={StaticResource SplitterConverter}}"
Margin="0"
HorizontalAlignment="Center"
VerticalAlignment="Stretch"
Background="Transparent"
ShowsPreview="True" />
<Grid
x:Name="Preview"
Grid.Column="2"
VerticalAlignment="Stretch"
Style="{DynamicResource PreviewArea}"
Visibility="{Binding PreviewVisible, Converter={StaticResource BoolToVisibilityConverter}}">
<Border
MinHeight="380"
d:DataContext="{d:DesignInstance vm:ResultViewModel}"
DataContext="{Binding SelectedItem, ElementName=ResultListBox}"
Style="{DynamicResource PreviewBorderStyle}"
Visibility="{Binding ShowDefaultPreview}">
<Grid
Margin="20 0 10 0"
VerticalAlignment="Stretch"
Background="Transparent">
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid Grid.Row="0" VerticalAlignment="Center">
</StackPanel>
<GridSplitter
Grid.Column="1"
Margin="0"
HorizontalAlignment="Center"
VerticalAlignment="Stretch"
Background="Transparent"
ShowsPreview="True"
Visibility="{Binding PreviewVisible, Converter={StaticResource BoolToVisibilityConverter}}">
<GridSplitter.Template>
<ControlTemplate TargetType="{x:Type GridSplitter}">
<Border Style="{DynamicResource PreviewBorderStyle}" />
</ControlTemplate>
</GridSplitter.Template>
</GridSplitter>
<Grid
x:Name="Preview"
Grid.Column="2"
VerticalAlignment="Stretch"
Style="{DynamicResource PreviewArea}"
Visibility="{Binding PreviewVisible, Converter={StaticResource BoolToVisibilityConverter}}">
<Border
MinHeight="380"
d:DataContext="{d:DesignInstance vm:ResultViewModel}"
DataContext="{Binding SelectedItem, ElementName=ResultListBox}"
Visibility="{Binding ShowDefaultPreview}">
<Grid
Margin="0 0 10 5"
VerticalAlignment="Stretch"
Background="Transparent">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<TextBlock
x:Name="PreviewGlyphIcon"
Grid.Row="0"
Height="Auto"
Margin="0 16 0 0"
FontFamily="{Binding Glyph.FontFamily}"
Style="{DynamicResource PreviewGlyph}"
Text="{Binding Glyph.Glyph}"
Visibility="{Binding ShowGlyph}" />
<Image
x:Name="PreviewImageIcon"
Grid.Row="0"
MaxHeight="320"
Margin="0 16 0 0"
HorizontalAlignment="Center"
Source="{Binding PreviewImage}"
StretchDirection="DownOnly"
Visibility="{Binding ShowPreviewImage}">
<Image.Style>
<Style TargetType="{x:Type Image}">
<Setter Property="MaxWidth" Value="96" />
<Grid Grid.Row="0" VerticalAlignment="Center">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<TextBlock
x:Name="PreviewGlyphIcon"
Grid.Row="0"
Height="Auto"
Margin="0 16 0 0"
FontFamily="{Binding Glyph.FontFamily}"
Style="{DynamicResource PreviewGlyph}"
Text="{Binding Glyph.Glyph}"
Visibility="{Binding ShowGlyph}" />
<Image
x:Name="PreviewImageIcon"
Grid.Row="0"
MaxHeight="320"
Margin="0 16 0 0"
HorizontalAlignment="Center"
Source="{Binding PreviewImage}"
StretchDirection="DownOnly"
Visibility="{Binding ShowPreviewImage}">
<Image.Style>
<Style TargetType="{x:Type Image}">
<Setter Property="MaxWidth" Value="96" />
<Style.Triggers>
<DataTrigger Binding="{Binding UseBigThumbnail}" Value="True">
<Setter Property="MaxWidth" Value="{Binding ElementName=Preview, Path=ActualWidth}" />
</DataTrigger>
</Style.Triggers>
</Style>
</Image.Style>
</Image>
<TextBlock
x:Name="PreviewTitle"
Grid.Row="1"
Margin="0 6 0 16"
HorizontalAlignment="Stretch"
Style="{DynamicResource PreviewItemTitleStyle}"
Text="{Binding Result.Title}"
TextAlignment="Center"
TextWrapping="Wrap" />
</Grid>
<StackPanel Grid.Row="1">
<StackPanel.Style>
<Style TargetType="{x:Type StackPanel}">
<Style.Triggers>
<DataTrigger Binding="{Binding UseBigThumbnail}" Value="True">
<Setter Property="MaxWidth" Value="{Binding ElementName=Preview, Path=ActualWidth}" />
<DataTrigger Binding="{Binding ElementName=PreviewSubTitle, UpdateSourceTrigger=PropertyChanged, Path=Text.Length}" Value="0">
<Setter Property="Visibility" Value="Collapsed" />
</DataTrigger>
</Style.Triggers>
</Style>
</Image.Style>
</Image>
<TextBlock
x:Name="PreviewTitle"
Grid.Row="1"
Margin="0 6 0 16"
HorizontalAlignment="Stretch"
Style="{DynamicResource PreviewItemTitleStyle}"
Text="{Binding Result.Title}"
TextAlignment="Center"
TextWrapping="Wrap" />
</StackPanel.Style>
<Separator Style="{DynamicResource PreviewSep}" />
<TextBlock
x:Name="PreviewSubTitle"
Style="{DynamicResource PreviewItemSubTitleStyle}"
Text="{Binding Result.SubTitle}" />
</StackPanel>
</Grid>
<StackPanel Grid.Row="1">
<StackPanel.Style>
<Style TargetType="{x:Type StackPanel}">
<Style.Triggers>
<DataTrigger Binding="{Binding ElementName=PreviewSubTitle, UpdateSourceTrigger=PropertyChanged, Path=Text.Length}" Value="0">
<Setter Property="Visibility" Value="Collapsed" />
</DataTrigger>
</Style.Triggers>
</Style>
</StackPanel.Style>
<Separator Style="{DynamicResource PreviewSep}" />
<TextBlock
x:Name="PreviewSubTitle"
Style="{DynamicResource PreviewItemSubTitleStyle}"
Text="{Binding Result.SubTitle}" />
</StackPanel>
</Grid>
</Border>
<Border
MinHeight="380"
MaxHeight="{Binding ElementName=ResultListBox, Path=ActualHeight}"
d:DataContext="{d:DesignInstance vm:ResultViewModel}"
DataContext="{Binding SelectedItem, ElementName=ResultListBox}"
Style="{DynamicResource PreviewBorderStyle}"
Visibility="{Binding ShowCustomizedPreview}">
<ContentControl Content="{Binding Result.PreviewPanel.Value}" />
</Border>
</Border>
<Border
MinHeight="380"
MaxHeight="{Binding ElementName=ResultListBox, Path=ActualHeight}"
Padding="0 0 10 10"
d:DataContext="{d:DesignInstance vm:ResultViewModel}"
DataContext="{Binding SelectedItem, ElementName=ResultListBox}"
Visibility="{Binding ShowCustomizedPreview}">
<ContentControl Content="{Binding Result.PreviewPanel.Value}" />
</Border>
</Grid>
</Grid>
</Grid>
</Border>
</StackPanel>
</Border>
</Window>

View file

@ -0,0 +1,142 @@
<Window
x:Class="Flow.Launcher.MessageBoxEx"
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"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
x:Name="MessageBoxWindow"
Width="420"
Height="Auto"
Background="{DynamicResource PopuBGColor}"
Foreground="{DynamicResource PopupTextColor}"
ResizeMode="NoResize"
SizeToContent="Height"
WindowStartupLocation="CenterScreen"
mc:Ignorable="d">
<WindowChrome.WindowChrome>
<WindowChrome CaptionHeight="32" ResizeBorderThickness="{x:Static SystemParameters.WindowResizeBorderThickness}" />
</WindowChrome.WindowChrome>
<Window.InputBindings>
<KeyBinding Key="Escape" Command="Close" />
</Window.InputBindings>
<Window.CommandBindings>
<CommandBinding Command="Close" Executed="cmdEsc_OnPress" />
</Window.CommandBindings>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition />
<RowDefinition MinHeight="68" />
</Grid.RowDefinitions>
<StackPanel Grid.Row="0">
<StackPanel>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Button
Grid.Column="4"
Click="Button_Cancel"
Style="{StaticResource TitleBarCloseButtonStyle}">
<Path
Width="46"
Height="32"
Data="M 18,11 27,20 M 18,20 27,11"
Stroke="{Binding Path=Foreground, RelativeSource={RelativeSource AncestorType={x:Type Button}}}"
StrokeThickness="1">
<Path.Style>
<Style TargetType="Path">
<Style.Triggers>
<DataTrigger Binding="{Binding Path=IsActive, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}" Value="False">
<Setter Property="Opacity" Value="0.5" />
</DataTrigger>
</Style.Triggers>
</Style>
</Path.Style>
</Path>
</Button>
</Grid>
</StackPanel>
</StackPanel>
<StackPanel Grid.Row="1" Margin="30 0 30 24">
<Grid Grid.Column="0" Margin="0 0 0 12">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Image
Name="Img"
Grid.Column="0"
Width="18"
Height="18"
Margin="0 0 0 0"
HorizontalAlignment="Left"
VerticalAlignment="Center"
RenderOptions.BitmapScalingMode="Fant"
Stretch="UniformToFill"
Visibility="Collapsed" />
<TextBlock
x:Name="TitleTextBlock"
Grid.Column="1"
MaxWidth="400"
Margin="10 0 26 0"
VerticalAlignment="Center"
FontFamily="Segoe UI"
FontSize="20"
FontWeight="SemiBold"
TextAlignment="Left"
TextWrapping="Wrap" />
</Grid>
<TextBlock
x:Name="DescTextBlock"
Grid.Column="1"
MaxWidth="400"
Margin="0 0 26 0"
HorizontalAlignment="Stretch"
FontSize="14"
TextAlignment="Left"
TextWrapping="Wrap" />
</StackPanel>
<Border
Grid.Row="2"
Margin="0 0 0 0"
Background="{DynamicResource PopupButtonAreaBGColor}"
BorderBrush="{DynamicResource PopupButtonAreaBorderColor}"
BorderThickness="0 1 0 0">
<WrapPanel
HorizontalAlignment="Center"
VerticalAlignment="Center"
Orientation="Horizontal">
<Button
x:Name="btnCancel"
MinWidth="140"
Margin="5 0 5 0"
Click="Button_Click"
Content="{DynamicResource commonCancel}" />
<Button
x:Name="btnNo"
MinWidth="140"
Margin="5 0 5 0"
Click="Button_Click"
Content="{DynamicResource commonNo}" />
<Button
x:Name="btnOk"
MinWidth="140"
Margin="5 0 5 0"
Click="Button_Click"
Content="{DynamicResource commonOK}" />
<Button
x:Name="btnYes"
MinWidth="140"
Margin="5 0 5 0"
Click="Button_Click"
Content="{DynamicResource commonYes}" />
</WrapPanel>
</Border>
</Grid>
</Window>

View file

@ -0,0 +1,192 @@
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.Forms;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using Flow.Launcher.Core.Resource;
using Flow.Launcher.Infrastructure;
using Flow.Launcher.Infrastructure.Image;
using YamlDotNet.Core.Tokens;
namespace Flow.Launcher
{
public partial class MessageBoxEx : Window
{
public MessageBoxEx()
{
InitializeComponent();
}
public enum MessageBoxType
{
ConfirmationWithYesNo = 0,
ConfirmationWithYesNoCancel,
YesNo,
Information,
Error,
Warning
}
public enum MessageBoxImage
{
Warning = 0,
Question,
Information,
Error,
None
}
static MessageBoxEx msgBox;
static MessageBoxResult _result = MessageBoxResult.No;
/// 1 parameter
public static MessageBoxResult Show(string msg)
{
return Show(string.Empty, msg, MessageBoxButton.OK, MessageBoxImage.None);
}
// 2 parameter
public static MessageBoxResult Show(string caption, string text)
{
return Show(caption, text, MessageBoxButton.OK, MessageBoxImage.None);
}
/// 3 parameter
public static MessageBoxResult Show(string caption, string msg, MessageBoxType type)
{
switch (type)
{
case MessageBoxType.ConfirmationWithYesNo:
return Show(caption, msg, MessageBoxButton.YesNo,
MessageBoxImage.Question);
case MessageBoxType.YesNo:
return Show(caption, msg, MessageBoxButton.YesNo,
MessageBoxImage.Question);
case MessageBoxType.ConfirmationWithYesNoCancel:
return Show(caption, msg, MessageBoxButton.YesNoCancel,
MessageBoxImage.Question);
case MessageBoxType.Information:
return Show(caption, msg, MessageBoxButton.OK,
MessageBoxImage.Information);
case MessageBoxType.Error:
return Show(caption, msg, MessageBoxButton.OK,
MessageBoxImage.Error);
case MessageBoxType.Warning:
return Show(caption, msg, MessageBoxButton.OK,
MessageBoxImage.Warning);
default:
return MessageBoxResult.No;
}
}
// 4 parameter, Final Display Message.
public static MessageBoxResult Show(string caption, string text, MessageBoxButton button, MessageBoxImage image)
{
msgBox = new MessageBoxEx();
msgBox.TitleTextBlock.Text = text;
msgBox.DescTextBlock.Text = caption;
msgBox.Title = text;
SetVisibilityOfButtons(button);
SetImageOfMessageBox(image);
msgBox.ShowDialog();
return _result;
}
private void Button_Click(object sender, RoutedEventArgs e)
{
if (sender == btnOk)
_result = MessageBoxResult.OK;
else if (sender == btnYes)
_result = MessageBoxResult.Yes;
else if (sender == btnNo)
_result = MessageBoxResult.No;
else if (sender == btnCancel)
_result = MessageBoxResult.Cancel;
else
_result = MessageBoxResult.None;
msgBox.Close();
msgBox = null;
}
private static void SetVisibilityOfButtons(MessageBoxButton button)
{
switch (button)
{
case MessageBoxButton.OK:
msgBox.btnCancel.Visibility = Visibility.Collapsed;
msgBox.btnNo.Visibility = Visibility.Collapsed;
msgBox.btnYes.Visibility = Visibility.Collapsed;
msgBox.btnOk.Focus();
break;
case MessageBoxButton.OKCancel:
msgBox.btnNo.Visibility = Visibility.Collapsed;
msgBox.btnYes.Visibility = Visibility.Collapsed;
msgBox.btnCancel.Focus();
break;
case MessageBoxButton.YesNo:
msgBox.btnOk.Visibility = Visibility.Collapsed;
msgBox.btnCancel.Visibility = Visibility.Collapsed;
msgBox.btnNo.Focus();
break;
case MessageBoxButton.YesNoCancel:
msgBox.btnOk.Visibility = Visibility.Collapsed;
msgBox.btnCancel.Focus();
break;
default:
break;
}
}
private static void SetImageOfMessageBox(MessageBoxImage image)
{
switch (image)
{
case MessageBoxImage.Warning:
msgBox.SetImage("Warning.png");
msgBox.Img.Visibility = Visibility.Visible;
break;
case MessageBoxImage.Question:
msgBox.SetImage("Question.png");
msgBox.Img.Visibility = Visibility.Visible;
break;
case MessageBoxImage.Information:
msgBox.SetImage("Information.png");
msgBox.Img.Visibility = Visibility.Visible;
break;
case MessageBoxImage.Error:
msgBox.SetImage("Error.png");
msgBox.Img.Visibility = Visibility.Visible;
break;
default:
msgBox.Img.Visibility = Visibility.Collapsed;
break;
}
}
private void SetImage(string imageName)
{
string uri = Constant.ProgramDirectory + "/Images/" + imageName;
var uriSource = new Uri(uri, UriKind.RelativeOrAbsolute);
Img.Source = new BitmapImage(uriSource);
}
private void cmdEsc_OnPress(object sender, ExecutedRoutedEventArgs e)
{
DialogResult = false;
Close();
}
private void Button_Cancel(object sender, RoutedEventArgs e)
{
msgBox.Close();
msgBox = null;
}
}
}

View file

@ -7,16 +7,17 @@
xmlns:sys="clr-namespace:System;assembly=mscorlib">
<SolidColorBrush x:Key="SystemThemeBorder" Color="#3f3f3f" />
<SolidColorBrush x:Key="QuerySuggestionBoxForeground" Color="#7b7b7b" />
<SolidColorBrush x:Key="QuerySuggestionBoxForeground" Color="#4d4d4d" />
<SolidColorBrush x:Key="QuerySelectionBrush" Color="#4a5459" />
<SolidColorBrush x:Key="SubTitleForeground" Color="#7b7b7b" />
<SolidColorBrush x:Key="SubTitleSelectedForeground" Color="#7b7b7b" />
<SolidColorBrush x:Key="SearchIconForeground" Color="#4d4d4d" />
<SolidColorBrush x:Key="SeparatorForeground" Color="#4d4d4d" />
<SolidColorBrush x:Key="SeparatorForeground" Color="#14ffffff" />
<SolidColorBrush x:Key="ThumbColor" Color="#9a9a9a" />
<SolidColorBrush x:Key="InlineHighlight" Color="#0078d7" />
<SolidColorBrush x:Key="HotkeyForeground" Color="#7b7b7b" />
<SolidColorBrush x:Key="HotkeySelectedForeground" Color="#7b7b7b" />
<SolidColorBrush x:Key="ClockDateForeground" Color="#4d4d4d" />
<Color x:Key="ItemSelectedBackgroundColorBrush">#198F8F8F</Color>

View file

@ -7,16 +7,17 @@
xmlns:sys="clr-namespace:System;assembly=mscorlib">
<SolidColorBrush x:Key="SystemThemeBorder" Color="#aaaaaa" />
<SolidColorBrush x:Key="QuerySuggestionBoxForeground" Color="#b5b5b5" />
<SolidColorBrush x:Key="QuerySuggestionBoxForeground" Color="#d8d2d0" />
<SolidColorBrush x:Key="QuerySelectionBrush" Color="#0a68d8" />
<SolidColorBrush x:Key="SubTitleForeground" Color="#818181" />
<SolidColorBrush x:Key="SubTitleSelectedForeground" Color="#72767d" />
<SolidColorBrush x:Key="SearchIconForeground" Color="#d3d3d3" />
<SolidColorBrush x:Key="SeparatorForeground" Color="#eaeaea" />
<SolidColorBrush x:Key="SeparatorForeground" Color="#14000000" />
<SolidColorBrush x:Key="ThumbColor" Color="#868686" />
<SolidColorBrush x:Key="InlineHighlight" Color="#0078d7" />
<SolidColorBrush x:Key="HotkeyForeground" Color="#acacac" />
<SolidColorBrush x:Key="HotkeySelectedForeground" Color="#acacac" />
<SolidColorBrush x:Key="ClockDateForeground" Color="#d3d3d3" />
<Color x:Key="ItemSelectedBackgroundColorBrush">#198F8F8F</Color>
<SolidColorBrush x:Key="Color00B" Color="#fbfbfb" />

View file

@ -8,6 +8,8 @@
<converters:TextConverter x:Key="TextConverter" />
<core:TranslationConverter x:Key="TranslationConverter" />
<!-- Icon for Theme Type Label -->
<Geometry x:Key="circle_half_stroke_solid">F1 M512,512z M0,0z M448,256C448,150,362,64,256,64L256,448C362,448,448,362,448,256z M0,256A256,256,0,1,1,512,256A256,256,0,1,1,0,256z</Geometry>
<Style x:Key="StoreItemFocusVisualStyleKey">
<Setter Property="Control.Template">
<Setter.Value>
@ -25,7 +27,7 @@
<Setter.Value>
<ControlTemplate>
<Rectangle
Margin="-8,-4,-8,-4"
Margin="-8 -4 -8 -4"
RadiusX="5"
RadiusY="5"
Stroke="{DynamicResource Color05B}"
@ -54,31 +56,72 @@
</Setter.Value>
</Setter>
</Style>
<Style x:Key="ThemeList" TargetType="ListBoxItem">
<Setter Property="HorizontalContentAlignment" Value="Left" />
<Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="Padding" Value="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>
<Style x:Key="SettingGroupBox" TargetType="{x:Type Border}">
<Setter Property="Background" Value="{DynamicResource Color00B}" />
<Setter Property="BorderBrush" Value="{DynamicResource Color03B}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="CornerRadius" Value="5" />
<Setter Property="Margin" Value="0,5,0,0" />
<Setter Property="Padding" Value="0,15,0,15" />
<Setter Property="Margin" Value="0 5 0 0" />
<Setter Property="Padding" Value="0 15 0 15" />
<Setter Property="SnapsToDevicePixels" Value="True" />
</Style>
<Style x:Key="SettingTitleLabel" TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="{DynamicResource Color05B}" />
<Setter Property="Margin" Value="0,0,0,0" />
<Setter Property="Margin" Value="0 0 0 0" />
<Setter Property="TextWrapping" Value="Wrap" />
</Style>
<Style x:Key="SettingSubTitleLabel" TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="{DynamicResource Color04B}" />
<Setter Property="FontSize" Value="12" />
<Setter Property="Margin" Value="0,0,0,0" />
<Setter Property="Padding" Value="0,0,24,0" />
<Setter Property="Margin" Value="0 0 0 0" />
<Setter Property="Padding" Value="0 0 24 0" />
<Setter Property="TextWrapping" Value="WrapWithOverflow" />
</Style>
<Style x:Key="TextPanel" TargetType="{x:Type StackPanel}">
<Setter Property="Grid.Column" Value="1" />
<Setter Property="Margin" Value="0,0,0,0" />
<Setter Property="Margin" Value="0 0 0 0" />
<Setter Property="Width" Value="Auto" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="HorizontalAlignment" Value="Left" />
@ -89,7 +132,7 @@
TargetType="{x:Type CheckBox}">
<Setter Property="Width" Value="24" />
<Setter Property="Grid.Column" Value="2" />
<Setter Property="Margin" Value="0,4,10,4" />
<Setter Property="Margin" Value="0 4 10 4" />
<Setter Property="LayoutTransform">
<Setter.Value>
<ScaleTransform ScaleX="1" ScaleY="1" />
@ -100,7 +143,7 @@
<Style x:Key="SideTextAbout" TargetType="{x:Type TextBlock}">
<Setter Property="HorizontalAlignment" Value="Right" />
<Setter Property="Grid.Column" Value="1" />
<Setter Property="Margin" Value="0,0,-18,0" />
<Setter Property="Margin" Value="0 0 -18 0" />
</Style>
@ -123,8 +166,8 @@
x:Name="Spacer"
Width="Auto"
Height="Auto"
Margin="0,10,5,0"
Padding="0,0,0,0"
Margin="0 10 5 0"
Padding="0 0 0 0"
BorderBrush="Transparent"
BorderThickness="0">
<Border
@ -133,7 +176,7 @@
CornerRadius="5">
<ContentPresenter
x:Name="ContentSite"
Margin="12,12,0,12"
Margin="12 12 0 12"
HorizontalAlignment="LEFT"
VerticalAlignment="Center"
ContentSource="Header"
@ -165,8 +208,8 @@
<Border
x:Name="border"
Height="40"
Margin="14,4,8,4"
Padding="0,0,0,0"
Margin="14 4 8 4"
Padding="0 0 0 0"
HorizontalAlignment="Stretch"
Background="{DynamicResource Color01B}"
CornerRadius="5">
@ -180,7 +223,7 @@
Grid.Column="0"
Width="4"
Height="18"
Margin="0,11,0,11"
Margin="0 11 0 11"
Fill="{DynamicResource ToggleSwitchFillOn}"
RadiusX="2"
RadiusY="2"
@ -188,7 +231,7 @@
<ContentPresenter
x:Name="ContentSite"
Grid.Column="1"
Margin="12,11,18,11"
Margin="12 11 18 11"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
ContentSource="Header"
@ -212,10 +255,10 @@
<Style x:Key="PluginList" TargetType="ListBoxItem">
<Setter Property="Background" Value="{DynamicResource Color00B}" />
<Setter Property="Padding" Value="0,0,0,0" />
<Setter Property="Padding" Value="0 0 0 0" />
<Setter Property="UseLayoutRounding" Value="True" />
<Setter Property="SnapsToDevicePixels" Value="True" />
<Setter Property="Margin" Value="0,0,18,5" />
<Setter Property="Margin" Value="0 0 18 5" />
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
<Setter Property="BorderBrush" Value="{DynamicResource Color03B}" />
<!--#region Template for blue highlight win10-->
@ -255,7 +298,7 @@
</MultiTrigger.Conditions>
<Setter TargetName="Bd" Property="Background" Value="{DynamicResource Color00B}" />
<Setter TargetName="Bd" Property="BorderBrush" Value="{DynamicResource Color03B}" />
<Setter TargetName="Bd" Property="Margin" Value="0,0,0,0" />
<Setter TargetName="Bd" Property="Margin" Value="0 0 0 0" />
</MultiTrigger>
@ -267,7 +310,7 @@
<Setter TargetName="Bd" Property="Background" Value="{DynamicResource Color00B}" />
<Setter TargetName="Bd" Property="BorderBrush" Value="{DynamicResource Color03B}" />
<Setter TargetName="Bd" Property="CornerRadius" Value="5" />
<Setter TargetName="Bd" Property="Margin" Value="0,0,0,0" />
<Setter TargetName="Bd" Property="Margin" Value="0 0 0 0" />
</MultiTrigger>
@ -284,10 +327,10 @@
<!--#region PluginStore Style-->
<Style x:Key="StoreList" TargetType="ListViewItem">
<Setter Property="Padding" Value="0,0,0,0" />
<Setter Property="Padding" Value="0 0 0 0" />
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
<Setter Property="HorizontalAlignment" Value="Stretch" />
<Setter Property="Margin" Value="0,0,8,8" />
<Setter Property="Margin" Value="0 0 8 8" />
<Setter Property="VerticalContentAlignment" Value="Stretch" />
<!--#region Template for blue highlight win10-->
<Setter Property="Template">
@ -325,10 +368,10 @@
<Setter Property="Template">
<Setter.Value>
<ControlTemplate>
<Grid Margin="20,0,0,0">
<Grid Margin="20 0 0 0">
<StackPanel>
<TextBlock
Margin="0,20,0,4"
Margin="0 20 0 4"
FontWeight="Bold"
Text="{DynamicResource searchplugin_Noresult_Title}" />
<TextBlock Text="{DynamicResource searchplugin_Noresult_Subtitle}" />
@ -351,10 +394,10 @@
<Setter Property="Template">
<Setter.Value>
<ControlTemplate>
<Grid Margin="20,0,0,0">
<Grid Margin="20 0 0 0">
<StackPanel>
<TextBlock
Margin="0,20,0,4"
Margin="0 20 0 4"
FontWeight="Bold"
Text="{DynamicResource searchplugin_Noresult_Title}" />
<TextBlock Text="{DynamicResource searchplugin_Noresult}" />
@ -394,7 +437,7 @@
x:Name="headerPanel"
Grid.Row="0"
Grid.Column="0"
Margin="2,2,2,0"
Margin="2 2 2 0"
Panel.ZIndex="1"
Background="Transparent"
IsItemsHost="true"

View file

@ -11,6 +11,7 @@ using Flow.Launcher.Core.Resource;
using Flow.Launcher.Infrastructure;
using Flow.Launcher.Infrastructure.UserSettings;
using Flow.Launcher.Plugin;
using static Flow.Launcher.MessageBoxEx;
namespace Flow.Launcher.SettingPages.ViewModels;
@ -62,10 +63,10 @@ public partial class SettingsPaneAboutViewModel : BaseModel
[RelayCommand]
private void AskClearLogFolderConfirmation()
{
var confirmResult = MessageBox.Show(
var confirmResult = MessageBoxEx.Show(
InternationalizationManager.Instance.GetTranslation("clearlogfolderMessage"),
InternationalizationManager.Instance.GetTranslation("clearlogfolder"),
MessageBoxButton.YesNo
MessageBoxType.YesNo
);
if (confirmResult == MessageBoxResult.Yes)

View file

@ -22,17 +22,20 @@ namespace Flow.Launcher.SettingPages.ViewModels;
public partial class SettingsPaneThemeViewModel : BaseModel
{
private const string DefaultFont = "Segoe UI";
public Settings Settings { get; }
public static string LinkHowToCreateTheme => @"https://flowlauncher.com/docs/#/how-to-create-a-theme";
public static string LinkThemeGallery => "https://github.com/Flow-Launcher/Flow.Launcher/discussions/1438";
public string SelectedTheme
private Theme.ThemeData _selectedTheme;
public Theme.ThemeData SelectedTheme
{
get => Settings.Theme;
get => _selectedTheme ??= Themes.Find(v => v.FileNameWithoutExtension == Settings.Theme);
set
{
ThemeManager.Instance.ChangeTheme(value);
_selectedTheme = value;
ThemeManager.Instance.ChangeTheme(value.FileNameWithoutExtension);
if (ThemeManager.Instance.BlurEnabled && Settings.UseDropShadowEffect)
DropShadowEffect = false;
@ -80,6 +83,7 @@ public partial class SettingsPaneThemeViewModel : BaseModel
get => Settings.QueryBoxFontSize;
set => Settings.QueryBoxFontSize = value;
}
public double ResultItemFontSize
{
get => Settings.ResultItemFontSize;
@ -91,33 +95,13 @@ public partial class SettingsPaneThemeViewModel : BaseModel
get => Settings.ResultSubItemFontSize;
set => Settings.ResultSubItemFontSize = value;
}
public List<string> Themes =>
ThemeManager.Instance.LoadAvailableThemes().Select(Path.GetFileNameWithoutExtension).ToList();
private List<Theme.ThemeData> _themes;
public List<Theme.ThemeData> Themes => _themes ??= ThemeManager.Instance.LoadAvailableThemes();
public class ColorScheme
{
public string Display { get; set; }
public ColorSchemes Value { get; set; }
}
public class ColorSchemeData : DropdownDataGeneric<ColorSchemes> { }
public List<ColorScheme> ColorSchemes
{
get
{
List<ColorScheme> modes = new List<ColorScheme>();
var enums = (ColorSchemes[])Enum.GetValues(typeof(ColorSchemes));
foreach (var e in enums)
{
var key = $"ColorScheme{e}";
var display = InternationalizationManager.Instance.GetTranslation(key);
var m = new ColorScheme { Display = display, Value = e, };
modes.Add(m);
}
return modes;
}
}
public List<ColorSchemeData> ColorSchemes { get; } = DropdownDataGeneric<ColorSchemes>.GetValues<ColorSchemeData>("ColorScheme");
public List<string> TimeFormatList { get; } = new()
{
@ -164,11 +148,13 @@ public partial class SettingsPaneThemeViewModel : BaseModel
}
public IEnumerable<int> MaxResultsRange => Enumerable.Range(2, 16);
public bool KeepMaxResults
{
get => Settings.KeepMaxResults;
set => Settings.KeepMaxResults = value;
}
public string ClockText => DateTime.Now.ToString(TimeFormat, CultureInfo.CurrentCulture);
public string DateText => DateTime.Now.ToString(DateFormat, CultureInfo.CurrentCulture);
@ -185,29 +171,9 @@ public partial class SettingsPaneThemeViewModel : BaseModel
set => Settings.UseAnimation = value;
}
public class AnimationSpeed
{
public string Display { get; set; }
public AnimationSpeeds Value { get; set; }
}
public class AnimationSpeedData : DropdownDataGeneric<AnimationSpeeds> { }
public List<AnimationSpeedData> AnimationSpeeds { get; } = DropdownDataGeneric<AnimationSpeeds>.GetValues<AnimationSpeedData>("AnimationSpeed");
public List<AnimationSpeed> AnimationSpeeds
{
get
{
List<AnimationSpeed> speeds = new List<AnimationSpeed>();
var enums = (AnimationSpeeds[])Enum.GetValues(typeof(AnimationSpeeds));
foreach (var e in enums)
{
var key = $"AnimationSpeed{e}";
var display = InternationalizationManager.Instance.GetTranslation(key);
var m = new AnimationSpeed { Display = display, Value = e, };
speeds.Add(m);
}
return speeds;
}
}
public bool UseSound
{
get => Settings.UseSound;
@ -326,7 +292,7 @@ public partial class SettingsPaneThemeViewModel : BaseModel
return fontExists switch
{
true => new FontFamily(Settings.QueryBoxFont),
_ => new FontFamily("Segoe UI")
_ => new FontFamily(DefaultFont)
};
}
set
@ -370,7 +336,7 @@ public partial class SettingsPaneThemeViewModel : BaseModel
return fontExists switch
{
true => new FontFamily(Settings.ResultFont),
_ => new FontFamily("Segoe UI")
_ => new FontFamily(DefaultFont)
};
}
set
@ -415,7 +381,7 @@ public partial class SettingsPaneThemeViewModel : BaseModel
}
else
{
var font = new FontFamily("Segoe UI");
var font = new FontFamily(DefaultFont);
return font;
}
}
@ -446,6 +412,7 @@ public partial class SettingsPaneThemeViewModel : BaseModel
ThemeManager.Instance.ChangeTheme(Settings.Theme);
}
}
public string ThemeImage => Constant.QueryTextBoxIconImagePath;
[RelayCommand]
@ -470,4 +437,22 @@ public partial class SettingsPaneThemeViewModel : BaseModel
Settings = settings;
}
[RelayCommand]
public void Reset()
{
SelectedQueryBoxFont = new FontFamily(DefaultFont);
SelectedQueryBoxFontFaces = new FamilyTypeface { Stretch = FontStretches.Normal, Weight = FontWeights.Normal, Style = FontStyles.Normal };
QueryBoxFontSize = 20;
SelectedResultFont = new FontFamily(DefaultFont);
SelectedResultFontFaces = new FamilyTypeface { Stretch = FontStretches.Normal, Weight = FontWeights.Normal, Style = FontStyles.Normal };
ResultItemFontSize = 16;
SelectedResultSubFont = new FontFamily(DefaultFont);
SelectedResultSubFontFaces = new FamilyTypeface { Stretch = FontStretches.Normal, Weight = FontWeights.Normal, Style = FontStyles.Normal };
ResultSubItemFontSize = 13;
WindowHeightSize = 42;
ItemHeightSize = 58;
}
}

View file

@ -137,7 +137,7 @@
Title="{DynamicResource AlwaysPreview}"
Margin="0 14 0 0"
Icon="&#xe8a1;"
Sub="{DynamicResource AlwaysPreviewToolTip}">
Sub="{Binding AlwaysPreviewToolTip}">
<ui:ToggleSwitch
IsOn="{Binding Settings.AlwaysPreview}"
OffContent="{DynamicResource disable}"

View file

@ -5,9 +5,9 @@
xmlns:cc="clr-namespace:Flow.Launcher.Resources.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:flowlauncher="clr-namespace:Flow.Launcher"
xmlns:userSettings="clr-namespace:Flow.Launcher.Infrastructure.UserSettings;assembly=Flow.Launcher.Infrastructure"
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"
xmlns:viewModels="clr-namespace:Flow.Launcher.SettingPages.ViewModels"
Title="Hotkey"
d:DataContext="{d:DesignInstance viewModels:SettingsPaneHotkeyViewModel}"
@ -33,9 +33,9 @@
Sub="{DynamicResource flowlauncherHotkeyToolTip}">
<flowlauncher:HotkeyControl
ChangeHotkey="{Binding SetTogglingHotkeyCommand}"
HotkeySettings="{Binding Settings}"
DefaultHotkey="Alt+Space"
Hotkey="{Binding Settings.Hotkey}"
HotkeySettings="{Binding Settings}"
ValidateKeyGesture="True"
WindowTitle="{DynamicResource flowlauncherHotkey}" />
</cc:Card>
@ -45,17 +45,15 @@
Icon="&#xe8a1;"
Sub="{DynamicResource previewHotkeyToolTip}">
<flowlauncher:HotkeyControl
HotkeySettings="{Binding Settings}"
DefaultHotkey="F1"
Hotkey="{Binding Settings.PreviewHotkey}"
HotkeySettings="{Binding Settings}"
ValidateKeyGesture="False"
WindowTitle="{DynamicResource previewHotkey}" />
</cc:Card>
<cc:CardGroup Margin="0 12 0 0">
<cc:Card
Title="{DynamicResource openResultModifiers}"
Sub="{DynamicResource openResultModifiersToolTip}">
<cc:Card Title="{DynamicResource openResultModifiers}" Sub="{DynamicResource openResultModifiersToolTip}">
<ComboBox
Width="120"
FontSize="14"
@ -106,9 +104,9 @@
Icon="&#xede3;"
Type="Inside">
<flowlauncher:HotkeyControl
HotkeySettings="{Binding Settings}"
DefaultHotkey="Ctrl+I"
Hotkey="{Binding Settings.OpenContextMenuHotkey}"
HotkeySettings="{Binding Settings}"
ValidateKeyGesture="False" />
</cc:Card>
<cc:Card
@ -117,15 +115,20 @@
Type="Inside">
<cc:HotkeyDisplay Keys="Shift+Enter" />
</cc:Card>
<cc:Card
Title="{DynamicResource OpenNativeContextMenuHotkey}"
Icon="&#xede3;"
Type="Inside">
<cc:HotkeyDisplay Keys="Alt+Enter" />
</cc:Card>
<cc:Card
Title="{DynamicResource SettingWindowHotkey}"
Icon="&#xe713;"
Type="Inside">
<flowlauncher:HotkeyControl
HotkeySettings="{Binding Settings}"
DefaultHotkey="Ctrl+I"
Hotkey="{Binding Settings.SettingWindowHotkey}"
HotkeySettings="{Binding Settings}"
ValidateKeyGesture="False" />
</cc:Card>
<cc:Card
@ -172,9 +175,9 @@
Icon="&#xf0ad;"
Type="Inside">
<flowlauncher:HotkeyControl
HotkeySettings="{Binding Settings}"
DefaultHotkey=""
Hotkey="{Binding Settings.SelectPrevPageHotkey}"
HotkeySettings="{Binding Settings}"
ValidateKeyGesture="False" />
</cc:Card>
<cc:Card
@ -182,9 +185,9 @@
Icon="&#xf0ae;"
Type="Inside">
<flowlauncher:HotkeyControl
HotkeySettings="{Binding Settings}"
DefaultHotkey=""
Hotkey="{Binding Settings.SelectNextPageHotkey}"
HotkeySettings="{Binding Settings}"
ValidateKeyGesture="False" />
</cc:Card>
@ -217,9 +220,9 @@
Sub="{DynamicResource autoCompleteHotkeyToolTip}">
<cc:ExCard.SideContent>
<flowlauncher:HotkeyControl
HotkeySettings="{Binding Settings}"
DefaultHotkey="Ctrl+Tab"
Hotkey="{Binding Settings.AutoCompleteHotkey}"
HotkeySettings="{Binding Settings}"
ValidateKeyGesture="False" />
</cc:ExCard.SideContent>
<cc:Card
@ -227,9 +230,9 @@
Sub="{DynamicResource AdditionalHotkeyToolTip}"
Type="InsideFit">
<flowlauncher:HotkeyControl
HotkeySettings="{Binding Settings}"
DefaultHotkey=""
Hotkey="{Binding Settings.AutoCompleteHotkey2}"
HotkeySettings="{Binding Settings}"
ValidateKeyGesture="False" />
</cc:Card>
</cc:ExCard>
@ -240,9 +243,9 @@
Icon="&#xe74a;">
<cc:ExCard.SideContent>
<flowlauncher:HotkeyControl
HotkeySettings="{Binding Settings}"
DefaultHotkey="Shift+Tab"
Hotkey="{Binding Settings.SelectPrevItemHotkey}"
HotkeySettings="{Binding Settings}"
ValidateKeyGesture="False" />
</cc:ExCard.SideContent>
<cc:Card
@ -250,9 +253,9 @@
Sub="{DynamicResource AdditionalHotkeyToolTip}"
Type="InsideFit">
<flowlauncher:HotkeyControl
HotkeySettings="{Binding Settings}"
DefaultHotkey=""
Hotkey="{Binding Settings.SelectPrevItemHotkey2}"
HotkeySettings="{Binding Settings}"
ValidateKeyGesture="False" />
</cc:Card>
</cc:ExCard>
@ -263,9 +266,9 @@
Icon="&#xe74b;">
<cc:ExCard.SideContent>
<flowlauncher:HotkeyControl
HotkeySettings="{Binding Settings}"
DefaultHotkey="Tab"
Hotkey="{Binding Settings.SelectNextItemHotkey}"
HotkeySettings="{Binding Settings}"
ValidateKeyGesture="False" />
</cc:ExCard.SideContent>
<cc:Card
@ -273,9 +276,9 @@
Sub="{DynamicResource AdditionalHotkeyToolTip}"
Type="InsideFit">
<flowlauncher:HotkeyControl
HotkeySettings="{Binding Settings}"
DefaultHotkey=""
Hotkey="{Binding Settings.SelectNextItemHotkey2}"
HotkeySettings="{Binding Settings}"
ValidateKeyGesture="False" />
</cc:Card>
</cc:ExCard>
@ -435,8 +438,7 @@
<GridViewColumn Width="430" Header="{DynamicResource builtinShortcutDescription}">
<GridViewColumn.CellTemplate>
<DataTemplate DataType="{x:Type userSettings:BuiltinShortcutModel}">
<TextBlock
Text="{Binding Description, Converter={StaticResource TranslationConverter}}" />
<TextBlock Text="{Binding Description, Converter={StaticResource TranslationConverter}}" />
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>

View file

@ -39,7 +39,17 @@
TextAlignment="left"
Visibility="Collapsed" />
<!-- Theme Preview and Editor -->
<Grid Height="380">
<Grid>
<Grid.Style>
<Style x:Name="PreviewArea" TargetType="Grid">
<Setter Property="MaxHeight" Value="380" />
<Style.Triggers>
<DataTrigger Binding="{Binding ElementName=Editor, Path=IsChecked}" Value="True">
<Setter Property="MaxHeight" Value="550" />
</DataTrigger>
</Style.Triggers>
</Style>
</Grid.Style>
<Grid.Resources>
<!-- Style for the second ColumnDefinition -->
<Style x:Key="SecondColumnStyle" TargetType="ColumnDefinition">
@ -245,14 +255,17 @@
<Button
Margin="8"
HorizontalAlignment="Stretch"
Click="Reset_Click"
Command="{Binding ResetCommand}"
Content="{DynamicResource resetCustomize}" />
</StackPanel>
</ScrollViewer>
</Border>
<!-- Theme Preview -->
<Border Grid.Column="0" Background="{Binding PreviewBackground}">
<Border
Grid.Column="0"
Background="{Binding PreviewBackground}"
SnapsToDevicePixels="True"
UseLayoutRounding="True">
<Border.Style>
<Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="6 0 0 6" />
@ -290,16 +303,8 @@
Width="400"
Margin="40 30 0 30"
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>
Style="{DynamicResource WindowBorderStyle}">
<Border BorderThickness="0" Style="{DynamicResource WindowRadius}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
@ -378,122 +383,99 @@
</cc:Card>
<!-- Theme -->
<Border
Height="64"
<cc:ExCard
x:Name="ThemeCard"
Title="{DynamicResource theme}"
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}" />
Icon="&#xe790;">
<cc:ExCard.SideContent>
<StackPanel VerticalAlignment="Center" Orientation="Horizontal">
<ui:PathIcon
Width="12"
Margin="0 1 8 0"
VerticalAlignment="Center"
Data="{DynamicResource circle_half_stroke_solid}"
ToolTip="{DynamicResource TypeIsDarkToolTip}"
ToolTipService.InitialShowDelay="0"
Visibility="{Binding SelectedTheme.IsDark, Converter={StaticResource BoolToVisibilityConverter}}" />
<ui:FontIcon
Margin="0 2 8 0"
VerticalAlignment="Center"
FontSize="12"
Glyph="&#xEB42;"
ToolTip="{DynamicResource TypeHasBlurToolTip}"
ToolTipService.InitialShowDelay="0"
Visibility="{Binding SelectedTheme.HasBlur, Converter={StaticResource BoolToVisibilityConverter}}" />
<TextBlock Text="{Binding SelectedTheme.Name}" />
</StackPanel>
<TextBlock Style="{StaticResource Glyph}">
&#xe790;
</TextBlock>
</ItemsControl>
</Border>
<Border
Margin="0"
Padding="0"
HorizontalAlignment="Stretch"
BorderThickness="1 0 1 1"
CornerRadius="0 0 5 5"
Style="{DynamicResource SettingGroupBox}">
</cc:ExCard.SideContent>
<ListBox
Margin="12"
HorizontalAlignment="Center"
HorizontalContentAlignment="Center"
ui:ScrollViewerHelper.AutoHideScrollBars="True"
Background="#ffffff"
HorizontalAlignment="Stretch"
HorizontalContentAlignment="Stretch"
Background="Transparent"
ItemContainerStyle="{DynamicResource ThemeList}"
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" />
<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">
<TextBlock
x:Name="ThemeName"
Margin="0"
Padding="14 12"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Focusable="True"
FontSize="12"
Text="{Binding}"
TextWrapping="Wrap" />
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
SelectedValue="{Binding SelectedTheme}">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel />
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.ItemTemplate>
<DataTemplate>
<Grid
Width="Auto"
Height="34"
Margin="0"
Focusable="True">
<StackPanel Margin="14 2 14 0" Orientation="Horizontal">
<TextBlock
Margin="0 0 0 0"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Text="{Binding Name}"
TextWrapping="Wrap" />
<ui:PathIcon
Width="12"
Margin="8 1 0 0"
VerticalAlignment="Center"
Data="{DynamicResource circle_half_stroke_solid}"
ToolTip="{DynamicResource TypeIsDarkToolTip}"
ToolTipService.InitialShowDelay="0"
Visibility="{Binding IsDark, Converter={StaticResource BoolToVisibilityConverter}}" />
<ui:FontIcon
Margin="8 1 0 0"
VerticalAlignment="Center"
FontSize="12"
Glyph="&#xEB42;"
ToolTip="{DynamicResource TypeHasBlurToolTip}"
ToolTipService.InitialShowDelay="0"
Visibility="{Binding HasBlur, Converter={StaticResource BoolToVisibilityConverter}}" />
</StackPanel>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
<ListBox.Template>
<ControlTemplate>
<Border
Padding="18 12 18 12"
BorderBrush="{DynamicResource Color03B}"
BorderThickness="0 1 0 0">
<ItemsPresenter />
</Border>
</ControlTemplate>
</ListBox.Template>
</ListBox>
</Border>
</cc:ExCard>
<cc:HyperLink
Margin="10"
HorizontalAlignment="Right"
Text="{DynamicResource browserMoreThemes}"
Uri="{Binding LinkThemeGallery}" />
<!-- Fixed Height -->
<cc:CardGroup Margin="0 20 0 0">
<cc:Card
Title="{DynamicResource KeepMaxResults}"

View file

@ -30,52 +30,4 @@ public partial class SettingsPaneTheme : Page
{
_viewModel.UpdateColorScheme();
}
private void Reset_Click(object sender, RoutedEventArgs e)
{
/*The FamilyTypeface should initialize all of its various properties.*/
FamilyTypeface targetTypeface = new FamilyTypeface { Stretch = FontStretches.Normal, Weight = FontWeights.Normal, Style = FontStyles.Normal };
QueryBoxFontSize.Value = 20;
QueryBoxFontComboBox.SelectedIndex = SearchFontIndex("Segoe UI", QueryBoxFontComboBox);
QueryBoxFontStyleComboBox.SelectedIndex = SearchFontStyleIndex(targetTypeface, QueryBoxFontStyleComboBox);
ResultItemFontComboBox.SelectedIndex = SearchFontIndex("Segoe UI", ResultItemFontComboBox);
ResultItemFontStyleComboBox.SelectedIndex = SearchFontStyleIndex(targetTypeface, ResultItemFontStyleComboBox);
ResultItemFontSize.Value = 16;
ResultSubItemFontComboBox.SelectedIndex = SearchFontIndex("Segoe UI", ResultSubItemFontComboBox);
ResultSubItemFontStyleComboBox.SelectedIndex = SearchFontStyleIndex(targetTypeface, ResultSubItemFontStyleComboBox);
ResultSubItemFontSize.Value = 13;
WindowHeightValue.Value = 42;
ItemHeightValue.Value = 58;
}
private int SearchFontIndex(string targetFont, ComboBox combo)
{
for (int i = 0; i < combo.Items.Count; i++)
{
if (combo.Items[i]?.ToString() == targetFont)
{
return i;
}
}
return 0;
}
private int SearchFontStyleIndex(FamilyTypeface targetTypeface, ComboBox combo)
{
for (int i = 0; i < combo.Items.Count; i++)
{
if (combo.Items[i] is FamilyTypeface typefaceItem &&
typefaceItem.Stretch == targetTypeface.Stretch &&
typefaceItem.Weight == targetTypeface.Weight &&
typefaceItem.Style == targetTypeface.Style)
{
return i;
}
}
return 0;
}
}

View file

@ -214,7 +214,7 @@
</ui:NavigationViewItem.Icon>
</ui:NavigationViewItem>
<ui:NavigationViewItem x:Name="Plugins" Content="{DynamicResource plugin}">
<ui:NavigationViewItem x:Name="Plugins" Content="{DynamicResource plugins}">
<ui:NavigationViewItem.Icon>
<ui:BitmapIcon ShowAsMonochrome="False" UriSource="/Images/plugins.png" />
</ui:NavigationViewItem.Icon>
@ -235,7 +235,7 @@
</ui:NavigationViewItem.Icon>
</ui:NavigationViewItem>
<ui:NavigationViewItem x:Name="Hotkey" Content="{DynamicResource hotkey}">
<ui:NavigationViewItem x:Name="Hotkey" Content="{DynamicResource hotkeys}">
<ui:NavigationViewItem.Icon>
<ui:BitmapIcon ShowAsMonochrome="False" UriSource="/Images/keyboard.png" />
</ui:NavigationViewItem.Icon>

View file

@ -29,7 +29,7 @@
<Setter Property="FontSize" Value="28" />
<Setter Property="FontWeight" Value="Regular" />
<Setter Property="Margin" Value="16 7 0 7" />
<Setter Property="Padding" Value="0 4 68 0" />
<Setter Property="Padding" Value="0 0 68 0" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="Height" Value="48" />
<Setter Property="Foreground" Value="#E3E0E3" />
@ -69,7 +69,7 @@
<!-- Further font customisations are dynamically loaded in Theme.cs -->
<Style x:Key="BaseQueryBoxBgStyle" TargetType="{x:Type Border}">
<Setter Property="Margin" Value="0 2 0 0" />
<Setter Property="Margin" Value="0 0 0 0" />
</Style>
<Style
x:Key="QueryBoxBgStyle"
@ -83,9 +83,10 @@
<Setter Property="Height" Value="48" />
<Setter Property="Margin" Value="16 7 0 7" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="Padding" Value="0 4 68 0" />
<Setter Property="Padding" Value="0 0 68 0" />
<Setter Property="HorizontalAlignment" Value="Stretch" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" />
</Style>
<Style x:Key="BaseWindowBorderStyle" TargetType="{x:Type Border}">
@ -97,6 +98,7 @@
<Setter Property="SnapsToDevicePixels" Value="True" />
</Style>
<Style x:Key="BaseWindowStyle" TargetType="{x:Type Window}">
<Setter Property="RenderOptions.ClearTypeHint" Value="Enabled" />
<Setter Property="Width" Value="600" />
</Style>
@ -120,13 +122,15 @@
</Style>
<Style x:Key="BaseClockBox" TargetType="{x:Type TextBlock}">
<Setter Property="FontSize" Value="20" />
<Setter Property="Padding" Value="0" />
<Setter Property="Foreground" Value="#8f8f8f" />
<Setter Property="HorizontalAlignment" Value="Right" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="Margin" Value="0 0 0 0" />
<Setter Property="Margin" Value="0 0 0 3" />
<Style.Triggers>
<DataTrigger Binding="{Binding ElementName=DateBox, Path=Visibility}" Value="Visible">
<Setter Property="FontSize" Value="14" />
<Setter Property="Margin" Value="0 0 0 0" />
</DataTrigger>
</Style.Triggers>
</Style>
@ -139,6 +143,7 @@
<Style.Triggers>
<DataTrigger Binding="{Binding ElementName=ClockBox, Path=Visibility}" Value="Visible">
<Setter Property="FontSize" Value="14" />
<Setter Property="Margin" Value="0 0 0 3" />
</DataTrigger>
</Style.Triggers>
</Style>
@ -398,16 +403,30 @@
<Style x:Key="BaseSearchIconPosition" TargetType="{x:Type Canvas}">
<Setter Property="Width" Value="32" />
<Setter Property="Height" Value="32" />
<Setter Property="Margin" Value="0 2 18 0" />
<Setter Property="Margin" Value="0 0 18 0" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="HorizontalAlignment" Value="Right" />
</Style>
<Style x:Key="BasePreviewBorderStyle" TargetType="{x:Type Border}">
<Setter Property="BorderThickness" Value="1 0 0 0" />
<Setter Property="Width" Value="5" />
<Setter Property="BorderBrush" Value="#FFEAEAEA" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="Margin" Value="0 0 10 10" />
<Setter Property="Background" Value="Transparent" />
<Style.Triggers>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding ElementName=ResultListBox, Path=Items.Count}" Value="0" />
</MultiDataTrigger.Conditions>
<MultiDataTrigger.Setters>
<Setter Property="Height" Value="0" />
<Setter Property="Margin" Value="0" />
</MultiDataTrigger.Setters>
</MultiDataTrigger>
</Style.Triggers>
</Style>
<Style x:Key="BasePreviewGlyph" TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#555555" />
<Setter Property="VerticalAlignment" Value="Center" />
@ -432,7 +451,7 @@
<Style x:Key="PreviewSep" TargetType="{x:Type Separator}">
<Setter Property="Visibility" Value="Visible" />
<Setter Property="Background" Value="{Binding ElementName=MiddleSeparator, Path=Fill}" />
<Setter Property="Margin" Value="0 15 0 5" />
<Setter Property="Margin" Value="0 15 5 5" />
<Style.Triggers>
<DataTrigger Binding="{Binding ElementName=PreviewSubTitle, UpdateSourceTrigger=PropertyChanged, Path=Text.Length}" Value="0">
<Setter Property="Visibility" Value="Collapsed" />
@ -444,6 +463,7 @@
BasedOn="{StaticResource BasePreviewBorderStyle}"
TargetType="{x:Type Border}">
<Setter Property="BorderBrush" Value="Gray" />
</Style>
<Style x:Key="PreviewArea" TargetType="{x:Type Grid}">
@ -480,7 +500,7 @@
<Style x:Key="SearchIconPosition" TargetType="{x:Type Canvas}">
<Setter Property="Width" Value="32" />
<Setter Property="Height" Value="32" />
<Setter Property="Margin" Value="0 2 18 0" />
<Setter Property="Margin" Value="0 0 18 0" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="HorizontalAlignment" Value="Right" />
</Style>
@ -488,7 +508,7 @@
x:Key="ClockPanelPosition"
BasedOn="{StaticResource BaseClockPanelPosition}"
TargetType="{x:Type Canvas}">
<Setter Property="Margin" Value="0 2 66 0" />
<Setter Property="Margin" Value="0 0 66 0" />
</Style>
<Style
x:Key="ItemHotkeyStyle"
@ -530,7 +550,7 @@
<Setter Property="Foreground" Value="#8f8f8f" />
<Setter Property="FontSize" Value="12" />
<Setter Property="FontWeight" Value="Normal" />
<Setter Property="Margin" Value="0 6 0 10" />
<Setter Property="Margin" Value="5 6 0 10" />
<Setter Property="HorizontalAlignment" Value="Stretch" />
<Setter Property="LineHeight" Value="18" />
<Setter Property="TextAlignment" Value="Left" />

View file

@ -1,4 +1,9 @@
<ResourceDictionary
<!--
Name: Blur Black Darker
IsDark: False
HasBlur: True
-->
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:system="clr-namespace:System;assembly=mscorlib">
@ -53,7 +58,7 @@
TargetType="{x:Type Rectangle}">
<Setter Property="Fill" Value="#444444" />
<Setter Property="Height" Value="1" />
<Setter Property="Margin" Value="12,0,12,8" />
<Setter Property="Margin" Value="12 0 12 8" />
</Style>
<Style

View file

@ -1,4 +1,9 @@
<ResourceDictionary
<!--
Name: Blur Black
IsDark: False
HasBlur: True
-->
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:system="clr-namespace:System;assembly=mscorlib">
@ -51,7 +56,7 @@
TargetType="{x:Type Rectangle}">
<Setter Property="Fill" Value="#444444" />
<Setter Property="Height" Value="1" />
<Setter Property="Margin" Value="12,0,12,8" />
<Setter Property="Margin" Value="12 0 12 8" />
</Style>
<Style
@ -168,4 +173,4 @@
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#FFFFFFFF" />
</Style>
</ResourceDictionary>
</ResourceDictionary>

View file

@ -1,4 +1,9 @@
<ResourceDictionary
<!--
Name: Blur White
IsDark: False
HasBlur: True
-->
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:system="clr-namespace:System;assembly=mscorlib">
@ -96,7 +101,7 @@
TargetType="{x:Type Rectangle}">
<Setter Property="Fill" Value="#c6c6c6" />
<Setter Property="Height" Value="1" />
<Setter Property="Margin" Value="12,0,12,8" />
<Setter Property="Margin" Value="12 0 12 8" />
</Style>
<!-- button style in the middle of the scrollbar -->
<Style

View file

@ -1,209 +0,0 @@
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:system="clr-namespace:System;assembly=mscorlib">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/Themes/Base.xaml" />
</ResourceDictionary.MergedDictionaries>
<Style
x:Key="BulletStyle"
BasedOn="{StaticResource BaseBulletStyle}"
TargetType="{x:Type Border}">
<Setter Property="Width" Value="4" />
<Setter Property="Height" Value="42" />
<Setter Property="Background" Value="Transparent" />
</Style>
<Style
x:Key="ItemBulletSelectedStyle"
BasedOn="{StaticResource BaseBulletStyle}"
TargetType="{x:Type Border}">
<Setter Property="Width" Value="4" />
<Setter Property="Height" Value="42" />
<Setter Property="CornerRadius" Value="2" />
<Setter Property="Background" Value="#8897ea" />
</Style>
<Style
x:Key="ItemGlyph"
BasedOn="{StaticResource BaseGlyphStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#2b2b2e" />
<Setter Property="Margin" Value="-4,0,0,0" />
</Style>
<Style
x:Key="QueryBoxStyle"
BasedOn="{StaticResource BaseQueryBoxStyle}"
TargetType="{x:Type TextBox}">
<Setter Property="Padding" Value="0,4,50,0" />
<Setter Property="Foreground" Value="#999aa3" />
<Setter Property="FontSize" Value="18" />
<Setter Property="Height" Value="38" />
</Style>
<Style
x:Key="QuerySuggestionBoxStyle"
BasedOn="{StaticResource BaseQuerySuggestionBoxStyle}"
TargetType="{x:Type TextBox}">
<Setter Property="Background" Value="Transparent" />
<Setter Property="Padding" Value="0,4,50,0" />
<Setter Property="Height" Value="38" />
<Setter Property="FontSize" Value="18" />
<Setter Property="Foreground" Value="#d9d9d9" />
</Style>
<Style
x:Key="WindowBorderStyle"
BasedOn="{StaticResource BaseWindowBorderStyle}"
TargetType="{x:Type Border}">
<Setter Property="BorderThickness" Value="1" />
<Setter Property="BorderBrush" Value="#e2e2e2" />
<Setter Property="Background" Value="#fffeff" />
<Setter Property="CornerRadius" Value="8" />
<Setter Property="UseLayoutRounding" Value="True" />
</Style>
<Style
x:Key="WindowStyle"
BasedOn="{StaticResource BaseWindowStyle}"
TargetType="{x:Type Window}" />
<Style
x:Key="PendingLineStyle"
BasedOn="{StaticResource BasePendingLineStyle}"
TargetType="{x:Type Line}" />
<!-- Item Style -->
<Style
x:Key="ItemTitleStyle"
BasedOn="{StaticResource BaseItemTitleStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#2b2b2e" />
</Style>
<Style
x:Key="ItemSubTitleStyle"
BasedOn="{StaticResource BaseItemSubTitleStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#949394" />
</Style>
<Style
x:Key="SeparatorStyle"
BasedOn="{StaticResource BaseSeparatorStyle}"
TargetType="{x:Type Rectangle}">
<Setter Property="Fill" Value="#e2e2e2" />
<Setter Property="Height" Value="1" />
<Setter Property="Margin" Value="0,0,0,8" />
</Style>
<Style x:Key="HighlightStyle" />
<Style
x:Key="ItemTitleSelectedStyle"
BasedOn="{StaticResource BaseItemTitleSelectedStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#2b2b2e" />
</Style>
<Style
x:Key="ItemSubTitleSelectedStyle"
BasedOn="{StaticResource BaseItemSubTitleSelectedStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#949394" />
</Style>
<SolidColorBrush x:Key="ItemSelectedBackgroundColor">#f1f1f1</SolidColorBrush>
<!-- button style in the middle of the scrollbar -->
<Style
x:Key="ThumbStyle"
BasedOn="{StaticResource BaseThumbStyle}"
TargetType="{x:Type Thumb}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Thumb}">
<Border
Background="#d9d9d9"
BorderBrush="Transparent"
BorderThickness="0"
CornerRadius="2"
DockPanel.Dock="Right" />
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style
x:Key="ScrollBarStyle"
BasedOn="{StaticResource BaseScrollBarStyle}"
TargetType="{x:Type ScrollBar}" />
<Style
x:Key="SearchIconStyle"
BasedOn="{StaticResource BaseSearchIconStyle}"
TargetType="{x:Type Path}">
<Setter Property="Fill" Value="#d9d9d9" />
<Setter Property="Width" Value="24" />
<Setter Property="Height" Value="24" />
</Style>
<Style x:Key="SearchIconPosition" TargetType="{x:Type Canvas}">
<Setter Property="Background" Value="#fffeff" />
<Setter Property="Width" Value="32" />
<Setter Property="Height" Value="32" />
<Setter Property="Margin" Value="0,8,8,0" />
<Setter Property="HorizontalAlignment" Value="Right" />
</Style>
<Style x:Key="ItemHotkeyStyle" TargetType="{x:Type TextBlock}">
<Setter Property="FontSize" Value="12" />
<Setter Property="Foreground" Value="#87888b" />
</Style>
<Style x:Key="ItemHotkeySelectedStyle" TargetType="{x:Type TextBlock}">
<Setter Property="FontSize" Value="12" />
<Setter Property="Foreground" Value="#87888b" />
</Style>
<Style x:Key="ItemGlyphSelectedStyle" TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#808dd5" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="Margin" Value="-4,0,0,0" />
<Setter Property="Width" Value="25" />
<Setter Property="Height" Value="25" />
<Setter Property="FontSize" Value="25" />
</Style>
<CornerRadius x:Key="ItemRadius">5</CornerRadius>
<Thickness x:Key="ItemMargin">10 0 10 0</Thickness>
<Thickness x:Key="ResultMargin">0 0 0 10</Thickness>
<Style
x:Key="ClockPanel"
BasedOn="{StaticResource ClockPanel}"
TargetType="{x:Type StackPanel}">
<Setter Property="Margin" Value="0,0,54,0" />
</Style>
<Style
x:Key="ClockBox"
BasedOn="{StaticResource BaseClockBox}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#c1c1c1" />
</Style>
<Style
x:Key="DateBox"
BasedOn="{StaticResource BaseDateBox}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#c1c1c1" />
</Style>
<Style
x:Key="PreviewBorderStyle"
BasedOn="{StaticResource BasePreviewBorderStyle}"
TargetType="{x:Type Border}">
<Setter Property="BorderBrush" Value="#e2e2e2" />
</Style>
<Style
x:Key="PreviewItemTitleStyle"
BasedOn="{StaticResource BasePreviewItemTitleStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#2b2b2e" />
</Style>
<Style
x:Key="PreviewItemSubTitleStyle"
BasedOn="{StaticResource BasePreviewItemSubTitleStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#949394" />
</Style>
<Style
x:Key="PreviewGlyph"
BasedOn="{StaticResource BasePreviewGlyph}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#2b2b2e" />
</Style>
</ResourceDictionary>

View file

@ -1,190 +0,0 @@
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:system="clr-namespace:System;assembly=mscorlib">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/Themes/Base.xaml" />
</ResourceDictionary.MergedDictionaries>
<Style
x:Key="ItemGlyph"
BasedOn="{StaticResource BaseGlyphStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#9da1aa" />
</Style>
<Style
x:Key="QueryBoxStyle"
BasedOn="{StaticResource BaseQueryBoxStyle}"
TargetType="{x:Type TextBox}">
<Setter Property="Foreground" Value="#999aa3" />
<Setter Property="Padding" Value="0,4,50,0" />
<Setter Property="FontSize" Value="18" />
<Setter Property="Height" Value="38" />
</Style>
<Style
x:Key="QuerySuggestionBoxStyle"
BasedOn="{StaticResource BaseQuerySuggestionBoxStyle}"
TargetType="{x:Type TextBox}">
<Setter Property="Background" Value="Transparent" />
<Setter Property="Padding" Value="0,4,50,0" />
<Setter Property="Height" Value="38" />
<Setter Property="FontSize" Value="18" />
<Setter Property="Foreground" Value="#d9d9d9" />
</Style>
<Style
x:Key="WindowBorderStyle"
BasedOn="{StaticResource BaseWindowBorderStyle}"
TargetType="{x:Type Border}">
<Setter Property="BorderThickness" Value="1" />
<Setter Property="BorderBrush" Value="#e2e2e2" />
<Setter Property="Background" Value="White" />
<Setter Property="CornerRadius" Value="8" />
<Setter Property="UseLayoutRounding" Value="True" />
</Style>
<Style
x:Key="WindowStyle"
BasedOn="{StaticResource BaseWindowStyle}"
TargetType="{x:Type Window}" />
<Style
x:Key="PendingLineStyle"
BasedOn="{StaticResource BasePendingLineStyle}"
TargetType="{x:Type Line}" />
<!-- Item Style -->
<Style
x:Key="ItemTitleStyle"
BasedOn="{StaticResource BaseItemTitleStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#3d434a" />
</Style>
<Style
x:Key="ItemSubTitleStyle"
BasedOn="{StaticResource BaseItemSubTitleStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#9da1aa" />
</Style>
<Style
x:Key="SeparatorStyle"
BasedOn="{StaticResource BaseSeparatorStyle}"
TargetType="{x:Type Rectangle}">
<Setter Property="Fill" Value="#e2e2e2" />
<Setter Property="Height" Value="1" />
<Setter Property="Margin" Value="0,0,0,8" />
</Style>
<Style x:Key="HighlightStyle" />
<Style
x:Key="ItemTitleSelectedStyle"
BasedOn="{StaticResource BaseItemTitleSelectedStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#ffffff" />
</Style>
<Style
x:Key="ItemSubTitleSelectedStyle"
BasedOn="{StaticResource BaseItemSubTitleSelectedStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#ffffff" />
</Style>
<SolidColorBrush x:Key="ItemSelectedBackgroundColor">#5046e5</SolidColorBrush>
<!-- button style in the middle of the scrollbar -->
<Style
x:Key="ThumbStyle"
BasedOn="{StaticResource BaseThumbStyle}"
TargetType="{x:Type Thumb}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Thumb}">
<Border
Background="#a0a8b5"
BorderBrush="Transparent"
BorderThickness="0"
CornerRadius="2"
DockPanel.Dock="Right" />
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style
x:Key="ScrollBarStyle"
BasedOn="{StaticResource BaseScrollBarStyle}"
TargetType="{x:Type ScrollBar}" />
<Style
x:Key="SearchIconStyle"
BasedOn="{StaticResource BaseSearchIconStyle}"
TargetType="{x:Type Path}">
<Setter Property="Fill" Value="#9da1aa" />
<Setter Property="Width" Value="24" />
<Setter Property="Height" Value="24" />
</Style>
<Style x:Key="SearchIconPosition" TargetType="{x:Type Canvas}">
<Setter Property="Background" Value="White" />
<Setter Property="Width" Value="32" />
<Setter Property="Height" Value="32" />
<Setter Property="Margin" Value="0,8,8,0" />
<Setter Property="HorizontalAlignment" Value="Right" />
</Style>
<Style x:Key="ItemHotkeyStyle" TargetType="{x:Type TextBlock}">
<Setter Property="FontSize" Value="12" />
<Setter Property="Foreground" Value="#9da1aa" />
</Style>
<Style x:Key="ItemHotkeySelectedStyle" TargetType="{x:Type TextBlock}">
<Setter Property="FontSize" Value="12" />
<Setter Property="Foreground" Value="#ffffff" />
</Style>
<Style x:Key="ItemGlyphSelectedStyle" TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#ffffff" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="Width" Value="25" />
<Setter Property="Height" Value="25" />
<Setter Property="FontSize" Value="25" />
</Style>
<CornerRadius x:Key="ItemRadius">8</CornerRadius>
<Thickness x:Key="ItemMargin">10 0 10 0</Thickness>
<Thickness x:Key="ResultMargin">0 0 0 10</Thickness>
<Style
x:Key="ClockPanel"
BasedOn="{StaticResource ClockPanel}"
TargetType="{x:Type StackPanel}">
<Setter Property="Margin" Value="0,0,54,0" />
</Style>
<Style
x:Key="ClockBox"
BasedOn="{StaticResource BaseClockBox}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#999aa3" />
</Style>
<Style
x:Key="DateBox"
BasedOn="{StaticResource BaseDateBox}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#999aa3" />
</Style>
<Style
x:Key="PreviewBorderStyle"
BasedOn="{StaticResource BasePreviewBorderStyle}"
TargetType="{x:Type Border}">
<Setter Property="BorderBrush" Value="#e2e2e2" />
</Style>
<Style
x:Key="PreviewItemTitleStyle"
BasedOn="{StaticResource BasePreviewItemTitleStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#3d434a" />
</Style>
<Style
x:Key="PreviewItemSubTitleStyle"
BasedOn="{StaticResource BasePreviewItemSubTitleStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#9da1aa" />
</Style>
<Style
x:Key="PreviewGlyph"
BasedOn="{StaticResource BasePreviewGlyph}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#9da1aa" />
</Style>
</ResourceDictionary>

View file

@ -1,3 +1,8 @@
<!--
Name: Circle
IsDark: True
HasBlur: False
-->
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
@ -17,7 +22,7 @@
x:Key="QueryBoxStyle"
BasedOn="{StaticResource BaseQueryBoxStyle}"
TargetType="{x:Type TextBox}">
<Setter Property="Padding" Value="0,4,50,0" />
<Setter Property="Padding" Value="0 4 50 0" />
<Setter Property="Foreground" Value="{m:DynamicColor SystemControlPageTextBaseHighBrush}" />
<Setter Property="FontSize" Value="18" />
<Setter Property="Height" Value="38" />
@ -27,7 +32,7 @@
x:Key="QuerySuggestionBoxStyle"
BasedOn="{StaticResource BaseQuerySuggestionBoxStyle}"
TargetType="{x:Type TextBox}">
<Setter Property="Padding" Value="0,4,50,0" />
<Setter Property="Padding" Value="0 4 50 0" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="Height" Value="38" />
<Setter Property="FontSize" Value="18" />
@ -72,7 +77,7 @@
TargetType="{x:Type Rectangle}">
<Setter Property="Fill" Value="{m:DynamicColor SystemControlBackgroundChromeMediumBrush}" />
<Setter Property="Height" Value="1" />
<Setter Property="Margin" Value="0,0,0,8" />
<Setter Property="Margin" Value="0 0 0 8" />
</Style>
<Style x:Key="HighlightStyle" />
<Style
@ -123,7 +128,7 @@
<Setter Property="Background" Value="Transparent" />
<Setter Property="Width" Value="32" />
<Setter Property="Height" Value="32" />
<Setter Property="Margin" Value="0,8,8,0" />
<Setter Property="Margin" Value="0 8 8 0" />
<Setter Property="HorizontalAlignment" Value="Right" />
</Style>
@ -150,7 +155,7 @@
x:Key="ClockPanel"
BasedOn="{StaticResource ClockPanel}"
TargetType="{x:Type StackPanel}">
<Setter Property="Margin" Value="0,0,54,0" />
<Setter Property="Margin" Value="0 0 54 0" />
</Style>
<Style
x:Key="ClockBox"
@ -188,4 +193,4 @@
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#9da1aa" />
</Style>
</ResourceDictionary>
</ResourceDictionary>

View file

@ -27,7 +27,7 @@
x:Key="ItemGlyph"
BasedOn="{StaticResource BaseGlyphStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#bbc1c3" />
<Setter Property="Foreground" Value="#eff2f2" />
</Style>
<Style
x:Key="QueryBoxStyle"
@ -139,7 +139,7 @@
<Setter Property="Height" Value="24" />
</Style>
<Style x:Key="SearchIconPosition" TargetType="{x:Type Canvas}">
<Setter Property="Background" Value="#0f1f26" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="Width" Value="32" />
<Setter Property="Height" Value="32" />
<Setter Property="Margin" Value="0,8,8,0" />
@ -155,7 +155,7 @@
<Setter Property="Foreground" Value="#ffffff" />
</Style>
<Style x:Key="ItemGlyphSelectedStyle" TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#58c2b4" />
<Setter Property="Foreground" Value="#eff2f2" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="Width" Value="25" />

View file

@ -1,4 +1,4 @@
<ResourceDictionary
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:system="clr-namespace:System;assembly=mscorlib">
@ -171,4 +171,4 @@
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#ebebeb" />
</Style>
</ResourceDictionary>
</ResourceDictionary>

View file

@ -1,4 +1,4 @@
<ResourceDictionary
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:system="clr-namespace:System;assembly=mscorlib">
@ -189,4 +189,4 @@
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#ffffff" />
</Style>
</ResourceDictionary>
</ResourceDictionary>

View file

@ -28,7 +28,6 @@
x:Key="QuerySuggestionBoxStyle"
BasedOn="{StaticResource BaseQuerySuggestionBoxStyle}"
TargetType="{x:Type TextBox}">
<Setter Property="Background" Value="#282a36" />
<Setter Property="Foreground" Value="#6272a4" />
<Setter Property="FontSize" Value="26" />
<Setter Property="Padding" Value="0,4,66,0" />
@ -98,7 +97,7 @@
<Setter Property="Cursor" Value="Arrow" />
</Style>
<Style x:Key="HighlightStyle">
<Setter Property="Inline.Foreground" Value="#bd93f9" />
<Setter Property="Inline.FontWeight" Value="SemiBold" />
</Style>
<Style x:Key="ItemHotkeyStyle" TargetType="{x:Type TextBlock}">
<Setter Property="FontSize" Value="13" />

View file

@ -11,7 +11,6 @@
BasedOn="{StaticResource BaseGlyphStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#c6c8cb" />
<Setter Property="Margin" Value="-4,0,0,0" />
</Style>
<Style
x:Key="QueryBoxStyle"

View file

@ -1,4 +1,4 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/Themes/Base.xaml" />
</ResourceDictionary.MergedDictionaries>

View file

@ -22,7 +22,6 @@
x:Key="QuerySuggestionBoxStyle"
BasedOn="{StaticResource BaseQuerySuggestionBoxStyle}"
TargetType="{x:Type TextBox}">
<Setter Property="Background" Value="#2e3440" />
<Setter Property="Foreground" Value="#50596b" />
<Setter Property="FontSize" Value="30" />
</Style>

View file

@ -2,45 +2,46 @@
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/Themes/Base.xaml" />
</ResourceDictionary.MergedDictionaries>
<Thickness x:Key="ResultMargin">0 0 0 4</Thickness>
<Thickness x:Key="ResultMargin">0 0 0 0</Thickness>
<Style
x:Key="ItemGlyph"
BasedOn="{StaticResource BaseGlyphStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#ffffff" />
<Setter Property="Foreground" Value="#0e172c" />
</Style>
<Style
x:Key="QueryBoxStyle"
BasedOn="{StaticResource BaseQueryBoxStyle}"
TargetType="{x:Type TextBox}">
<Setter Property="Foreground" Value="#cc1081" />
<Setter Property="CaretBrush" Value="#cc1081" />
<Setter Property="SelectionBrush" Value="#e564b1" />
<Setter Property="Foreground" Value="#0E172C" />
<Setter Property="CaretBrush" Value="#0E172C" />
<Setter Property="SelectionBrush" Value="#a786df" />
</Style>
<Style
x:Key="QuerySuggestionBoxStyle"
BasedOn="{StaticResource BaseQuerySuggestionBoxStyle}"
TargetType="{x:Type TextBox}">
<Setter Property="Background" Value="#1f1d1f" />
<Setter Property="Foreground" Value="#71114b" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="Foreground" Value="#E9819F" />
</Style>
<Style
x:Key="WindowBorderStyle"
BasedOn="{StaticResource BaseWindowBorderStyle}"
TargetType="{x:Type Border}">
<Setter Property="Background" Value="#1f1d1f" />
<Setter Property="BorderThickness" Value="2" />
<Setter Property="BorderBrush" Value="#000000" />
<Setter Property="CornerRadius" Value="8" />
<Setter Property="Background" Value="#fec7d7" />
<Setter Property="BorderThickness" Value="3" />
<Setter Property="BorderBrush" Value="#0e172c" />
</Style>
<Style
x:Key="SeparatorStyle"
BasedOn="{StaticResource BaseSeparatorStyle}"
TargetType="{x:Type Rectangle}">
<Setter Property="Fill" Value="#000000" />
<Setter Property="Height" Value="1" />
<Setter Property="Margin" Value="12,0,12,4" />
<Setter Property="Fill" Value="#0e172c" />
<Setter Property="Height" Value="3" />
<Setter Property="Margin" Value="0 0 0 0" />
</Style>
<Style
x:Key="WindowStyle"
@ -50,34 +51,33 @@
x:Key="PendingLineStyle"
BasedOn="{StaticResource BasePendingLineStyle}"
TargetType="{x:Type Line}">
<Setter Property="Stroke" Value="#cc1081" />
<Setter Property="Stroke" Value="#a786df" />
</Style>
<Style
x:Key="ItemTitleStyle"
BasedOn="{StaticResource BaseItemTitleStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#f5f5f5" />
<Setter Property="Foreground" Value="#0e172c" />
</Style>
<Style
x:Key="ItemSubTitleStyle"
BasedOn="{StaticResource BaseItemSubTitleStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#c2c2c2" />
<Setter Property="Opacity" Value="0.5" />
<Setter Property="Foreground" Value="#0e172c" />
</Style>
<Style
x:Key="ItemTitleSelectedStyle"
BasedOn="{StaticResource BaseItemTitleSelectedStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#f5f5f5" />
<Setter Property="Foreground" Value="#fffffe" />
</Style>
<Style
x:Key="ItemSubTitleSelectedStyle"
BasedOn="{StaticResource BaseItemSubTitleSelectedStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#ed92c9" />
<Setter Property="Foreground" Value="#fffffe" />
</Style>
<SolidColorBrush x:Key="ItemSelectedBackgroundColor">#cc1081</SolidColorBrush>
<SolidColorBrush x:Key="ItemSelectedBackgroundColor">#0e172c</SolidColorBrush>
<Style
x:Key="ThumbStyle"
BasedOn="{StaticResource BaseThumbStyle}"
@ -86,7 +86,7 @@
<Setter.Value>
<ControlTemplate TargetType="{x:Type Thumb}">
<Border
Background="#e564b1"
Background="#E9819F"
BorderBrush="Transparent"
BorderThickness="0"
CornerRadius="2"
@ -104,58 +104,61 @@
<Style x:Key="SearchIconPosition" TargetType="{x:Type Canvas}">
<Setter Property="Width" Value="34" />
<Setter Property="Height" Value="34" />
<Setter Property="Margin" Value="0,6,14,0" />
<Setter Property="Margin" Value="0 6 14 0" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="HorizontalAlignment" Value="Right" />
</Style>
<Style x:Key="SearchIconStyle" TargetType="{x:Type Path}">
<Setter Property="Fill" Value="#cc1081" />
<Setter Property="Fill" Value="#E9819F" />
<Setter Property="Width" Value="28" />
<Setter Property="Height" Value="28" />
</Style>
<Style x:Key="ItemHotkeyStyle" TargetType="{x:Type TextBlock}">
<Setter Property="FontSize" Value="14" />
<Setter Property="Foreground" Value="#ed92c9" />
<Setter Property="FontSize" Value="11" />
<Setter Property="Foreground" Value="#E9819F" />
</Style>
<Style x:Key="ItemHotkeySelectedStyle" TargetType="{x:Type TextBlock}">
<Setter Property="FontSize" Value="14" />
<Setter Property="Foreground" Value="#ed92c9" />
<Setter Property="FontSize" Value="11" />
<Setter Property="Foreground" Value="#E9819F" />
</Style>
<Style
x:Key="ClockBox"
BasedOn="{StaticResource BaseClockBox}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#71114b" />
<Setter Property="Foreground" Value="#E9819F" />
</Style>
<Style
x:Key="DateBox"
BasedOn="{StaticResource BaseDateBox}"
TargetType="{x:Type TextBlock}">
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="Foreground" Value="#71114b" />
<Setter Property="Foreground" Value="#E9819F" />
</Style>
<Style
x:Key="PreviewBorderStyle"
BasedOn="{StaticResource BasePreviewBorderStyle}"
TargetType="{x:Type Border}">
<Setter Property="BorderBrush" Value="#000000" />
<Setter Property="Margin" Value="0 0 10 0" />
<Setter Property="Width" Value="5" />
<Setter Property="BorderThickness" Value="3 0 0 0" />
<Setter Property="BorderBrush" Value="#0e172c" />
</Style>
<Style
x:Key="PreviewItemTitleStyle"
BasedOn="{StaticResource BasePreviewItemTitleStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#f5f5f5" />
<Setter Property="Foreground" Value="#0E172C" />
</Style>
<Style
x:Key="PreviewItemSubTitleStyle"
BasedOn="{StaticResource BasePreviewItemSubTitleStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#c2c2c2" />
<Setter Property="Foreground" Value="#0E172C" />
</Style>
<Style
x:Key="PreviewGlyph"
BasedOn="{StaticResource BasePreviewGlyph}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#ffffff" />
<Setter Property="Foreground" Value="#0E172C" />
</Style>
</ResourceDictionary>

View file

@ -179,15 +179,28 @@
BasedOn="{StaticResource BaseClockBox}"
TargetType="{x:Type TextBlock}">
<Setter Property="FontSize" Value="14" />
<Setter Property="Foreground" Value="#8f8d90" />
<Setter Property="Foreground" Value="#bebebe" />
<Setter Property="Margin" Value="0,0,10,0" />
<Style.Triggers>
<DataTrigger Binding="{Binding ElementName=DateBox, Path=Visibility}" Value="Visible">
<Setter Property="FontSize" Value="14" />
<Setter Property="Margin" Value="0,0,10,3" />
</DataTrigger>
</Style.Triggers>
</Style>
<Style
x:Key="DateBox"
BasedOn="{StaticResource BaseDateBox}"
TargetType="{x:Type TextBlock}">
<Setter Property="FontSize" Value="14" />
<Setter Property="Foreground" Value="#8f8d90" />
<Setter Property="Foreground" Value="#bebebe" />
<Style.Triggers>
<DataTrigger Binding="{Binding ElementName=ClockBox, Path=Visibility}" Value="Visible">
<Setter Property="FontSize" Value="14" />
<Setter Property="Margin" Value="0,0,0,3" />
</DataTrigger>
</Style.Triggers>
</Style>
<Style
x:Key="PreviewBorderStyle"

View file

@ -27,7 +27,6 @@
x:Key="QuerySuggestionBoxStyle"
BasedOn="{StaticResource BaseQuerySuggestionBoxStyle}"
TargetType="{x:Type TextBox}">
<Setter Property="Background" Value="#303840" />
<Setter Property="Foreground" Value="#798189" />
<Setter Property="FontSize" Value="26" />
<Setter Property="Height" Value="42" />

View file

@ -160,7 +160,7 @@
<Setter Property="Foreground" Value="#c2c2c2" />
</Style>
<Style x:Key="ItemGlyphSelectedStyle" TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#fa7941" />
<Setter Property="Foreground" Value="#c2c2c2" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="Width" Value="25" />
@ -174,7 +174,7 @@
x:Key="ClockPanel"
BasedOn="{StaticResource ClockPanel}"
TargetType="{x:Type StackPanel}">
<Setter Property="Margin" Value="0,0,54,0" />
<Setter Property="Margin" Value="0,0,54,2" />
</Style>
<Style
x:Key="ClockBox"

View file

@ -1,199 +0,0 @@
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:system="clr-namespace:System;assembly=mscorlib">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/Themes/Base.xaml" />
</ResourceDictionary.MergedDictionaries>
<Thickness x:Key="ResultMargin">0 0 0 4</Thickness>
<Style
x:Key="ItemGlyph"
BasedOn="{StaticResource BaseGlyphStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#000000" />
</Style>
<Style
x:Key="ItemGlyphSelectedStyle"
BasedOn="{StaticResource BaseGlyphStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#000000" />
</Style>
<Style
x:Key="QueryBoxStyle"
BasedOn="{StaticResource BaseQueryBoxStyle}"
TargetType="{x:Type TextBox}">
<Setter Property="SelectionBrush" Value="#0a68d8" />
<Setter Property="FontSize" Value="24" />
<Setter Property="Foreground" Value="#000000" />
<Setter Property="CaretBrush" Value="#000000" />
<Setter Property="BorderBrush" Value="Black" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="Height" Value="42" />
<Setter Property="Padding" Value="0,4,66,0" />
</Style>
<Style
x:Key="QuerySuggestionBoxStyle"
BasedOn="{StaticResource BaseQuerySuggestionBoxStyle}"
TargetType="{x:Type TextBox}">
<Setter Property="Background" Value="#dddddd" />
<Setter Property="Foreground" Value="#c6c6c6" />
<Setter Property="FontSize" Value="24" />
<Setter Property="Padding" Value="0,4,66,0" />
<Setter Property="Height" Value="42" />
</Style>
<Style
x:Key="WindowBorderStyle"
BasedOn="{StaticResource BaseWindowBorderStyle}"
TargetType="{x:Type Border}">
<Setter Property="BorderThickness" Value="1" />
<Setter Property="BorderBrush" Value="#aaaaaa" />
<Setter Property="CornerRadius" Value="0" />
<Setter Property="Background" Value="#dddddd" />
</Style>
<Style
x:Key="WindowStyle"
BasedOn="{StaticResource BaseWindowStyle}"
TargetType="{x:Type Window}">
<Setter Property="Width" Value="576" />
<Setter Property="RenderOptions.ClearTypeHint" Value="Enabled" />
</Style>
<Style
x:Key="PendingLineStyle"
BasedOn="{StaticResource BasePendingLineStyle}"
TargetType="{x:Type Line}">
<Setter Property="Stroke" Value="#0a68d8" />
</Style>
<!-- Item Style -->
<Style
x:Key="ItemTitleStyle"
BasedOn="{StaticResource BaseItemTitleStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#000000" />
</Style>
<Style
x:Key="ItemSubTitleStyle"
BasedOn="{StaticResource BaseItemSubTitleStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#818181" />
<Setter Property="FontSize" Value="13" />
</Style>
<Style
x:Key="ItemNumberStyle"
BasedOn="{StaticResource BaseItemNumberStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#818181" />
</Style>
<Style
x:Key="ItemTitleSelectedStyle"
BasedOn="{StaticResource BaseItemTitleSelectedStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Cursor" Value="Arrow" />
<Setter Property="Foreground" Value="#000000" />
</Style>
<Style
x:Key="ItemSubTitleSelectedStyle"
BasedOn="{StaticResource BaseItemSubTitleSelectedStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Cursor" Value="Arrow" />
<Setter Property="Foreground" Value="#72767d" />
</Style>
<SolidColorBrush x:Key="ItemSelectedBackgroundColor">#ccd0d4</SolidColorBrush>
<Style
x:Key="ItemImageSelectedStyle"
BasedOn="{StaticResource BaseItemImageSelectedStyle}"
TargetType="{x:Type Image}">
<Setter Property="Cursor" Value="Arrow" />
</Style>
<Style x:Key="HighlightStyle">
<Setter Property="Inline.Foreground" Value="#0078d7" />
</Style>
<Style x:Key="ItemHotkeyStyle" TargetType="{x:Type TextBlock}">
<Setter Property="FontSize" Value="15" />
<Setter Property="Foreground" Value="#b2b2b2" />
</Style>
<Style x:Key="ItemHotkeySelectedStyle" TargetType="{x:Type TextBlock}">
<Setter Property="FontSize" Value="15" />
<Setter Property="Foreground" Value="#b2b2b2" />
</Style>
<!-- button style in the middle of the scrollbar -->
<Style
x:Key="ThumbStyle"
BasedOn="{StaticResource BaseThumbStyle}"
TargetType="{x:Type Thumb}">
<Setter Property="SnapsToDevicePixels" Value="True" />
<Setter Property="OverridesDefaultStyle" Value="true" />
<Setter Property="IsTabStop" Value="false" />
<Setter Property="Focusable" Value="false" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Thumb}">
<Border
Background="#bebebe"
BorderBrush="Transparent"
BorderThickness="0"
CornerRadius="2"
DockPanel.Dock="Right" />
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style
x:Key="ScrollBarStyle"
BasedOn="{StaticResource BaseScrollBarStyle}"
TargetType="{x:Type ScrollBar}" />
<Style
x:Key="SeparatorStyle"
BasedOn="{StaticResource BaseSeparatorStyle}"
TargetType="{x:Type Rectangle}">
<Setter Property="Fill" Value="#c6c6c6" />
<Setter Property="Height" Value="1" />
<Setter Property="Margin" Value="12,0,12,4" />
</Style>
<Style
x:Key="SearchIconStyle"
BasedOn="{StaticResource BaseSearchIconStyle}"
TargetType="{x:Type Path}">
<Setter Property="Fill" Value="#555555" />
<Setter Property="Width" Value="32" />
<Setter Property="Height" Value="32" />
<Setter Property="Opacity" Value="0.2" />
</Style>
<Style
x:Key="ClockBox"
BasedOn="{StaticResource BaseClockBox}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#818181" />
</Style>
<Style
x:Key="DateBox"
BasedOn="{StaticResource BaseDateBox}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#818181" />
</Style>
<Style
x:Key="PreviewBorderStyle"
BasedOn="{StaticResource BasePreviewBorderStyle}"
TargetType="{x:Type Border}">
<Setter Property="BorderBrush" Value="#c6c6c6" />
</Style>
<Style
x:Key="PreviewItemTitleStyle"
BasedOn="{StaticResource BasePreviewItemTitleStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#000000" />
</Style>
<Style
x:Key="PreviewItemSubTitleStyle"
BasedOn="{StaticResource BasePreviewItemSubTitleStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#818181" />
</Style>
<Style
x:Key="PreviewGlyph"
BasedOn="{StaticResource BasePreviewGlyph}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#000000" />
</Style>
</ResourceDictionary>

View file

@ -1,3 +1,8 @@
<!--
Name: Windows 10
IsDark: True
HasBlur: False
-->
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
@ -24,21 +29,19 @@
BasedOn="{StaticResource BaseQueryBoxStyle}"
TargetType="{x:Type TextBox}">
<Setter Property="SelectionBrush" Value="{DynamicResource QuerySelectionBrush}" />
<Setter Property="FontSize" Value="24" />
<Setter Property="FontSize" Value="22" />
<Setter Property="Foreground" Value="{DynamicResource Color05B}" />
<Setter Property="CaretBrush" Value="{DynamicResource Color05B}" />
<Setter Property="FontSize" Value="26" />
<Setter Property="Padding" Value="0,4,66,0" />
<Setter Property="Padding" Value="0 4 66 0" />
<Setter Property="Height" Value="42" />
</Style>
<Style
x:Key="QuerySuggestionBoxStyle"
BasedOn="{StaticResource BaseQuerySuggestionBoxStyle}"
TargetType="{x:Type TextBox}">
<Setter Property="Background" Value="{DynamicResource Color01B}" />
<Setter Property="Foreground" Value="{DynamicResource QuerySuggestionBoxForeground}" />
<Setter Property="FontSize" Value="26" />
<Setter Property="Padding" Value="0,4,66,0" />
<Setter Property="FontSize" Value="22" />
<Setter Property="Padding" Value="0 4 66 0" />
<Setter Property="Height" Value="42" />
</Style>
<Style
@ -55,7 +58,6 @@
BasedOn="{StaticResource BaseWindowStyle}"
TargetType="{x:Type Window}">
<Setter Property="Width" Value="576" />
<Setter Property="RenderOptions.ClearTypeHint" Value="Enabled" />
</Style>
<Style
@ -105,7 +107,7 @@
<Setter Property="Cursor" Value="Arrow" />
</Style>
<Style x:Key="HighlightStyle">
<Setter Property="Inline.Foreground" Value="{DynamicResource InlineHighlight}" />
<Setter Property="Inline.FontWeight" Value="SemiBold" />
</Style>
<Style x:Key="ItemHotkeyStyle" TargetType="{x:Type TextBlock}">
<Setter Property="FontSize" Value="13" />
@ -151,28 +153,35 @@
TargetType="{x:Type Rectangle}">
<Setter Property="Fill" Value="{DynamicResource SeparatorForeground}" />
<Setter Property="Height" Value="1" />
<Setter Property="Margin" Value="12,0,12,8" />
<Setter Property="Margin" Value="12 0 12 8" />
</Style>
<Style
x:Key="SearchIconStyle"
BasedOn="{StaticResource BaseSearchIconStyle}"
TargetType="{x:Type Path}">
<Setter Property="Fill" Value="{DynamicResource SearchIconForeground}" />
<Setter Property="Width" Value="30" />
<Setter Property="Height" Value="30" />
<Setter Property="Opacity" Value="1" />
</Style>
<Style x:Key="SearchIconPosition" TargetType="{x:Type Canvas}">
<Setter Property="Width" Value="32" />
<Setter Property="Height" Value="32" />
<Setter Property="Opacity" Value="1" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="Margin" Value="0 0 16 0" />
<Setter Property="HorizontalAlignment" Value="Right" />
</Style>
<Style
x:Key="ClockBox"
BasedOn="{StaticResource BaseClockBox}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="{DynamicResource HotkeyForeground}" />
<Setter Property="Foreground" Value="{DynamicResource ClockDateForeground}" />
</Style>
<Style
x:Key="DateBox"
BasedOn="{StaticResource BaseDateBox}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="{DynamicResource HotkeyForeground}" />
<Setter Property="Foreground" Value="{DynamicResource ClockDateForeground}" />
</Style>
<Style
x:Key="PreviewBorderStyle"
@ -190,7 +199,6 @@
x:Key="PreviewItemSubTitleStyle"
BasedOn="{StaticResource BasePreviewItemSubTitleStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#818181" />
<Setter Property="Foreground" Value="{DynamicResource SubTitleForeground}" />
<Setter Property="FontSize" Value="13" />
</Style>

View file

@ -1,195 +0,0 @@
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:system="clr-namespace:System;assembly=mscorlib">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/Themes/Base.xaml" />
</ResourceDictionary.MergedDictionaries>
<Thickness x:Key="ResultMargin">0 0 0 8</Thickness>
<Style
x:Key="ItemGlyph"
BasedOn="{StaticResource BaseGlyphStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#ffffff" />
</Style>
<Style
x:Key="QueryBoxStyle"
BasedOn="{StaticResource BaseQueryBoxStyle}"
TargetType="{x:Type TextBox}">
<Setter Property="SelectionBrush" Value="#4a5459" />
<Setter Property="FontSize" Value="24" />
<Setter Property="Foreground" Value="#FFFFFF" />
<Setter Property="CaretBrush" Value="#FFFFFF" />
<Setter Property="FontSize" Value="26" />
<Setter Property="Padding" Value="0,4,66,0" />
<Setter Property="Height" Value="42" />
</Style>
<Style
x:Key="QuerySuggestionBoxStyle"
BasedOn="{StaticResource BaseQuerySuggestionBoxStyle}"
TargetType="{x:Type TextBox}">
<Setter Property="Background" Value="#202020" />
<Setter Property="Foreground" Value="#7b7b7b" />
<Setter Property="FontSize" Value="26" />
<Setter Property="Padding" Value="0,4,66,0" />
<Setter Property="Height" Value="42" />
</Style>
<Style
x:Key="WindowBorderStyle"
BasedOn="{StaticResource BaseWindowBorderStyle}"
TargetType="{x:Type Border}">
<Setter Property="BorderThickness" Value="1" />
<Setter Property="BorderBrush" Value="#3f3f3f" />
<Setter Property="CornerRadius" Value="5" />
<Setter Property="Background" Value="#202020" />
</Style>
<Style
x:Key="WindowStyle"
BasedOn="{StaticResource BaseWindowStyle}"
TargetType="{x:Type Window}">
<Setter Property="Width" Value="576" />
<Setter Property="RenderOptions.ClearTypeHint" Value="Enabled" />
</Style>
<Style
x:Key="PendingLineStyle"
BasedOn="{StaticResource BasePendingLineStyle}"
TargetType="{x:Type Line}">
<Setter Property="Stroke" Value="White" />
</Style>
<!-- Item Style -->
<Style
x:Key="ItemTitleStyle"
BasedOn="{StaticResource BaseItemTitleStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#ffffff" />
</Style>
<Style
x:Key="ItemSubTitleStyle"
BasedOn="{StaticResource BaseItemSubTitleStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#7b7b7b" />
<Setter Property="FontSize" Value="13" />
<Setter Property="FontWeight" Value="Regular" />
</Style>
<Style
x:Key="ItemNumberStyle"
BasedOn="{StaticResource BaseItemNumberStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#ffffff" />
</Style>
<Style
x:Key="ItemTitleSelectedStyle"
BasedOn="{StaticResource BaseItemTitleSelectedStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Cursor" Value="Arrow" />
<Setter Property="Foreground" Value="#ffffff" />
</Style>
<Style
x:Key="ItemSubTitleSelectedStyle"
BasedOn="{StaticResource BaseItemSubTitleSelectedStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Cursor" Value="Arrow" />
<Setter Property="Foreground" Value="#7b7b7b" />
<Setter Property="FontSize" Value="13" />
<Setter Property="FontWeight" Value="Regular" />
</Style>
<SolidColorBrush x:Key="ItemSelectedBackgroundColor">#198F8F8F</SolidColorBrush>
<Style
x:Key="ItemImageSelectedStyle"
BasedOn="{StaticResource BaseItemImageSelectedStyle}"
TargetType="{x:Type Image}">
<Setter Property="Cursor" Value="Arrow" />
</Style>
<Style x:Key="HighlightStyle">
<Setter Property="Inline.Foreground" Value="#0078d7" />
</Style>
<Style x:Key="ItemHotkeyStyle" TargetType="{x:Type TextBlock}">
<Setter Property="FontSize" Value="13" />
<Setter Property="Foreground" Value="#7b7b7b" />
</Style>
<Style x:Key="ItemHotkeySelectedStyle" TargetType="{x:Type TextBlock}">
<Setter Property="FontSize" Value="13" />
<Setter Property="Foreground" Value="#7b7b7b" />
</Style>
<!-- button style in the middle of the scrollbar -->
<Style
x:Key="ThumbStyle"
BasedOn="{StaticResource BaseThumbStyle}"
TargetType="{x:Type Thumb}">
<Setter Property="SnapsToDevicePixels" Value="True" />
<Setter Property="OverridesDefaultStyle" Value="true" />
<Setter Property="IsTabStop" Value="false" />
<Setter Property="Width" Value="2" />
<Setter Property="Focusable" Value="false" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Thumb}">
<Border
Background="#9a9a9a"
BorderBrush="Transparent"
BorderThickness="0"
CornerRadius="2"
DockPanel.Dock="Right" />
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style
x:Key="ScrollBarStyle"
BasedOn="{StaticResource BaseScrollBarStyle}"
TargetType="{x:Type ScrollBar}" />
<Style
x:Key="SeparatorStyle"
BasedOn="{StaticResource BaseSeparatorStyle}"
TargetType="{x:Type Rectangle}">
<Setter Property="Fill" Value="#4d4d4d" />
<Setter Property="Height" Value="1" />
<Setter Property="Margin" Value="12,0,12,8" />
</Style>
<Style
x:Key="SearchIconStyle"
BasedOn="{StaticResource BaseSearchIconStyle}"
TargetType="{x:Type Path}">
<Setter Property="Fill" Value="#4d4d4d" />
<Setter Property="Width" Value="32" />
<Setter Property="Height" Value="32" />
</Style>
<Style
x:Key="ClockBox"
BasedOn="{StaticResource BaseClockBox}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#7b7b7b" />
</Style>
<Style
x:Key="DateBox"
BasedOn="{StaticResource BaseDateBox}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#7b7b7b" />
</Style>
<Style
x:Key="PreviewBorderStyle"
BasedOn="{StaticResource BasePreviewBorderStyle}"
TargetType="{x:Type Border}">
<Setter Property="BorderBrush" Value="#4d4d4d" />
</Style>
<Style
x:Key="PreviewItemTitleStyle"
BasedOn="{StaticResource BasePreviewItemTitleStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#ffffff" />
</Style>
<Style
x:Key="PreviewItemSubTitleStyle"
BasedOn="{StaticResource BasePreviewItemSubTitleStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#7b7b7b" />
</Style>
<Style
x:Key="PreviewGlyph"
BasedOn="{StaticResource BasePreviewGlyph}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#ffffff" />
</Style>
</ResourceDictionary>

View file

@ -1,72 +1,77 @@
<!--
Name: Windows 11
IsDark: True
HasBlur: False
-->
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:m="http://schemas.modernwpf.com/2019"
xmlns:system="clr-namespace:System;assembly=mscorlib">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/Themes/Base.xaml" />
</ResourceDictionary.MergedDictionaries>
<Thickness x:Key="ResultMargin">0 0 0 8</Thickness>
<Style
x:Key="BulletStyle"
BasedOn="{StaticResource BaseBulletStyle}"
TargetType="{x:Type Border}">
<Setter Property="Width" Value="4" />
<Setter Property="Height" Value="38" />
<Setter Property="Background" Value="Transparent" />
</Style>
<Style
x:Key="ItemBulletSelectedStyle"
BasedOn="{StaticResource BaseBulletStyle}"
TargetType="{x:Type Border}">
<Setter Property="Width" Value="4" />
<Setter Property="Height" Value="38" />
<Setter Property="CornerRadius" Value="2" />
<Setter Property="Background" Value="{StaticResource SystemAccentColorLight1Brush}" />
</Style>
<Style
x:Key="ItemGlyph"
BasedOn="{StaticResource BaseGlyphStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#000000" />
</Style>
<Style
x:Key="ItemGlyphSelectedStyle"
BasedOn="{StaticResource BaseGlyphStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#000000" />
<Setter Property="Foreground" Value="{DynamicResource Color05B}" />
<Setter Property="Margin" Value="-4 0 0 0" />
</Style>
<Style
x:Key="QueryBoxStyle"
BasedOn="{StaticResource BaseQueryBoxStyle}"
TargetType="{x:Type TextBox}">
<Setter Property="SelectionBrush" Value="#0a68d8" />
<Setter Property="FontSize" Value="24" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="Foreground" Value="#000000" />
<Setter Property="CaretBrush" Value="#000000" />
<Setter Property="FontSize" Value="26" />
<Setter Property="Padding" Value="0,4,66,0" />
<Setter Property="Padding" Value="0 0 50 0" />
<Setter Property="Foreground" Value="{DynamicResource Color05B}" />
<Setter Property="CaretBrush" Value="{DynamicResource Color05B}" />
<Setter Property="SelectionBrush" Value="{StaticResource SystemAccentColorLight1Brush}" />
<Setter Property="FontSize" Value="18" />
<Setter Property="Height" Value="42" />
</Style>
<Style
x:Key="QuerySuggestionBoxStyle"
BasedOn="{StaticResource BaseQuerySuggestionBoxStyle}"
TargetType="{x:Type TextBox}">
<Setter Property="Background" Value="Transparent" />
<Setter Property="Foreground" Value="#b5b5b5" />
<Setter Property="FontSize" Value="26" />
<Setter Property="Padding" Value="0,4,66,0" />
<Setter Property="Padding" Value="0 0 50 0" />
<Setter Property="Height" Value="42" />
<Setter Property="FontSize" Value="18" />
<Setter Property="Foreground" Value="{DynamicResource QuerySuggestionBoxForeground}" />
</Style>
<Style
x:Key="WindowBorderStyle"
BasedOn="{StaticResource BaseWindowBorderStyle}"
TargetType="{x:Type Border}">
<Setter Property="BorderThickness" Value="1" />
<Setter Property="BorderBrush" Value="#aaaaaa" />
<Setter Property="CornerRadius" Value="5" />
<Setter Property="Background">
<Setter.Value>
<LinearGradientBrush StartPoint="0,0.5" EndPoint="1,0.5">
<GradientStop Offset="0" Color="#f4f1f8" />
<GradientStop Offset="0.8" Color="#f9f2e8" />
<GradientStop Offset="1" Color="#f9f0f3" />
</LinearGradientBrush>
</Setter.Value>
</Setter>
<Setter Property="BorderBrush" Value="{DynamicResource SystemThemeBorder}" />
<Setter Property="Background" Value="{DynamicResource Color01B}" />
<Setter Property="UseLayoutRounding" Value="True" />
</Style>
<Style
x:Key="WindowStyle"
BasedOn="{StaticResource BaseWindowStyle}"
TargetType="{x:Type Window}">
<Setter Property="Width" Value="576" />
<Setter Property="RenderOptions.ClearTypeHint" Value="Enabled" />
</Style>
TargetType="{x:Type Window}" />
<Style
x:Key="PendingLineStyle"
BasedOn="{StaticResource BasePendingLineStyle}"
@ -77,69 +82,47 @@
x:Key="ItemTitleStyle"
BasedOn="{StaticResource BaseItemTitleStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#000000" />
<Setter Property="Foreground" Value="{DynamicResource Color05B}" />
</Style>
<Style
x:Key="ItemSubTitleStyle"
BasedOn="{StaticResource BaseItemSubTitleStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#818181" />
<Setter Property="FontSize" Value="13" />
<Setter Property="Foreground" Value="{DynamicResource SubTitleForeground}" />
</Style>
<Style
x:Key="ItemNumberStyle"
BasedOn="{StaticResource BaseItemNumberStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#A6A6A6" />
x:Key="SeparatorStyle"
BasedOn="{StaticResource BaseSeparatorStyle}"
TargetType="{x:Type Rectangle}">
<Setter Property="Fill" Value="{DynamicResource SeparatorForeground}" />
<Setter Property="Height" Value="1" />
<Setter Property="Margin" Value="0 0 0 0" />
</Style>
<Style x:Key="HighlightStyle" />
<Style
x:Key="ItemTitleSelectedStyle"
BasedOn="{StaticResource BaseItemTitleSelectedStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#000000" />
<Setter Property="Foreground" Value="{DynamicResource Color05B}" />
</Style>
<Style
x:Key="ItemSubTitleSelectedStyle"
BasedOn="{StaticResource BaseItemSubTitleSelectedStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#72767d" />
</Style>
<SolidColorBrush x:Key="ItemSelectedBackgroundColor">#198F8F8F</SolidColorBrush>
<Style
x:Key="ItemImageSelectedStyle"
BasedOn="{StaticResource BaseItemImageSelectedStyle}"
TargetType="{x:Type Image}">
<Setter Property="Cursor" Value="Arrow" />
</Style>
<Style x:Key="HighlightStyle">
<Setter Property="Inline.Foreground" Value="#0078d7" />
</Style>
<Style x:Key="ItemHotkeyStyle" TargetType="{x:Type TextBlock}">
<Setter Property="FontSize" Value="13" />
<Setter Property="Foreground" Value="#acacac" />
</Style>
<Style
x:Key="ItemHotkeySelectedStyle"
BasedOn="{StaticResource BaseItemHotkeySelectedStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="FontSize" Value="13" />
<Setter Property="Foreground" Value="#acacac" />
<Setter Property="Foreground" Value="{DynamicResource SubTitleSelectedForeground}" />
</Style>
<SolidColorBrush x:Key="ItemSelectedBackgroundColor" Color="{m:DynamicColor ItemSelectedBackgroundColorBrush}" />
<!-- button style in the middle of the scrollbar -->
<Style
x:Key="ThumbStyle"
BasedOn="{StaticResource BaseThumbStyle}"
TargetType="{x:Type Thumb}">
<Setter Property="SnapsToDevicePixels" Value="True" />
<Setter Property="OverridesDefaultStyle" Value="true" />
<Setter Property="IsTabStop" Value="false" />
<Setter Property="Width" Value="2" />
<Setter Property="Focusable" Value="false" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Thumb}">
<Border
Background="#868686"
Background="{DynamicResource ThumbColor}"
BorderBrush="Transparent"
BorderThickness="0"
CornerRadius="2"
@ -152,58 +135,84 @@
x:Key="ScrollBarStyle"
BasedOn="{StaticResource BaseScrollBarStyle}"
TargetType="{x:Type ScrollBar}" />
<Style
x:Key="SeparatorStyle"
BasedOn="{StaticResource BaseSeparatorStyle}"
TargetType="{x:Type Rectangle}">
<Setter Property="Fill" Value="#eaeaea" />
<Setter Property="Height" Value="1" />
<Setter Property="Margin" Value="12,0,12,8" />
</Style>
<Style
x:Key="SearchIconStyle"
BasedOn="{StaticResource BaseSearchIconStyle}"
TargetType="{x:Type Path}">
<Setter Property="Fill" Value="#555555" />
<Setter Property="Fill" Value="{DynamicResource SearchIconForeground}" />
<Setter Property="Width" Value="24" />
<Setter Property="Height" Value="24" />
</Style>
<Style x:Key="SearchIconPosition" TargetType="{x:Type Canvas}">
<Setter Property="Background" Value="Transparent" />
<Setter Property="Width" Value="32" />
<Setter Property="Height" Value="32" />
<Setter Property="Opacity" Value="0.2" />
<Setter Property="Margin" Value="0 8 8 0" />
<Setter Property="HorizontalAlignment" Value="Right" />
</Style>
<Style x:Key="ItemHotkeyStyle" TargetType="{x:Type TextBlock}">
<Setter Property="FontSize" Value="12" />
<Setter Property="Foreground" Value="{DynamicResource HotkeyForeground}" />
</Style>
<Style x:Key="ItemHotkeySelectedStyle" TargetType="{x:Type TextBlock}">
<Setter Property="FontSize" Value="12" />
<Setter Property="Foreground" Value="{DynamicResource HotkeySelectedForeground}" />
</Style>
<Style x:Key="ItemGlyphSelectedStyle" TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="{DynamicResource Color05B}" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="Margin" Value="-4 0 0 0" />
<Setter Property="Width" Value="25" />
<Setter Property="Height" Value="25" />
<Setter Property="FontSize" Value="25" />
</Style>
<CornerRadius x:Key="ItemRadius">5</CornerRadius>
<Thickness x:Key="ItemMargin">10 0 5 0</Thickness>
<Thickness x:Key="ResultMargin">0 10 0 10</Thickness>
<Style
x:Key="ClockPanel"
BasedOn="{StaticResource ClockPanel}"
TargetType="{x:Type StackPanel}">
<Setter Property="Margin" Value="0 0 54 0" />
</Style>
<Style
x:Key="ClockBox"
BasedOn="{StaticResource BaseClockBox}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#acacac" />
<Setter Property="FontSize" Value="22" />
<Setter Property="Foreground" Value="{DynamicResource ClockDateForeground}" />
</Style>
<Style
x:Key="DateBox"
BasedOn="{StaticResource BaseDateBox}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#acacac" />
<Setter Property="Foreground" Value="{DynamicResource ClockDateForeground}" />
</Style>
<Style
x:Key="PreviewBorderStyle"
BasedOn="{StaticResource BasePreviewBorderStyle}"
TargetType="{x:Type Border}">
<Setter Property="BorderBrush" Value="#eaeaea" />
<Setter Property="BorderBrush" Value="{DynamicResource SeparatorForeground}" />
<Setter Property="Margin" Value="5 0 10 0" />
</Style>
<Style
x:Key="PreviewItemTitleStyle"
BasedOn="{StaticResource BasePreviewItemTitleStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#000000" />
<Setter Property="Foreground" Value="{DynamicResource Color05B}" />
</Style>
<Style
x:Key="PreviewItemSubTitleStyle"
BasedOn="{StaticResource BasePreviewItemSubTitleStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#818181" />
<Setter Property="Foreground" Value="{DynamicResource SubTitleForeground}" />
</Style>
<Style
x:Key="PreviewGlyph"
BasedOn="{StaticResource BasePreviewGlyph}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#000000" />
<Setter Property="Foreground" Value="{DynamicResource Color05B}" />
</Style>
</ResourceDictionary>

View file

@ -222,34 +222,7 @@ namespace Flow.Launcher.Plugin.Explorer
if (record.Type is ResultType.Volume)
return false;
var screenWithMouseCursor = System.Windows.Forms.Screen.FromPoint(System.Windows.Forms.Cursor.Position);
var xOfScreenCenter = screenWithMouseCursor.WorkingArea.Left + screenWithMouseCursor.WorkingArea.Width / 2;
var yOfScreenCenter = screenWithMouseCursor.WorkingArea.Top + screenWithMouseCursor.WorkingArea.Height / 2;
var showPosition = new System.Drawing.Point(xOfScreenCenter, yOfScreenCenter);
switch (record.Type)
{
case ResultType.File:
{
var fileInfos = new FileInfo[]
{
new(record.FullPath)
};
new Peter.ShellContextMenu().ShowContextMenu(fileInfos, showPosition);
break;
}
case ResultType.Folder:
{
var directoryInfos = new DirectoryInfo[]
{
new(record.FullPath)
};
new Peter.ShellContextMenu().ShowContextMenu(directoryInfos, showPosition);
break;
}
}
ResultManager.ShowNativeContextMenu(record.FullPath, record.Type);
return false;
},

View file

@ -11,6 +11,7 @@ using System.Windows.Input;
using Path = System.IO.Path;
using System.Windows.Controls;
using Flow.Launcher.Plugin.Explorer.Views;
using Peter;
namespace Flow.Launcher.Plugin.Explorer.Search
{
@ -70,6 +71,27 @@ namespace Flow.Launcher.Plugin.Explorer.Search
};
}
internal static void ShowNativeContextMenu(string path, ResultType type)
{
var screenWithMouseCursor = System.Windows.Forms.Screen.FromPoint(System.Windows.Forms.Cursor.Position);
var xOfScreenCenter = screenWithMouseCursor.WorkingArea.Left + screenWithMouseCursor.WorkingArea.Width / 2;
var yOfScreenCenter = screenWithMouseCursor.WorkingArea.Top + screenWithMouseCursor.WorkingArea.Height / 2;
var showPosition = new System.Drawing.Point(xOfScreenCenter, yOfScreenCenter);
switch (type)
{
case ResultType.File:
var fileInfo = new FileInfo[] { new(path) };
new ShellContextMenu().ShowContextMenu(fileInfo, showPosition);
break;
case ResultType.Folder:
var folderInfo = new System.IO.DirectoryInfo[] { new(path) };
new ShellContextMenu().ShowContextMenu(folderInfo, showPosition);
break;
}
}
internal static Result CreateFolderResult(string title, string subtitle, string path, Query query, int score = 0, bool windowsIndexed = false)
{
return new Result
@ -82,6 +104,11 @@ namespace Flow.Launcher.Plugin.Explorer.Search
CopyText = path,
Action = c =>
{
if (c.SpecialKeyState.ToModifierKeys() == ModifierKeys.Alt)
{
ShowNativeContextMenu(path, ResultType.Folder);
return false;
}
// open folder
if (c.SpecialKeyState.ToModifierKeys() == (ModifierKeys.Control | ModifierKeys.Shift))
{
@ -218,8 +245,13 @@ namespace Flow.Launcher.Plugin.Explorer.Search
IcoPath = folderPath,
Score = 500,
CopyText = folderPath,
Action = _ =>
Action = c =>
{
if (c.SpecialKeyState.ToModifierKeys() == ModifierKeys.Alt)
{
ShowNativeContextMenu(folderPath, ResultType.Folder);
return false;
}
OpenFolder(folderPath);
return true;
},
@ -251,6 +283,11 @@ namespace Flow.Launcher.Plugin.Explorer.Search
PreviewPanel = new Lazy<UserControl>(() => new PreviewPanel(Settings, filePath)),
Action = c =>
{
if (c.SpecialKeyState.ToModifierKeys() == ModifierKeys.Alt)
{
ShowNativeContextMenu(filePath, ResultType.File);
return false;
}
try
{
if (c.SpecialKeyState.ToModifierKeys() == (ModifierKeys.Control | ModifierKeys.Shift))

View file

@ -10,7 +10,7 @@
mc:Ignorable="d">
<Grid
x:Name="PreviewGrid"
Margin="20 0 10 0"
Margin="0 0 0 0"
VerticalAlignment="Stretch">
<Grid.RowDefinitions>
<RowDefinition />
@ -23,7 +23,7 @@
</Grid.RowDefinitions>
<Image
Grid.Row="0"
Margin="0 12 0 0"
Margin="5 12 8 0"
Source="{Binding PreviewImage, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=UserControl}}">
<Image.Style>
<Style TargetType="Image">
@ -38,7 +38,7 @@
</Image>
<Grid Grid.Row="1">
<TextBlock
Margin="0 6 0 16"
Margin="5 6 5 16"
HorizontalAlignment="Stretch"
VerticalAlignment="Top"
Style="{DynamicResource PreviewItemTitleStyle}"
@ -59,16 +59,18 @@
</StackPanel.Style>
<Rectangle
Width="Auto"
Margin="0 0 0 0"
Height="1"
Margin="0 0 5 0"
HorizontalAlignment="Stretch"
Style="{DynamicResource SeparatorStyle}" />
<TextBlock
Margin="0 8 0 8"
Margin="5 8 8 8"
Style="{DynamicResource PreviewItemSubTitleStyle}"
Text="{Binding Result.SubTitle}" />
<Rectangle
Width="Auto"
Margin="0 0 0 0"
Height="1"
Margin="0 0 5 0"
HorizontalAlignment="Stretch"
Style="{DynamicResource SeparatorStyle}" />
<StackPanel Visibility="{Binding FileInfoVisibility, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=UserControl}}">
@ -86,7 +88,7 @@
<TextBlock
Grid.Row="0"
Grid.Column="0"
Margin="0 0 0 0"
Margin="5 0 0 0"
VerticalAlignment="Top"
Style="{DynamicResource PreviewItemSubTitleStyle}"
Text="{DynamicResource FileSize}"
@ -95,7 +97,7 @@
<TextBlock
Grid.Row="0"
Grid.Column="1"
Margin="0"
Margin="0 0 13 0"
HorizontalAlignment="Right"
VerticalAlignment="Top"
Style="{DynamicResource PreviewItemSubTitleStyle}"
@ -106,7 +108,7 @@
<TextBlock
Grid.Row="1"
Grid.Column="0"
Margin="0 0 8 0"
Margin="5 0 8 0"
VerticalAlignment="Top"
Style="{DynamicResource PreviewItemSubTitleStyle}"
Text="{DynamicResource Created}"
@ -115,7 +117,7 @@
<TextBlock
Grid.Row="1"
Grid.Column="1"
Margin="0"
Margin="0 0 13 0"
HorizontalAlignment="Right"
VerticalAlignment="Top"
Style="{DynamicResource PreviewItemSubTitleStyle}"
@ -126,7 +128,7 @@
<TextBlock
Grid.Row="2"
Grid.Column="0"
Margin="0 0 8 0"
Margin="5 0 8 0"
VerticalAlignment="Top"
Style="{DynamicResource PreviewItemSubTitleStyle}"
Text="{DynamicResource LastModified}"
@ -135,7 +137,7 @@
<TextBlock
Grid.Row="2"
Grid.Column="1"
Margin="0"
Margin="0 0 13 0"
HorizontalAlignment="Right"
VerticalAlignment="Top"
Style="{DynamicResource PreviewItemSubTitleStyle}"

View file

@ -7,26 +7,21 @@
d:DesignHeight="450"
d:DesignWidth="800"
mc:Ignorable="d">
<Grid Margin="70,15,0,15">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="400" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid Margin="70 15 18 15">
<Grid.ColumnDefinitions />
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
</Grid.RowDefinitions>
<CheckBox
Grid.Column="0"
Grid.Row="0"
Padding="8,0,0,0"
Padding="8 0 0 0"
Content="{DynamicResource plugin_pluginsmanager_plugin_settings_unknown_source}"
IsChecked="{Binding WarnFromUnknownSource}" />
<CheckBox
Grid.Column="0"
Grid.Row="1"
Margin="0,20,0,0"
Padding="8,0,0,0"
Margin="0 10 0 0"
Padding="8 0 0 0"
Content="{DynamicResource plugin_pluginsmanager_plugin_settings_auto_restart}"
IsChecked="{Binding AutoRestartAfterChanging}" />
</Grid>

View file

@ -51,7 +51,7 @@ deploy:
- provider: NuGet
artifact: Plugin nupkg
api_key:
secure: Uho7u3gk4RHzyWGgqgXZuOeI55NbqHLQ9tXahL7xmE4av2oiSldrNiyGgy/0AQYw
secure: sCSd5JWgdzJWDa9kpqECut5ACPKZqcoxKU8ERKC00k7VIjig3/+nFV5zzTcGb0w3
on:
APPVEYOR_REPO_TAG: true