mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
commit
3dda61866c
38 changed files with 1180 additions and 126 deletions
|
|
@ -29,6 +29,7 @@ namespace Flow.Launcher.Infrastructure
|
|||
public static readonly string DefaultIcon = Path.Combine(ImagesDirectory, "app.png");
|
||||
public static readonly string ErrorIcon = Path.Combine(ImagesDirectory, "app_error.png");
|
||||
public static readonly string MissingImgIcon = Path.Combine(ImagesDirectory, "app_missing_img.png");
|
||||
public static readonly string LoadingImgIcon = Path.Combine(ImagesDirectory, "loading.png");
|
||||
|
||||
public static string PythonPath;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
|
|
@ -21,8 +22,10 @@ namespace Flow.Launcher.Infrastructure.Image
|
|||
private static readonly ConcurrentDictionary<string, string> GuidToKey = new();
|
||||
private static IImageHashGenerator _hashGenerator;
|
||||
private static readonly bool EnableImageHash = true;
|
||||
public static ImageSource DefaultImage { get; } = new BitmapImage(new Uri(Constant.MissingImgIcon));
|
||||
public const int SmallIconSize = 32;
|
||||
public static ImageSource MissingImage { get; } = new BitmapImage(new Uri(Constant.MissingImgIcon));
|
||||
public static ImageSource LoadingImage { get; } = new BitmapImage(new Uri(Constant.LoadingImgIcon));
|
||||
public const int SmallIconSize = 64;
|
||||
public const int FullIconSize = 256;
|
||||
|
||||
|
||||
private static readonly string[] ImageExtensions =
|
||||
|
|
@ -99,6 +102,7 @@ namespace Flow.Launcher.Infrastructure.Image
|
|||
Folder,
|
||||
Data,
|
||||
ImageFile,
|
||||
FullImageFile,
|
||||
Error,
|
||||
Cache
|
||||
}
|
||||
|
|
@ -111,7 +115,7 @@ namespace Flow.Launcher.Infrastructure.Image
|
|||
{
|
||||
if (string.IsNullOrEmpty(path))
|
||||
{
|
||||
return new ImageResult(DefaultImage, ImageType.Error);
|
||||
return new ImageResult(MissingImage, ImageType.Error);
|
||||
}
|
||||
|
||||
if (ImageCache.ContainsKey(path, loadFullImage))
|
||||
|
|
@ -201,6 +205,7 @@ namespace Flow.Launcher.Infrastructure.Image
|
|||
if (loadFullImage)
|
||||
{
|
||||
image = LoadFullImage(path);
|
||||
type = ImageType.FullImageFile;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -215,7 +220,7 @@ namespace Flow.Launcher.Infrastructure.Image
|
|||
else
|
||||
{
|
||||
type = ImageType.File;
|
||||
image = GetThumbnail(path, ThumbnailOptions.None);
|
||||
image = GetThumbnail(path, ThumbnailOptions.None, loadFullImage ? FullIconSize : SmallIconSize);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -232,12 +237,12 @@ namespace Flow.Launcher.Infrastructure.Image
|
|||
return new ImageResult(image, type);
|
||||
}
|
||||
|
||||
private static BitmapSource GetThumbnail(string path, ThumbnailOptions option = ThumbnailOptions.ThumbnailOnly)
|
||||
private static BitmapSource GetThumbnail(string path, ThumbnailOptions option = ThumbnailOptions.ThumbnailOnly, int size = SmallIconSize)
|
||||
{
|
||||
return WindowsThumbnailProvider.GetThumbnail(
|
||||
path,
|
||||
Constant.ThumbnailSize,
|
||||
Constant.ThumbnailSize,
|
||||
size,
|
||||
size,
|
||||
option);
|
||||
}
|
||||
|
||||
|
|
@ -254,6 +259,10 @@ namespace Flow.Launcher.Infrastructure.Image
|
|||
if (imageResult.ImageType != ImageType.Error && imageResult.ImageType != ImageType.Cache)
|
||||
{ // we need to get image hash
|
||||
string hash = EnableImageHash ? _hashGenerator.GetHashFromImage(img) : null;
|
||||
if (imageResult.ImageType == ImageType.FullImageFile)
|
||||
{
|
||||
path = $"{path}_{ImageType.FullImageFile}";
|
||||
}
|
||||
if (hash != null)
|
||||
{
|
||||
|
||||
|
|
@ -263,6 +272,7 @@ namespace Flow.Launcher.Infrastructure.Image
|
|||
}
|
||||
else
|
||||
{ // new guid
|
||||
|
||||
GuidToKey[hash] = path;
|
||||
}
|
||||
}
|
||||
|
|
@ -279,9 +289,33 @@ namespace Flow.Launcher.Infrastructure.Image
|
|||
BitmapImage image = new BitmapImage();
|
||||
image.BeginInit();
|
||||
image.CacheOption = BitmapCacheOption.OnLoad;
|
||||
image.UriSource = new Uri(path);
|
||||
image.UriSource = new Uri(path);
|
||||
image.CreateOptions = BitmapCreateOptions.IgnoreColorProfile;
|
||||
image.EndInit();
|
||||
|
||||
if (image.PixelWidth > 320)
|
||||
{
|
||||
BitmapImage resizedWidth = new BitmapImage();
|
||||
resizedWidth.BeginInit();
|
||||
resizedWidth.CacheOption = BitmapCacheOption.OnLoad;
|
||||
resizedWidth.UriSource = new Uri(path);
|
||||
resizedWidth.CreateOptions = BitmapCreateOptions.IgnoreColorProfile;
|
||||
resizedWidth.DecodePixelWidth = 320;
|
||||
resizedWidth.EndInit();
|
||||
|
||||
if (resizedWidth.PixelHeight > 320)
|
||||
{
|
||||
BitmapImage resizedHeight = new BitmapImage();
|
||||
resizedHeight.BeginInit();
|
||||
resizedHeight.CacheOption = BitmapCacheOption.OnLoad;
|
||||
resizedHeight.UriSource = new Uri(path);
|
||||
resizedHeight.CreateOptions = BitmapCreateOptions.IgnoreColorProfile;
|
||||
resizedHeight.DecodePixelHeight = 320;
|
||||
resizedHeight.EndInit();
|
||||
return resizedHeight;
|
||||
}
|
||||
return resizedWidth;
|
||||
}
|
||||
return image;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -146,6 +146,7 @@ namespace Flow.Launcher.Infrastructure.UserSettings
|
|||
/// when false Alphabet static service will always return empty results
|
||||
/// </summary>
|
||||
public bool ShouldUsePinyin { get; set; } = false;
|
||||
public bool AlwaysPreview { get; set; } = false;
|
||||
|
||||
[JsonInclude, JsonConverter(typeof(JsonStringEnumConverter))]
|
||||
public SearchPrecisionScore QuerySearchPrecision { get; private set; } = SearchPrecisionScore.Regular;
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace Flow.Launcher.Plugin
|
||||
|
|
@ -203,6 +204,11 @@ namespace Flow.Launcher.Plugin
|
|||
/// </summary>
|
||||
public string SubTitleToolTip { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Customized Preview Panel
|
||||
/// </summary>
|
||||
public Lazy<UserControl> PreviewPanel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Run this result, asynchronously
|
||||
/// </summary>
|
||||
|
|
@ -223,5 +229,30 @@ namespace Flow.Launcher.Plugin
|
|||
/// </summary>
|
||||
/// <default>#26a0da (blue)</default>
|
||||
public string ProgressBarColor { get; set; } = "#26a0da";
|
||||
|
||||
public PreviewInfo Preview { get; set; } = PreviewInfo.Default;
|
||||
|
||||
/// <summary>
|
||||
/// Info of the preview image.
|
||||
/// </summary>
|
||||
public record PreviewInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Full image used for preview panel
|
||||
/// </summary>
|
||||
public string PreviewImagePath { get; set; }
|
||||
/// <summary>
|
||||
/// Determines if the preview image should occupy the full width of the preveiw panel.
|
||||
/// </summary>
|
||||
public bool IsMedia { get; set; }
|
||||
public string Description { get; set; }
|
||||
|
||||
public static PreviewInfo Default { get; } = new()
|
||||
{
|
||||
PreviewImagePath = null,
|
||||
Description = null,
|
||||
IsMedia = false,
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
BIN
Flow.Launcher/Images/loading.png
Normal file
BIN
Flow.Launcher/Images/loading.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 274 B |
|
|
@ -65,6 +65,8 @@
|
|||
<system:String x:Key="querySearchPrecisionToolTip">Changes minimum match score required for results.</system:String>
|
||||
<system:String x:Key="ShouldUsePinyin">Search with Pinyin</system:String>
|
||||
<system:String x:Key="ShouldUsePinyinToolTip">Allows using Pinyin to search. Pinyin is the standard system of romanized spelling for translating Chinese.</system:String>
|
||||
<system:String x:Key="AlwaysPreview">Always Preview</system:String>
|
||||
<system:String x:Key="AlwaysPreviewToolTip">Always open preview panel when Flow starts. Press F1 to toggle preview. </system:String>
|
||||
<system:String x:Key="shadowEffectNotAllowed">Shadow effect is not allowed while current theme has blur effect enabled</system:String>
|
||||
|
||||
<!-- Setting Plugin -->
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@
|
|||
Title="Flow Launcher"
|
||||
MinWidth="{Binding MainWindowWidth, Mode=OneWay}"
|
||||
MaxWidth="{Binding MainWindowWidth, Mode=OneWay}"
|
||||
d:DataContext="{d:DesignInstance vm:MainViewModel}"
|
||||
AllowDrop="True"
|
||||
AllowsTransparency="True"
|
||||
Background="Transparent"
|
||||
|
|
@ -306,6 +305,7 @@
|
|||
</Style>
|
||||
</ContentControl.Style>
|
||||
<Rectangle
|
||||
Name="MiddleSeparator"
|
||||
Width="Auto"
|
||||
HorizontalAlignment="Stretch"
|
||||
Style="{DynamicResource SeparatorStyle}" />
|
||||
|
|
@ -323,55 +323,151 @@
|
|||
Y1="0"
|
||||
Y2="0" />
|
||||
</Grid>
|
||||
|
||||
<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="ResultListBox"
|
||||
DataContext="{Binding Results}"
|
||||
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"
|
||||
DataContext="{Binding ContextMenu}"
|
||||
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"
|
||||
DataContext="{Binding History}"
|
||||
LeftClickResultCommand="{Binding LeftClickResultCommand}"
|
||||
RightClickResultCommand="{Binding RightClickResultCommand}" />
|
||||
</ContentControl>
|
||||
</Border>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition
|
||||
Width="0.85*"
|
||||
MinWidth="244"
|
||||
MaxWidth="340" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<StackPanel
|
||||
x:Name="ResultArea"
|
||||
Grid.Column="0"
|
||||
Grid.ColumnSpan="2">
|
||||
<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="ResultListBox"
|
||||
DataContext="{Binding Results}"
|
||||
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"
|
||||
DataContext="{Binding ContextMenu}"
|
||||
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"
|
||||
DataContext="{Binding History}"
|
||||
LeftClickResultCommand="{Binding LeftClickResultCommand}"
|
||||
RightClickResultCommand="{Binding RightClickResultCommand}" />
|
||||
</ContentControl>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
<Grid
|
||||
x:Name="Preview"
|
||||
Grid.Column="1"
|
||||
VerticalAlignment="Stretch"
|
||||
d:DataContext="{d:DesignInstance vm:ResultViewModel}"
|
||||
DataContext="{Binding SelectedItem, ElementName=ResultListBox}"
|
||||
Style="{DynamicResource PreviewArea}"
|
||||
Visibility="Collapsed">
|
||||
<Border 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">
|
||||
<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 ShowIcon}">
|
||||
<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 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 Style="{DynamicResource PreviewBorderStyle}" Visibility="{Binding ShowCustomizedPreview}">
|
||||
<ContentControl Content="{Binding Result.PreviewPanel.Value}" />
|
||||
</Border>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</Grid>
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ namespace Flow.Launcher
|
|||
_settings = settings;
|
||||
|
||||
InitializeComponent();
|
||||
InitializePosition();
|
||||
InitializePosition();
|
||||
animationSound.Open(new Uri(AppDomain.CurrentDomain.BaseDirectory + "Resources\\open.wav"));
|
||||
}
|
||||
|
||||
|
|
@ -106,6 +106,7 @@ namespace Flow.Launcher
|
|||
WindowsInteropHelper.DisableControlBox(this);
|
||||
InitProgressbarAnimation();
|
||||
InitializePosition();
|
||||
PreviewReset();
|
||||
// since the default main window visibility is visible
|
||||
// so we need set focus during startup
|
||||
QueryTextBox.Focus();
|
||||
|
|
@ -123,6 +124,7 @@ namespace Flow.Launcher
|
|||
animationSound.Play();
|
||||
}
|
||||
UpdatePosition();
|
||||
PreviewReset();
|
||||
Activate();
|
||||
QueryTextBox.Focus();
|
||||
_settings.ActivateTimes++;
|
||||
|
|
@ -618,12 +620,45 @@ namespace Flow.Launcher
|
|||
}
|
||||
}
|
||||
break;
|
||||
case Key.F1:
|
||||
PreviewToggle();
|
||||
e.Handled = true;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public void PreviewReset()
|
||||
{
|
||||
if (_settings.AlwaysPreview == true)
|
||||
{
|
||||
ResultArea.SetValue(Grid.ColumnSpanProperty, 1);
|
||||
Preview.Visibility = Visibility.Visible;
|
||||
}
|
||||
else
|
||||
{
|
||||
ResultArea.SetValue(Grid.ColumnSpanProperty, 2);
|
||||
Preview.Visibility = Visibility.Collapsed;
|
||||
}
|
||||
}
|
||||
public void PreviewToggle()
|
||||
{
|
||||
|
||||
if (Preview.Visibility == Visibility.Collapsed)
|
||||
{
|
||||
ResultArea.SetValue(Grid.ColumnSpanProperty, 1);
|
||||
Preview.Visibility = Visibility.Visible;
|
||||
}
|
||||
else
|
||||
{
|
||||
ResultArea.SetValue(Grid.ColumnSpanProperty, 2);
|
||||
Preview.Visibility = Visibility.Collapsed;
|
||||
}
|
||||
}
|
||||
|
||||
private void MoveQueryTextToEnd()
|
||||
{
|
||||
// QueryTextBox seems to be update with a DispatcherPriority as low as ContextIdle.
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@
|
|||
<ColumnDefinition Width="Auto" MinWidth="8" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<StackPanel
|
||||
x:Name="HotkeyArea"
|
||||
Grid.Column="2"
|
||||
Margin="0,0,10,0"
|
||||
VerticalAlignment="Center"
|
||||
|
|
@ -104,6 +105,7 @@
|
|||
Margin="0,0,0,0"
|
||||
HorizontalAlignment="Center"
|
||||
IsHitTestVisible="False"
|
||||
RenderOptions.BitmapScalingMode="Fant"
|
||||
Source="{Binding Image, TargetNullValue={x:Null}}"
|
||||
Stretch="Uniform"
|
||||
Visibility="{Binding ShowIcon}">
|
||||
|
|
|
|||
|
|
@ -731,6 +731,22 @@
|
|||
</ItemsControl>
|
||||
</Border>
|
||||
|
||||
<Border Margin="0,30,0,0" Style="{DynamicResource SettingGroupBox}">
|
||||
<ItemsControl Style="{StaticResource SettingGrid}">
|
||||
<StackPanel Style="{StaticResource TextPanel}">
|
||||
<TextBlock Style="{DynamicResource SettingTitleLabel}" Text="{DynamicResource AlwaysPreview}" />
|
||||
<TextBlock Style="{DynamicResource SettingSubTitleLabel}" Text="{DynamicResource AlwaysPreviewToolTip}" />
|
||||
</StackPanel>
|
||||
<CheckBox
|
||||
IsChecked="{Binding Settings.AlwaysPreview}"
|
||||
Style="{DynamicResource SideControlCheckBox}"
|
||||
ToolTip="{DynamicResource AlwaysPreviewToolTip}" />
|
||||
<TextBlock Style="{StaticResource Glyph}">
|
||||

|
||||
</TextBlock>
|
||||
</ItemsControl>
|
||||
</Border>
|
||||
|
||||
<Border Margin="0,30,0,0" Style="{DynamicResource SettingGroupBox}">
|
||||
<ItemsControl Style="{StaticResource SettingGrid}">
|
||||
<StackPanel Style="{StaticResource TextPanel}">
|
||||
|
|
|
|||
|
|
@ -356,7 +356,23 @@
|
|||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style x:Key="BaseSeparatorStyle" TargetType="Rectangle" />
|
||||
<Style x:Key="BaseSeparatorStyle" TargetType="Rectangle">
|
||||
<Style.Triggers>
|
||||
<MultiDataTrigger>
|
||||
<MultiDataTrigger.Conditions>
|
||||
<Condition Binding="{Binding ElementName=QueryTextBox, UpdateSourceTrigger=PropertyChanged, Path=Text.Length}" Value="0" />
|
||||
<Condition Binding="{Binding ElementName=ResultListBox, Path=Visibility}" Value="Collapsed" />
|
||||
<Condition Binding="{Binding ElementName=ContextMenu, Path=Visibility}" Value="Collapsed" />
|
||||
<Condition Binding="{Binding ElementName=History, Path=Visibility}" Value="Collapsed" />
|
||||
</MultiDataTrigger.Conditions>
|
||||
<MultiDataTrigger.Setters>
|
||||
<Setter Property="Visibility" Value="Collapsed" />
|
||||
<Setter Property="Margin" Value="0" />
|
||||
<Setter Property="Height" Value="0" />
|
||||
</MultiDataTrigger.Setters>
|
||||
</MultiDataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
<Style x:Key="HighlightStyle">
|
||||
<Setter Property="Inline.FontWeight" Value="Bold" />
|
||||
</Style>
|
||||
|
|
@ -384,7 +400,63 @@
|
|||
<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="BorderBrush" Value="#FFEAEAEA" />
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="Margin" Value="0,0,10,10" />
|
||||
</Style>
|
||||
<Style x:Key="BasePreviewGlyph" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#555555" />
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
<Setter Property="HorizontalAlignment" Value="Center" />
|
||||
<Setter Property="FontSize" Value="128" />
|
||||
<Setter Property="MaxWidth" Value="128" />
|
||||
<Setter Property="Height" Value="Auto" />
|
||||
<Setter Property="MaxHeight" Value="128" />
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding ElementName=PreviewGlyphIcon, UpdateSourceTrigger=PropertyChanged, Path=Text.Length}" Value="0">
|
||||
<Setter Property="Visibility" Value="Collapsed" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="PreviewGlyph"
|
||||
BasedOn="{StaticResource BasePreviewGlyph}"
|
||||
TargetType="{x:Type TextBlock}" />
|
||||
<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" />
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding ElementName=PreviewSubTitle, UpdateSourceTrigger=PropertyChanged, Path=Text.Length}" Value="0">
|
||||
<Setter Property="Visibility" Value="Collapsed" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="PreviewBorderStyle"
|
||||
BasedOn="{StaticResource BasePreviewBorderStyle}"
|
||||
TargetType="{x:Type Border}">
|
||||
<Setter Property="BorderBrush" Value="Gray" />
|
||||
</Style>
|
||||
|
||||
<Style x:Key="PreviewArea" TargetType="{x:Type Grid}">
|
||||
<Setter Property="Visibility" Value="Collapsed" />
|
||||
<Style.Triggers>
|
||||
<MultiDataTrigger>
|
||||
<MultiDataTrigger.Conditions>
|
||||
<Condition Binding="{Binding ElementName=ResultListBox, Path=Visibility}" Value="Collapsed" />
|
||||
<Condition Binding="{Binding ElementName=ContextMenu, Path=Visibility}" Value="Collapsed" />
|
||||
<Condition Binding="{Binding ElementName=History, Path=Visibility}" Value="Collapsed" />
|
||||
</MultiDataTrigger.Conditions>
|
||||
<MultiDataTrigger.Setters>
|
||||
<Setter Property="Height" Value="0" />
|
||||
</MultiDataTrigger.Setters>
|
||||
</MultiDataTrigger>
|
||||
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
<!-- for classic themes -->
|
||||
<Style x:Key="SearchIconStyle" TargetType="{x:Type Path}">
|
||||
<Setter Property="Fill" Value="#555555" />
|
||||
|
|
@ -431,4 +503,37 @@
|
|||
<Setter Property="FontSize" Value="25" />
|
||||
</Style>
|
||||
|
||||
|
||||
<Style x:Key="BasePreviewItemTitleStyle" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#8f8f8f" />
|
||||
<Setter Property="FontSize" Value="15" />
|
||||
<Setter Property="Margin" Value="0,6,0,0" />
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch" />
|
||||
<Setter Property="TextAlignment" Value="Center" />
|
||||
<Setter Property="TextWrapping" Value="Wrap" />
|
||||
</Style>
|
||||
<Style x:Key="BasePreviewItemSubTitleStyle" TargetType="{x:Type TextBlock}">
|
||||
<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="HorizontalAlignment" Value="Stretch" />
|
||||
<Setter Property="LineHeight" Value="18" />
|
||||
<Setter Property="TextAlignment" Value="Left" />
|
||||
<Setter Property="TextWrapping" Value="Wrap" />
|
||||
</Style>
|
||||
|
||||
<!-- Style for old version themes -->
|
||||
<Style
|
||||
x:Key="PreviewItemTitleStyle"
|
||||
BasedOn="{StaticResource BasePreviewItemTitleStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#8f8f8f" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="PreviewItemSubTitleStyle"
|
||||
BasedOn="{StaticResource BasePreviewItemSubTitleStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#8f8f8f" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
|
|
|
|||
|
|
@ -37,7 +37,6 @@
|
|||
x:Key="WindowBorderStyle"
|
||||
BasedOn="{StaticResource BaseWindowBorderStyle}"
|
||||
TargetType="{x:Type Border}">
|
||||
|
||||
<Setter Property="BorderThickness" Value="1" />
|
||||
<Setter Property="BorderBrush" Value="#444444" />
|
||||
<Setter Property="CornerRadius" Value="0" />
|
||||
|
|
@ -48,6 +47,15 @@
|
|||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style
|
||||
x:Key="SeparatorStyle"
|
||||
BasedOn="{StaticResource BaseSeparatorStyle}"
|
||||
TargetType="{x:Type Rectangle}">
|
||||
<Setter Property="Fill" Value="#444444" />
|
||||
<Setter Property="Height" Value="1" />
|
||||
<Setter Property="Margin" Value="12,0,12,8" />
|
||||
</Style>
|
||||
|
||||
<Style
|
||||
x:Key="WindowStyle"
|
||||
BasedOn="{StaticResource BaseWindowStyle}"
|
||||
|
|
@ -154,4 +162,29 @@
|
|||
<Setter Property="Foreground" Value="#ffffff" />
|
||||
<Setter Property="Opacity" Value="0.2" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="PreviewBorderStyle"
|
||||
BasedOn="{StaticResource BasePreviewBorderStyle}"
|
||||
TargetType="{x:Type Border}">
|
||||
<Setter Property="BorderBrush" Value="#444444" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="PreviewItemTitleStyle"
|
||||
BasedOn="{StaticResource BasePreviewItemTitleStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#FFFFFFFF" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="PreviewItemSubTitleStyle"
|
||||
BasedOn="{StaticResource BasePreviewItemSubTitleStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#FFFFFFFF" />
|
||||
<Setter Property="Opacity" Value="0.5" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="PreviewGlyph"
|
||||
BasedOn="{StaticResource BasePreviewGlyph}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#FFFFFFFF" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
|
|
|
|||
|
|
@ -45,6 +45,15 @@
|
|||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style
|
||||
x:Key="SeparatorStyle"
|
||||
BasedOn="{StaticResource BaseSeparatorStyle}"
|
||||
TargetType="{x:Type Rectangle}">
|
||||
<Setter Property="Fill" Value="#444444" />
|
||||
<Setter Property="Height" Value="1" />
|
||||
<Setter Property="Margin" Value="12,0,12,8" />
|
||||
</Style>
|
||||
|
||||
<Style
|
||||
x:Key="WindowStyle"
|
||||
BasedOn="{StaticResource BaseWindowStyle}"
|
||||
|
|
@ -135,4 +144,28 @@
|
|||
<Setter Property="Foreground" Value="#ffffff" />
|
||||
<Setter Property="Opacity" Value="0.5" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="PreviewBorderStyle"
|
||||
BasedOn="{StaticResource BasePreviewBorderStyle}"
|
||||
TargetType="{x:Type Border}">
|
||||
<Setter Property="BorderBrush" Value="#444444" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="PreviewItemTitleStyle"
|
||||
BasedOn="{StaticResource BasePreviewItemTitleStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#FFFFFFFF" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="PreviewItemSubTitleStyle"
|
||||
BasedOn="{StaticResource BasePreviewItemSubTitleStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#FFFFFFFF" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="PreviewGlyph"
|
||||
BasedOn="{StaticResource BasePreviewGlyph}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#FFFFFFFF" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
|
|
@ -155,4 +155,28 @@
|
|||
<Setter Property="Foreground" Value="#000000" />
|
||||
<Setter Property="Opacity" Value="0.2" />
|
||||
</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="#FF000000" />
|
||||
</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="#FF000000" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@
|
|||
x:Key="SeparatorStyle"
|
||||
BasedOn="{StaticResource BaseSeparatorStyle}"
|
||||
TargetType="{x:Type Rectangle}">
|
||||
<Setter Property="Fill" Value="#f6f5f9" />
|
||||
<Setter Property="Fill" Value="#e2e2e2" />
|
||||
<Setter Property="Height" Value="1" />
|
||||
<Setter Property="Margin" Value="0,0,0,8" />
|
||||
</Style>
|
||||
|
|
@ -156,6 +156,7 @@
|
|||
<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" />
|
||||
|
|
@ -181,4 +182,28 @@
|
|||
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>
|
||||
|
|
@ -69,7 +69,7 @@
|
|||
x:Key="SeparatorStyle"
|
||||
BasedOn="{StaticResource BaseSeparatorStyle}"
|
||||
TargetType="{x:Type Rectangle}">
|
||||
<Setter Property="Fill" Value="#f6f6f6" />
|
||||
<Setter Property="Fill" Value="#e2e2e2" />
|
||||
<Setter Property="Height" Value="1" />
|
||||
<Setter Property="Margin" Value="0,0,0,8" />
|
||||
</Style>
|
||||
|
|
@ -163,4 +163,28 @@
|
|||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#999aa3" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
<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>
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@
|
|||
x:Key="SeparatorStyle"
|
||||
BasedOn="{StaticResource BaseSeparatorStyle}"
|
||||
TargetType="{x:Type Rectangle}">
|
||||
<Setter Property="Fill" Value="{m:DynamicColor SystemControlPageBackgroundListLowBrush}" />
|
||||
<Setter Property="Fill" Value="{m:DynamicColor SystemControlBackgroundChromeMediumBrush}" />
|
||||
<Setter Property="Height" Value="1" />
|
||||
<Setter Property="Margin" Value="0,0,0,8" />
|
||||
</Style>
|
||||
|
|
@ -164,4 +164,28 @@
|
|||
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="{m:DynamicColor SystemControlBackgroundChromeMediumBrush}" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="PreviewItemTitleStyle"
|
||||
BasedOn="{StaticResource BasePreviewItemTitleStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="{m:DynamicColor SystemControlPageTextBaseHighBrush}" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="PreviewItemSubTitleStyle"
|
||||
BasedOn="{StaticResource BasePreviewItemSubTitleStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="{m:DynamicColor SystemControlPageTextBaseMediumBrush}" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="PreviewGlyph"
|
||||
BasedOn="{StaticResource BasePreviewGlyph}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#9da1aa" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
|
|
@ -164,7 +164,7 @@
|
|||
</Style>
|
||||
<CornerRadius x:Key="ItemRadius">0</CornerRadius>
|
||||
<Thickness x:Key="ItemMargin">0</Thickness>
|
||||
<Thickness x:Key="ResultMargin">0 0 0 0</Thickness>
|
||||
<Thickness x:Key="ResultMargin">0 0 0 4</Thickness>
|
||||
<Style
|
||||
x:Key="ClockPanel"
|
||||
BasedOn="{StaticResource ClockPanel}"
|
||||
|
|
@ -183,4 +183,29 @@
|
|||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#57c0b2" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="PreviewBorderStyle"
|
||||
BasedOn="{StaticResource BasePreviewBorderStyle}"
|
||||
TargetType="{x:Type Border}">
|
||||
<Setter Property="BorderBrush" Value="#1e292f" />
|
||||
<Setter Property="Margin" Value="0,0,10,4" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="PreviewItemTitleStyle"
|
||||
BasedOn="{StaticResource BasePreviewItemTitleStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#eff2f2" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="PreviewItemSubTitleStyle"
|
||||
BasedOn="{StaticResource BasePreviewItemSubTitleStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#768084" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="PreviewGlyph"
|
||||
BasedOn="{StaticResource BasePreviewGlyph}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#58c2b4" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
|
|
@ -5,7 +5,7 @@
|
|||
<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}"
|
||||
|
|
@ -122,10 +122,9 @@
|
|||
x:Key="SeparatorStyle"
|
||||
BasedOn="{StaticResource BaseSeparatorStyle}"
|
||||
TargetType="{x:Type Rectangle}">
|
||||
<Setter Property="Fill" Value="#787878" />
|
||||
<Setter Property="Fill" Value="#474747" />
|
||||
<Setter Property="Height" Value="1" />
|
||||
<Setter Property="Margin" Value="0,0,0,8" />
|
||||
<Setter Property="Opacity" Value="0.3" />
|
||||
</Style>
|
||||
<Style x:Key="ItemHotkeyStyle" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="FontSize" Value="14" />
|
||||
|
|
@ -147,4 +146,29 @@
|
|||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#787878" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="PreviewBorderStyle"
|
||||
BasedOn="{StaticResource BasePreviewBorderStyle}"
|
||||
TargetType="{x:Type Border}">
|
||||
<Setter Property="BorderBrush" Value="#474747" />
|
||||
</Style>
|
||||
|
||||
<Style
|
||||
x:Key="PreviewItemTitleStyle"
|
||||
BasedOn="{StaticResource BasePreviewItemTitleStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#ebebeb" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="PreviewItemSubTitleStyle"
|
||||
BasedOn="{StaticResource BasePreviewItemSubTitleStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#787878" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="PreviewGlyph"
|
||||
BasedOn="{StaticResource BasePreviewGlyph}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#ebebeb" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
|
|
|
|||
100
Flow.Launcher/Themes/Darker.xaml
Normal file
100
Flow.Launcher/Themes/Darker.xaml
Normal file
|
|
@ -0,0 +1,100 @@
|
|||
<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="#6e6e6e" />
|
||||
<Setter Property="SelectionBrush" Value="#4D4D4D" />
|
||||
</Style>
|
||||
|
||||
<Style
|
||||
x:Key="QuerySuggestionBoxStyle"
|
||||
BasedOn="{StaticResource BaseQuerySuggestionBoxStyle}"
|
||||
TargetType="{x:Type TextBox}">
|
||||
<Setter Property="Foreground" Value="#8f8f8f" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="WindowBorderStyle"
|
||||
BasedOn="{StaticResource BaseWindowBorderStyle}"
|
||||
TargetType="{x:Type Border}" />
|
||||
|
||||
<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}" />
|
||||
<Style
|
||||
x:Key="ItemSubTitleStyle"
|
||||
BasedOn="{StaticResource BaseItemSubTitleStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#8f8f8f" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="ItemTitleSelectedStyle"
|
||||
BasedOn="{StaticResource BaseItemTitleSelectedStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Cursor" Value="Arrow" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="ItemSubTitleSelectedStyle"
|
||||
BasedOn="{StaticResource BaseItemSubTitleSelectedStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#8f8f8f" />
|
||||
<Setter Property="Cursor" Value="Arrow" />
|
||||
</Style>
|
||||
<SolidColorBrush x:Key="ItemSelectedBackgroundColor">#4d4d4d</SolidColorBrush>
|
||||
<Style
|
||||
x:Key="ItemImageSelectedStyle"
|
||||
BasedOn="{StaticResource BaseItemImageSelectedStyle}"
|
||||
TargetType="{x:Type Image}">
|
||||
<Setter Property="Cursor" Value="Arrow" />
|
||||
</Style>
|
||||
|
||||
<!-- button style in the middle of the scrollbar -->
|
||||
<Style
|
||||
x:Key="ThumbStyle"
|
||||
BasedOn="{StaticResource BaseThumbStyle}"
|
||||
TargetType="{x:Type Thumb}" />
|
||||
|
||||
<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="#3b3b3b" />
|
||||
<Setter Property="Height" Value="1" />
|
||||
<Setter Property="Margin" Value="8,0,8,8" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="PreviewBorderStyle"
|
||||
BasedOn="{StaticResource BasePreviewBorderStyle}"
|
||||
TargetType="{x:Type Border}">
|
||||
<Setter Property="BorderBrush" Value="#3b3b3b" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
|
|
@ -5,6 +5,7 @@
|
|||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/Themes/Base.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<Thickness x:Key="ResultMargin">0 0 0 6</Thickness>
|
||||
<Style
|
||||
x:Key="ItemGlyph"
|
||||
BasedOn="{StaticResource BaseGlyphStyle}"
|
||||
|
|
@ -142,7 +143,7 @@
|
|||
TargetType="{x:Type Rectangle}">
|
||||
<Setter Property="Fill" Value="#42454a" />
|
||||
<Setter Property="Height" Value="1" />
|
||||
<Setter Property="Margin" Value="12,0,12,8" />
|
||||
<Setter Property="Margin" Value="12,0,12,6" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="SearchIconStyle"
|
||||
|
|
@ -164,4 +165,28 @@
|
|||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#72767d" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="PreviewBorderStyle"
|
||||
BasedOn="{StaticResource BasePreviewBorderStyle}"
|
||||
TargetType="{x:Type Border}">
|
||||
<Setter Property="BorderBrush" Value="#42454a" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="PreviewItemTitleStyle"
|
||||
BasedOn="{StaticResource BasePreviewItemTitleStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#dcddde" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="PreviewItemSubTitleStyle"
|
||||
BasedOn="{StaticResource BasePreviewItemSubTitleStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#72767d" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="PreviewGlyph"
|
||||
BasedOn="{StaticResource BasePreviewGlyph}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#ffffff" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/Themes/Base.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<Thickness x:Key="ResultMargin">0 0 0 6</Thickness>
|
||||
<Style
|
||||
x:Key="ItemGlyph"
|
||||
BasedOn="{StaticResource BaseGlyphStyle}"
|
||||
|
|
@ -143,7 +144,7 @@
|
|||
TargetType="{x:Type Rectangle}">
|
||||
<Setter Property="Fill" Value="#44475a" />
|
||||
<Setter Property="Height" Value="1" />
|
||||
<Setter Property="Margin" Value="12,0,12,8" />
|
||||
<Setter Property="Margin" Value="12,0,12,6" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="SearchIconStyle"
|
||||
|
|
@ -166,4 +167,28 @@
|
|||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#6272a4" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="PreviewBorderStyle"
|
||||
BasedOn="{StaticResource BasePreviewBorderStyle}"
|
||||
TargetType="{x:Type Border}">
|
||||
<Setter Property="BorderBrush" Value="#44475a" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="PreviewItemTitleStyle"
|
||||
BasedOn="{StaticResource BasePreviewItemTitleStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#f8f8f2" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="PreviewItemSubTitleStyle"
|
||||
BasedOn="{StaticResource BasePreviewItemSubTitleStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#6272a4" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="PreviewGlyph"
|
||||
BasedOn="{StaticResource BasePreviewGlyph}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#f8f8f2" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@
|
|||
TargetType="{x:Type Rectangle}">
|
||||
<Setter Property="Fill" Value="#747881" />
|
||||
<Setter Property="Height" Value="1" />
|
||||
<Setter Property="Margin" Value="0,0,0,8" />
|
||||
<Setter Property="Margin" Value="0,0,0,0" />
|
||||
</Style>
|
||||
<Style x:Key="HighlightStyle">
|
||||
<Setter Property="Inline.FontWeight" Value="Bold" />
|
||||
|
|
@ -164,4 +164,32 @@
|
|||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#b7babe" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
<Style
|
||||
x:Key="PreviewBorderStyle"
|
||||
BasedOn="{StaticResource BasePreviewBorderStyle}"
|
||||
TargetType="{x:Type Border}">
|
||||
<Setter Property="BorderBrush" Value="#747881" />
|
||||
<Setter Property="Margin" Value="0,0,10,0" />
|
||||
</Style>
|
||||
<Style x:Key="WindowRadius" TargetType="{x:Type Border}">
|
||||
<Setter Property="CornerRadius" Value="0" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="PreviewItemTitleStyle"
|
||||
BasedOn="{StaticResource BasePreviewItemTitleStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#b7babe" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="PreviewItemSubTitleStyle"
|
||||
BasedOn="{StaticResource BasePreviewItemSubTitleStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#9ea1a7" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="PreviewGlyph"
|
||||
BasedOn="{StaticResource BasePreviewGlyph}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#c6c8cb" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
|
|
|
|||
|
|
@ -137,4 +137,29 @@
|
|||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#4bb44b" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="PreviewBorderStyle"
|
||||
BasedOn="{StaticResource BasePreviewBorderStyle}"
|
||||
TargetType="{x:Type Border}">
|
||||
<Setter Property="Margin" Value="0,0,10,0" />
|
||||
<Setter Property="BorderBrush" Value="#785a28" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="PreviewItemTitleStyle"
|
||||
BasedOn="{StaticResource BasePreviewItemTitleStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#a09b8c" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="PreviewItemSubTitleStyle"
|
||||
BasedOn="{StaticResource BasePreviewItemSubTitleStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#5b5a56" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="PreviewGlyph"
|
||||
BasedOn="{StaticResource BasePreviewGlyph}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#b88f3a" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
|
|
@ -163,4 +163,29 @@
|
|||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#5f6673" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
<Style
|
||||
x:Key="PreviewBorderStyle"
|
||||
BasedOn="{StaticResource BasePreviewBorderStyle}"
|
||||
TargetType="{x:Type Border}">
|
||||
<Setter Property="Margin" Value="0,0,10,8" />
|
||||
<Setter Property="BorderBrush" Value="#202938" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="PreviewItemTitleStyle"
|
||||
BasedOn="{StaticResource BasePreviewItemTitleStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#6a7181" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="PreviewItemSubTitleStyle"
|
||||
BasedOn="{StaticResource BasePreviewItemSubTitleStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#5f6673" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="PreviewGlyph"
|
||||
BasedOn="{StaticResource BasePreviewGlyph}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#6a7181" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
<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}"
|
||||
|
|
@ -34,6 +35,14 @@
|
|||
<Setter Property="BorderThickness" Value="1" />
|
||||
<Setter Property="Background" Value="#2e3440" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="SeparatorStyle"
|
||||
BasedOn="{StaticResource BaseSeparatorStyle}"
|
||||
TargetType="{x:Type Rectangle}">
|
||||
<Setter Property="Fill" Value="#4c566a" />
|
||||
<Setter Property="Height" Value="1" />
|
||||
<Setter Property="Margin" Value="12,0,12,8" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="WindowStyle"
|
||||
BasedOn="{StaticResource BaseWindowStyle}"
|
||||
|
|
@ -128,4 +137,28 @@
|
|||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#6F7C95" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="PreviewBorderStyle"
|
||||
BasedOn="{StaticResource BasePreviewBorderStyle}"
|
||||
TargetType="{x:Type Border}">
|
||||
<Setter Property="BorderBrush" Value="#4e586b" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="PreviewItemTitleStyle"
|
||||
BasedOn="{StaticResource BasePreviewItemTitleStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#e5e9f0" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="PreviewItemSubTitleStyle"
|
||||
BasedOn="{StaticResource BasePreviewItemSubTitleStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#606c83" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="PreviewGlyph"
|
||||
BasedOn="{StaticResource BasePreviewGlyph}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#ffffff" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
<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}"
|
||||
|
|
@ -33,6 +34,14 @@
|
|||
<Setter Property="BorderThickness" Value="2" />
|
||||
<Setter Property="BorderBrush" Value="#000000" />
|
||||
</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" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="WindowStyle"
|
||||
BasedOn="{StaticResource BaseWindowStyle}"
|
||||
|
|
@ -125,4 +134,28 @@
|
|||
<Setter Property="FontWeight" Value="Bold" />
|
||||
<Setter Property="Foreground" Value="#71114b" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="PreviewBorderStyle"
|
||||
BasedOn="{StaticResource BasePreviewBorderStyle}"
|
||||
TargetType="{x:Type Border}">
|
||||
<Setter Property="BorderBrush" Value="#000000" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="PreviewItemTitleStyle"
|
||||
BasedOn="{StaticResource BasePreviewItemTitleStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#f5f5f5" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="PreviewItemSubTitleStyle"
|
||||
BasedOn="{StaticResource BasePreviewItemSubTitleStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#c2c2c2" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="PreviewGlyph"
|
||||
BasedOn="{StaticResource BasePreviewGlyph}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#ffffff" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
|
|
@ -5,6 +5,7 @@
|
|||
<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}"
|
||||
|
|
@ -163,4 +164,28 @@
|
|||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#5bafb0" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="PreviewBorderStyle"
|
||||
BasedOn="{StaticResource BasePreviewBorderStyle}"
|
||||
TargetType="{x:Type Border}">
|
||||
<Setter Property="BorderBrush" Value="#3c454e" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="PreviewItemTitleStyle"
|
||||
BasedOn="{StaticResource BasePreviewItemTitleStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#5989b2" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="PreviewItemSubTitleStyle"
|
||||
BasedOn="{StaticResource BasePreviewItemSubTitleStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#7b858f" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="PreviewGlyph"
|
||||
BasedOn="{StaticResource BasePreviewGlyph}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#5bafb0" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
|
|
|
|||
|
|
@ -169,7 +169,7 @@
|
|||
</Style>
|
||||
<CornerRadius x:Key="ItemRadius">0</CornerRadius>
|
||||
<Thickness x:Key="ItemMargin">0 0 0 0</Thickness>
|
||||
<Thickness x:Key="ResultMargin">0 0 0 0</Thickness>
|
||||
<Thickness x:Key="ResultMargin">0 0 0 8</Thickness>
|
||||
<Style
|
||||
x:Key="ClockPanel"
|
||||
BasedOn="{StaticResource ClockPanel}"
|
||||
|
|
@ -188,4 +188,28 @@
|
|||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#c2c2c2" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="PreviewBorderStyle"
|
||||
BasedOn="{StaticResource BasePreviewBorderStyle}"
|
||||
TargetType="{x:Type Border}">
|
||||
<Setter Property="BorderBrush" Value="#3b3b3b" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="PreviewItemTitleStyle"
|
||||
BasedOn="{StaticResource BasePreviewItemTitleStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#c2c2c2" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="PreviewItemSubTitleStyle"
|
||||
BasedOn="{StaticResource BasePreviewItemSubTitleStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#7e7e7e" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="PreviewGlyph"
|
||||
BasedOn="{StaticResource BasePreviewGlyph}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#fa7941" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
|
|
@ -5,6 +5,7 @@
|
|||
<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}"
|
||||
|
|
@ -142,7 +143,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,4" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="SearchIconStyle"
|
||||
|
|
@ -165,4 +166,28 @@
|
|||
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>
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
<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}"
|
||||
|
|
@ -167,4 +168,28 @@
|
|||
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>
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
<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}"
|
||||
|
|
@ -181,4 +182,28 @@
|
|||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#acacac" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="PreviewBorderStyle"
|
||||
BasedOn="{StaticResource BasePreviewBorderStyle}"
|
||||
TargetType="{x:Type Border}">
|
||||
<Setter Property="BorderBrush" Value="#eaeaea" />
|
||||
</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>
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
<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}"
|
||||
|
|
@ -173,4 +174,30 @@
|
|||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="{DynamicResource HotkeyForeground}" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="PreviewBorderStyle"
|
||||
BasedOn="{StaticResource BasePreviewBorderStyle}"
|
||||
TargetType="{x:Type Border}">
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource SeparatorForeground}" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="PreviewItemTitleStyle"
|
||||
BasedOn="{StaticResource BasePreviewItemTitleStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<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}" />
|
||||
<Setter Property="FontSize" Value="13" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="PreviewGlyph"
|
||||
BasedOn="{StaticResource BasePreviewGlyph}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="{DynamicResource Color05B}" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ namespace Flow.Launcher.ViewModel
|
|||
{
|
||||
get
|
||||
{
|
||||
if (_image == ImageLoader.DefaultImage)
|
||||
if (_image == ImageLoader.MissingImage)
|
||||
LoadIconAsync();
|
||||
|
||||
return _image;
|
||||
|
|
@ -69,7 +69,7 @@ namespace Flow.Launcher.ViewModel
|
|||
? new Control()
|
||||
: settingProvider.CreateSettingPanel()
|
||||
: null;
|
||||
private ImageSource _image = ImageLoader.DefaultImage;
|
||||
private ImageSource _image = ImageLoader.MissingImage;
|
||||
|
||||
public Visibility ActionKeywordsVisibility => PluginPair.Metadata.ActionKeywords.Count == 1 ? Visibility.Visible : Visibility.Collapsed;
|
||||
public string InitilizaTime => PluginPair.Metadata.InitTime + "ms";
|
||||
|
|
|
|||
|
|
@ -19,47 +19,49 @@ namespace Flow.Launcher.ViewModel
|
|||
|
||||
public ResultViewModel(Result result, Settings settings)
|
||||
{
|
||||
if (result != null)
|
||||
Settings = settings;
|
||||
|
||||
if (result == null)
|
||||
{
|
||||
Result = result;
|
||||
return;
|
||||
}
|
||||
Result = result;
|
||||
|
||||
if (Result.Glyph is { FontFamily: not null } glyph)
|
||||
if (Result.Glyph is { FontFamily: not null } glyph)
|
||||
{
|
||||
// Checks if it's a system installed font, which does not require path to be provided.
|
||||
if (glyph.FontFamily.EndsWith(".ttf") || glyph.FontFamily.EndsWith(".otf"))
|
||||
{
|
||||
// Checks if it's a system installed font, which does not require path to be provided.
|
||||
if (glyph.FontFamily.EndsWith(".ttf") || glyph.FontFamily.EndsWith(".otf"))
|
||||
string fontFamilyPath = glyph.FontFamily;
|
||||
|
||||
if (!Path.IsPathRooted(fontFamilyPath))
|
||||
{
|
||||
string fontFamilyPath = glyph.FontFamily;
|
||||
fontFamilyPath = Path.Combine(Result.PluginDirectory, fontFamilyPath);
|
||||
}
|
||||
|
||||
if (!Path.IsPathRooted(fontFamilyPath))
|
||||
if (fonts.ContainsKey(fontFamilyPath))
|
||||
{
|
||||
Glyph = glyph with
|
||||
{
|
||||
fontFamilyPath = Path.Combine(Result.PluginDirectory, fontFamilyPath);
|
||||
}
|
||||
|
||||
if (fonts.ContainsKey(fontFamilyPath))
|
||||
{
|
||||
Glyph = glyph with
|
||||
{
|
||||
FontFamily = fonts[fontFamilyPath]
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
fontCollection.AddFontFile(fontFamilyPath);
|
||||
fonts[fontFamilyPath] = $"{Path.GetDirectoryName(fontFamilyPath)}/#{fontCollection.Families[^1].Name}";
|
||||
Glyph = glyph with
|
||||
{
|
||||
FontFamily = fonts[fontFamilyPath]
|
||||
};
|
||||
}
|
||||
FontFamily = fonts[fontFamilyPath]
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
Glyph = glyph;
|
||||
fontCollection.AddFontFile(fontFamilyPath);
|
||||
fonts[fontFamilyPath] = $"{Path.GetDirectoryName(fontFamilyPath)}/#{fontCollection.Families[^1].Name}";
|
||||
Glyph = glyph with
|
||||
{
|
||||
FontFamily = fonts[fontFamilyPath]
|
||||
};
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Glyph = glyph;
|
||||
}
|
||||
}
|
||||
|
||||
Settings = settings;
|
||||
}
|
||||
|
||||
private Settings Settings { get; }
|
||||
|
|
@ -67,6 +69,10 @@ namespace Flow.Launcher.ViewModel
|
|||
public Visibility ShowOpenResultHotkey =>
|
||||
Settings.ShowOpenResultHotkey ? Visibility.Visible : Visibility.Collapsed;
|
||||
|
||||
public Visibility ShowDefaultPreview => Result.PreviewPanel == null ? Visibility.Visible : Visibility.Collapsed;
|
||||
|
||||
public Visibility ShowCustomizedPreview => Result.PreviewPanel == null ? Visibility.Collapsed : Visibility.Visible;
|
||||
|
||||
public Visibility ShowIcon
|
||||
{
|
||||
get
|
||||
|
|
@ -106,7 +112,7 @@ namespace Flow.Launcher.ViewModel
|
|||
if (!Settings.UseGlyphIcons && !ImgIconAvailable && GlyphAvailable)
|
||||
return Visibility.Visible;
|
||||
|
||||
return Settings.UseGlyphIcons && GlyphAvailable ? Visibility.Visible : Visibility.Hidden;
|
||||
return Settings.UseGlyphIcons && GlyphAvailable ? Visibility.Visible : Visibility.Collapsed;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -125,8 +131,10 @@ namespace Flow.Launcher.ViewModel
|
|||
: Result.SubTitleToolTip;
|
||||
|
||||
private volatile bool ImageLoaded;
|
||||
private volatile bool PreviewImageLoaded;
|
||||
|
||||
private ImageSource image = ImageLoader.DefaultImage;
|
||||
private ImageSource image = ImageLoader.LoadingImage;
|
||||
private ImageSource previewImage = ImageLoader.LoadingImage;
|
||||
|
||||
public ImageSource Image
|
||||
{
|
||||
|
|
@ -143,37 +151,76 @@ namespace Flow.Launcher.ViewModel
|
|||
private set => image = value;
|
||||
}
|
||||
|
||||
public ImageSource PreviewImage
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!PreviewImageLoaded)
|
||||
{
|
||||
PreviewImageLoaded = true;
|
||||
_ = LoadPreviewImageAsync();
|
||||
}
|
||||
|
||||
return previewImage;
|
||||
}
|
||||
private set => previewImage = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Determines if to use the full width of the preview panel
|
||||
/// </summary>
|
||||
public bool UseBigThumbnail => Result.Preview.IsMedia;
|
||||
|
||||
public GlyphInfo Glyph { get; set; }
|
||||
|
||||
private async Task LoadImageAsync()
|
||||
private async Task<ImageSource> LoadImageInternalAsync(string imagePath, Result.IconDelegate icon, bool loadFullImage)
|
||||
{
|
||||
var imagePath = Result.IcoPath;
|
||||
if (string.IsNullOrEmpty(imagePath) && Result.Icon != null)
|
||||
if (string.IsNullOrEmpty(imagePath) && icon != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
image = Result.Icon();
|
||||
return;
|
||||
var image = await Task.Run(() => icon()).ConfigureAwait(false);
|
||||
return image;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.Exception(
|
||||
$"|ResultViewModel.Image|IcoPath is empty and exception when calling Icon() for result <{Result.Title}> of plugin <{Result.PluginDirectory}>",
|
||||
$"|ResultViewModel.LoadImageInternalAsync|IcoPath is empty and exception when calling IconDelegate for result <{Result.Title}> of plugin <{Result.PluginDirectory}>",
|
||||
e);
|
||||
}
|
||||
}
|
||||
|
||||
var loadFullImage = (Path.GetExtension(imagePath) ?? "").Equals(".url", StringComparison.OrdinalIgnoreCase);
|
||||
return await ImageLoader.LoadAsync(imagePath, loadFullImage).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
if (ImageLoader.CacheContainImage(imagePath))
|
||||
private async Task LoadImageAsync()
|
||||
{
|
||||
var imagePath = Result.IcoPath;
|
||||
var iconDelegate = Result.Icon;
|
||||
if (ImageLoader.CacheContainImage(imagePath, false))
|
||||
{
|
||||
// will get here either when icoPath has value\icon delegate is null\when had exception in delegate
|
||||
image = await ImageLoader.LoadAsync(imagePath, loadFullImage);
|
||||
return;
|
||||
image = await LoadImageInternalAsync(imagePath, iconDelegate, false).ConfigureAwait(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
// We need to modify the property not field here to trigger the OnPropertyChanged event
|
||||
Image = await LoadImageInternalAsync(imagePath, iconDelegate, false).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
|
||||
// We need to modify the property not field here to trigger the OnPropertyChanged event
|
||||
Image = await ImageLoader.LoadAsync(imagePath, loadFullImage).ConfigureAwait(false);
|
||||
private async Task LoadPreviewImageAsync()
|
||||
{
|
||||
var imagePath = string.IsNullOrEmpty(Result.Preview.PreviewImagePath) ? Result.IcoPath : Result.Preview.PreviewImagePath;
|
||||
var iconDelegate = Result.Icon;
|
||||
if (ImageLoader.CacheContainImage(imagePath, true))
|
||||
{
|
||||
previewImage = await LoadImageInternalAsync(imagePath, iconDelegate, true).ConfigureAwait(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
// We need to modify the property not field here to trigger the OnPropertyChanged event
|
||||
PreviewImage = await LoadImageInternalAsync(imagePath, iconDelegate, true).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
|
||||
public Result Result { get; }
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ using Flow.Launcher.Infrastructure;
|
|||
using Flow.Launcher.Plugin.SharedCommands;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
|
@ -207,11 +206,17 @@ namespace Flow.Launcher.Plugin.Explorer.Search
|
|||
|
||||
internal static Result CreateFileResult(string filePath, Query query, int score = 0, bool windowsIndexed = false)
|
||||
{
|
||||
Result.PreviewInfo preview = IsMedia(Path.GetExtension(filePath)) ? new Result.PreviewInfo {
|
||||
IsMedia = true,
|
||||
PreviewImagePath = filePath,
|
||||
} : Result.PreviewInfo.Default;
|
||||
|
||||
var result = new Result
|
||||
{
|
||||
Title = Path.GetFileName(filePath),
|
||||
SubTitle = Path.GetDirectoryName(filePath),
|
||||
IcoPath = filePath,
|
||||
Preview = preview,
|
||||
AutoCompleteText = GetPathWithActionKeyword(filePath, ResultType.File),
|
||||
TitleHighlightData = StringMatcher.FuzzySearch(query.Search, Path.GetFileName(filePath)).MatchData,
|
||||
Score = score,
|
||||
|
|
@ -266,6 +271,20 @@ namespace Flow.Launcher.Plugin.Explorer.Search
|
|||
};
|
||||
return result;
|
||||
}
|
||||
|
||||
public static bool IsMedia(string extension)
|
||||
{
|
||||
if (string.IsNullOrEmpty(extension))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
return MediaExtensions.Contains(extension.ToLowerInvariant());
|
||||
}
|
||||
}
|
||||
|
||||
public static readonly string[] MediaExtensions = { ".jpg", ".png", ".avi", ".mkv", ".bmp", ".gif", ".wmv", ".mp3", ".flac", ".mp4" };
|
||||
}
|
||||
|
||||
public enum ResultType
|
||||
|
|
|
|||
|
|
@ -96,8 +96,9 @@ namespace Flow.Launcher.Plugin.Program.Programs
|
|||
var visualElement = appNode.SelectSingleNode($"*[local-name()='VisualElements']", namespaceManager);
|
||||
var logoUri = visualElement?.Attributes[logoName]?.Value;
|
||||
app.LogoPath = app.LogoPathFromUri(logoUri, (64, 64));
|
||||
var previewUri = visualElement?.Attributes[bigLogoName]?.Value;
|
||||
app.PreviewImagePath = app.LogoPathFromUri(previewUri, (128, 128));
|
||||
// use small logo or may have a big margin
|
||||
var previewUri = visualElement?.Attributes[logoName]?.Value;
|
||||
app.PreviewImagePath = app.LogoPathFromUri(previewUri, (256, 256));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -405,6 +406,12 @@ namespace Flow.Launcher.Plugin.Program.Programs
|
|||
Title = title,
|
||||
SubTitle = Main._settings.HideAppsPath ? string.Empty : Location,
|
||||
IcoPath = LogoPath,
|
||||
Preview = new Result.PreviewInfo
|
||||
{
|
||||
IsMedia = false,
|
||||
PreviewImagePath = PreviewImagePath,
|
||||
Description = Description
|
||||
},
|
||||
Score = matchResult.Score,
|
||||
TitleHighlightData = matchResult.MatchData,
|
||||
ContextData = this,
|
||||
|
|
@ -549,6 +556,7 @@ namespace Flow.Launcher.Plugin.Program.Programs
|
|||
// select like logo.[xxx_yyy].png
|
||||
// https://learn.microsoft.com/en-us/windows/uwp/app-resources/tailor-resources-lang-scale-contrast
|
||||
|
||||
// todo select from file name like pt run
|
||||
var selected = logos.FirstOrDefault();
|
||||
var closest = selected;
|
||||
int min = int.MaxValue;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
|
|
@ -192,4 +192,4 @@ namespace Flow.Launcher.Plugin.WebSearch
|
|||
|
||||
public event ResultUpdatedEventHandler ResultsUpdated;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue