mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Merge branch 'dev' into PopupRedesign
This commit is contained in:
commit
de095eff68
81 changed files with 2799 additions and 943 deletions
|
|
@ -10,35 +10,31 @@ namespace Flow.Launcher.Core.Plugin
|
|||
public static Query Build(string text, Dictionary<string, PluginPair> nonGlobalPlugins)
|
||||
{
|
||||
// replace multiple white spaces with one white space
|
||||
var terms = text.Split(new[] { Query.TermSeperater }, StringSplitOptions.RemoveEmptyEntries);
|
||||
var terms = text.Split(Query.TermSeparator, StringSplitOptions.RemoveEmptyEntries);
|
||||
if (terms.Length == 0)
|
||||
{ // nothing was typed
|
||||
return null;
|
||||
}
|
||||
|
||||
var rawQuery = string.Join(Query.TermSeperater, terms);
|
||||
var rawQuery = string.Join(Query.TermSeparator, terms);
|
||||
string actionKeyword, search;
|
||||
string possibleActionKeyword = terms[0];
|
||||
List<string> actionParameters;
|
||||
string[] searchTerms;
|
||||
|
||||
if (nonGlobalPlugins.TryGetValue(possibleActionKeyword, out var pluginPair) && !pluginPair.Metadata.Disabled)
|
||||
{ // use non global plugin for query
|
||||
actionKeyword = possibleActionKeyword;
|
||||
actionParameters = terms.Skip(1).ToList();
|
||||
search = actionParameters.Count > 0 ? rawQuery.Substring(actionKeyword.Length + 1) : string.Empty;
|
||||
search = terms.Length > 1 ? rawQuery[(actionKeyword.Length + 1)..] : string.Empty;
|
||||
searchTerms = terms[1..];
|
||||
}
|
||||
else
|
||||
{ // non action keyword
|
||||
actionKeyword = string.Empty;
|
||||
search = rawQuery;
|
||||
searchTerms = terms;
|
||||
}
|
||||
|
||||
var query = new Query
|
||||
{
|
||||
Terms = terms,
|
||||
RawQuery = rawQuery,
|
||||
ActionKeyword = actionKeyword,
|
||||
Search = search
|
||||
};
|
||||
var query = new Query(rawQuery, search,terms, searchTerms, actionKeyword);
|
||||
|
||||
return query;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -145,11 +145,9 @@ namespace Flow.Launcher.Core.Resource
|
|||
public ResourceDictionary GetResourceDictionary()
|
||||
{
|
||||
var dict = CurrentThemeResourceDictionary();
|
||||
|
||||
Style queryBoxStyle = dict["QueryBoxStyle"] as Style;
|
||||
Style querySuggestionBoxStyle = dict["QuerySuggestionBoxStyle"] as Style;
|
||||
|
||||
if (queryBoxStyle != null && querySuggestionBoxStyle != null)
|
||||
|
||||
if (dict["QueryBoxStyle"] is Style queryBoxStyle &&
|
||||
dict["QuerySuggestionBoxStyle"] is Style querySuggestionBoxStyle)
|
||||
{
|
||||
var fontFamily = new FontFamily(Settings.QueryBoxFont);
|
||||
var fontStyle = FontHelper.GetFontStyleFromInvariantStringOrNormal(Settings.QueryBoxFontStyle);
|
||||
|
|
@ -174,11 +172,12 @@ namespace Flow.Launcher.Core.Resource
|
|||
querySuggestionBoxStyle.Setters.Add(new Setter(TextBox.FontStretchProperty, fontStretch));
|
||||
}
|
||||
|
||||
Style resultItemStyle = dict["ItemTitleStyle"] as Style;
|
||||
Style resultSubItemStyle = dict["ItemSubTitleStyle"] as Style;
|
||||
Style resultItemSelectedStyle = dict["ItemTitleSelectedStyle"] as Style;
|
||||
Style resultSubItemSelectedStyle = dict["ItemSubTitleSelectedStyle"] as Style;
|
||||
if (resultItemStyle != null && resultSubItemStyle != null && resultSubItemSelectedStyle != null && resultItemSelectedStyle != null)
|
||||
if (dict["ItemTitleStyle"] is Style resultItemStyle &&
|
||||
dict["ItemSubTitleStyle"] is Style resultSubItemStyle &&
|
||||
dict["ItemSubTitleSelectedStyle"] is Style resultSubItemSelectedStyle &&
|
||||
dict["ItemTitleSelectedStyle"] is Style resultItemSelectedStyle &&
|
||||
dict["ItemHotkeyStyle"] is Style resultHotkeyItemStyle &&
|
||||
dict["ItemHotkeySelectedStyle"] is Style resultHotkeyItemSelectedStyle)
|
||||
{
|
||||
Setter fontFamily = new Setter(TextBlock.FontFamilyProperty, new FontFamily(Settings.ResultFont));
|
||||
Setter fontStyle = new Setter(TextBlock.FontStyleProperty, FontHelper.GetFontStyleFromInvariantStringOrNormal(Settings.ResultFontStyle));
|
||||
|
|
@ -186,7 +185,9 @@ namespace Flow.Launcher.Core.Resource
|
|||
Setter fontStretch = new Setter(TextBlock.FontStretchProperty, FontHelper.GetFontStretchFromInvariantStringOrNormal(Settings.ResultFontStretch));
|
||||
|
||||
Setter[] setters = { fontFamily, fontStyle, fontWeight, fontStretch };
|
||||
Array.ForEach(new[] { resultItemStyle, resultSubItemStyle, resultItemSelectedStyle, resultSubItemSelectedStyle }, o => Array.ForEach(setters, p => o.Setters.Add(p)));
|
||||
Array.ForEach(
|
||||
new[] { resultItemStyle, resultSubItemStyle, resultItemSelectedStyle, resultSubItemSelectedStyle, resultHotkeyItemStyle, resultHotkeyItemSelectedStyle }, o
|
||||
=> Array.ForEach(setters, p => o.Setters.Add(p)));
|
||||
}
|
||||
|
||||
var windowStyle = dict["WindowStyle"] as Style;
|
||||
|
|
@ -236,17 +237,19 @@ namespace Flow.Launcher.Core.Resource
|
|||
|
||||
public void AddDropShadowEffectToCurrentTheme()
|
||||
{
|
||||
var dict = CurrentThemeResourceDictionary();
|
||||
var dict = GetResourceDictionary();
|
||||
|
||||
var windowBorderStyle = dict["WindowBorderStyle"] as Style;
|
||||
|
||||
var effectSetter = new Setter();
|
||||
effectSetter.Property = Border.EffectProperty;
|
||||
effectSetter.Value = new DropShadowEffect
|
||||
var effectSetter = new Setter
|
||||
{
|
||||
Opacity = 0.9,
|
||||
ShadowDepth = 2,
|
||||
BlurRadius = 15
|
||||
Property = Border.EffectProperty,
|
||||
Value = new DropShadowEffect
|
||||
{
|
||||
Opacity = 0.4,
|
||||
ShadowDepth = 2,
|
||||
BlurRadius = 15
|
||||
}
|
||||
};
|
||||
|
||||
var marginSetter = windowBorderStyle.Setters.FirstOrDefault(setterBase => setterBase is Setter setter && setter.Property == Border.MarginProperty) as Setter;
|
||||
|
|
@ -261,7 +264,7 @@ namespace Flow.Launcher.Core.Resource
|
|||
}
|
||||
else
|
||||
{
|
||||
var baseMargin = (Thickness) marginSetter.Value;
|
||||
var baseMargin = (Thickness)marginSetter.Value;
|
||||
var newMargin = new Thickness(
|
||||
baseMargin.Left + ShadowExtraMargin,
|
||||
baseMargin.Top + ShadowExtraMargin,
|
||||
|
|
@ -282,8 +285,8 @@ namespace Flow.Launcher.Core.Resource
|
|||
|
||||
var effectSetter = windowBorderStyle.Setters.FirstOrDefault(setterBase => setterBase is Setter setter && setter.Property == Border.EffectProperty) as Setter;
|
||||
var marginSetter = windowBorderStyle.Setters.FirstOrDefault(setterBase => setterBase is Setter setter && setter.Property == Border.MarginProperty) as Setter;
|
||||
|
||||
if(effectSetter != null)
|
||||
|
||||
if (effectSetter != null)
|
||||
{
|
||||
windowBorderStyle.Setters.Remove(effectSetter);
|
||||
}
|
||||
|
|
@ -371,11 +374,11 @@ namespace Flow.Launcher.Core.Resource
|
|||
private void SetWindowAccent(Window w, AccentState state)
|
||||
{
|
||||
var windowHelper = new WindowInteropHelper(w);
|
||||
|
||||
|
||||
// this determines the width of the main query window
|
||||
w.Width = mainWindowWidth;
|
||||
windowHelper.EnsureHandle();
|
||||
|
||||
|
||||
var accent = new AccentPolicy { AccentState = state };
|
||||
var accentStructSize = Marshal.SizeOf(accent);
|
||||
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ using Flow.Launcher.Infrastructure.Logger;
|
|||
using Flow.Launcher.Infrastructure.UserSettings;
|
||||
using Flow.Launcher.Plugin;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Threading;
|
||||
|
||||
namespace Flow.Launcher.Core
|
||||
{
|
||||
|
|
@ -28,21 +29,21 @@ namespace Flow.Launcher.Core
|
|||
GitHubRepository = gitHubRepository;
|
||||
}
|
||||
|
||||
public async Task UpdateApp(IPublicAPI api, bool silentUpdate = true)
|
||||
private SemaphoreSlim UpdateLock { get; } = new SemaphoreSlim(1);
|
||||
|
||||
public async Task UpdateAppAsync(IPublicAPI api, bool silentUpdate = true)
|
||||
{
|
||||
await UpdateLock.WaitAsync();
|
||||
try
|
||||
{
|
||||
UpdateInfo newUpdateInfo;
|
||||
|
||||
if (!silentUpdate)
|
||||
api.ShowMsg(api.GetTranslation("pleaseWait"),
|
||||
api.GetTranslation("update_flowlauncher_update_check"));
|
||||
api.GetTranslation("update_flowlauncher_update_check"));
|
||||
|
||||
using var updateManager = await GitHubUpdateManager(GitHubRepository).ConfigureAwait(false);
|
||||
|
||||
|
||||
// UpdateApp CheckForUpdate will return value only if the app is squirrel installed
|
||||
newUpdateInfo = await updateManager.CheckForUpdate().NonNull().ConfigureAwait(false);
|
||||
var newUpdateInfo = await updateManager.CheckForUpdate().NonNull().ConfigureAwait(false);
|
||||
|
||||
var newReleaseVersion = Version.Parse(newUpdateInfo.FutureReleaseEntry.Version.ToString());
|
||||
var currentVersion = Version.Parse(Constant.Version);
|
||||
|
|
@ -58,7 +59,7 @@ namespace Flow.Launcher.Core
|
|||
|
||||
if (!silentUpdate)
|
||||
api.ShowMsg(api.GetTranslation("update_flowlauncher_update_found"),
|
||||
api.GetTranslation("update_flowlauncher_updating"));
|
||||
api.GetTranslation("update_flowlauncher_updating"));
|
||||
|
||||
await updateManager.DownloadReleases(newUpdateInfo.ReleasesToApply).ConfigureAwait(false);
|
||||
|
||||
|
|
@ -70,8 +71,8 @@ namespace Flow.Launcher.Core
|
|||
FilesFolders.CopyAll(DataLocation.PortableDataPath, targetDestination);
|
||||
if (!FilesFolders.VerifyBothFolderFilesEqual(DataLocation.PortableDataPath, targetDestination))
|
||||
MessageBox.Show(string.Format(api.GetTranslation("update_flowlauncher_fail_moving_portable_user_profile_data"),
|
||||
DataLocation.PortableDataPath,
|
||||
targetDestination));
|
||||
DataLocation.PortableDataPath,
|
||||
targetDestination));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -87,12 +88,15 @@ namespace Flow.Launcher.Core
|
|||
UpdateManager.RestartApp(Constant.ApplicationFileName);
|
||||
}
|
||||
}
|
||||
catch (Exception e) when (e is HttpRequestException || e is WebException || e is SocketException || e.InnerException is TimeoutException)
|
||||
catch (Exception e) when (e is HttpRequestException or WebException or SocketException || e.InnerException is TimeoutException)
|
||||
{
|
||||
Log.Exception($"|Updater.UpdateApp|Check your connection and proxy settings to github-cloud.s3.amazonaws.com.", e);
|
||||
api.ShowMsg(api.GetTranslation("update_flowlauncher_fail"),
|
||||
api.GetTranslation("update_flowlauncher_check_connection"));
|
||||
return;
|
||||
api.GetTranslation("update_flowlauncher_check_connection"));
|
||||
}
|
||||
finally
|
||||
{
|
||||
UpdateLock.Release();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -115,13 +119,16 @@ namespace Flow.Launcher.Core
|
|||
var uri = new Uri(repository);
|
||||
var api = $"https://api.github.com/repos{uri.AbsolutePath}/releases";
|
||||
|
||||
var jsonStream = await Http.GetStreamAsync(api).ConfigureAwait(false);
|
||||
await using var jsonStream = await Http.GetStreamAsync(api).ConfigureAwait(false);
|
||||
|
||||
var releases = await System.Text.Json.JsonSerializer.DeserializeAsync<List<GithubRelease>>(jsonStream).ConfigureAwait(false);
|
||||
var latest = releases.Where(r => !r.Prerelease).OrderByDescending(r => r.PublishedAt).First();
|
||||
var latestUrl = latest.HtmlUrl.Replace("/tag/", "/download/");
|
||||
|
||||
var client = new WebClient { Proxy = Http.WebProxy };
|
||||
|
||||
var client = new WebClient
|
||||
{
|
||||
Proxy = Http.WebProxy
|
||||
};
|
||||
var downloader = new FileDownloader(client);
|
||||
|
||||
var manager = new UpdateManager(latestUrl, urlDownloader: downloader);
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ namespace Flow.Launcher.Infrastructure.UserSettings
|
|||
public string ResultFontStyle { get; set; }
|
||||
public string ResultFontWeight { get; set; }
|
||||
public string ResultFontStretch { get; set; }
|
||||
public bool UseGlyphIcons { get; set; } = true;
|
||||
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using JetBrains.Annotations;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
|
|
@ -11,11 +12,12 @@ namespace Flow.Launcher.Plugin
|
|||
/// <summary>
|
||||
/// to allow unit tests for plug ins
|
||||
/// </summary>
|
||||
public Query(string rawQuery, string search, string[] terms, string actionKeyword = "")
|
||||
public Query(string rawQuery, string search, string[] terms, string[] searchTerms, string actionKeyword = "")
|
||||
{
|
||||
Search = search;
|
||||
RawQuery = rawQuery;
|
||||
Terms = terms;
|
||||
SearchTerms = searchTerms;
|
||||
ActionKeyword = actionKeyword;
|
||||
}
|
||||
|
||||
|
|
@ -23,7 +25,7 @@ namespace Flow.Launcher.Plugin
|
|||
/// Raw query, this includes action keyword if it has
|
||||
/// We didn't recommend use this property directly. You should always use Search property.
|
||||
/// </summary>
|
||||
public string RawQuery { get; internal set; }
|
||||
public string RawQuery { get; internal init; }
|
||||
|
||||
/// <summary>
|
||||
/// Search part of a query.
|
||||
|
|
@ -31,45 +33,53 @@ namespace Flow.Launcher.Plugin
|
|||
/// Since we allow user to switch a exclusive plugin to generic plugin,
|
||||
/// so this property will always give you the "real" query part of the query
|
||||
/// </summary>
|
||||
public string Search { get; internal set; }
|
||||
public string Search { get; internal init; }
|
||||
|
||||
/// <summary>
|
||||
/// The raw query splited into a string array.
|
||||
/// The search string split into a string array.
|
||||
/// </summary>
|
||||
public string[] Terms { get; set; }
|
||||
public string[] SearchTerms { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// The raw query split into a string array
|
||||
/// </summary>
|
||||
[Obsolete("It may or may not include action keyword, which can be confusing. Use SearchTerms instead")]
|
||||
public string[] Terms { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Query can be splited into multiple terms by whitespace
|
||||
/// </summary>
|
||||
public const string TermSeperater = " ";
|
||||
public const string TermSeparator = " ";
|
||||
|
||||
[Obsolete("Typo")]
|
||||
public const string TermSeperater = TermSeparator;
|
||||
/// <summary>
|
||||
/// User can set multiple action keywords seperated by ';'
|
||||
/// </summary>
|
||||
public const string ActionKeywordSeperater = ";";
|
||||
public const string ActionKeywordSeparator = ";";
|
||||
|
||||
[Obsolete("Typo")]
|
||||
public const string ActionKeywordSeperater = ActionKeywordSeparator;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// '*' is used for System Plugin
|
||||
/// </summary>
|
||||
public const string GlobalPluginWildcardSign = "*";
|
||||
|
||||
public string ActionKeyword { get; set; }
|
||||
public string ActionKeyword { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Return first search split by space if it has
|
||||
/// </summary>
|
||||
public string FirstSearch => SplitSearch(0);
|
||||
|
||||
private string _secondToEndSearch;
|
||||
|
||||
/// <summary>
|
||||
/// strings from second search (including) to last search
|
||||
/// </summary>
|
||||
public string SecondToEndSearch
|
||||
{
|
||||
get
|
||||
{
|
||||
var index = string.IsNullOrEmpty(ActionKeyword) ? 1 : 2;
|
||||
return string.Join(TermSeperater, Terms.Skip(index).ToArray());
|
||||
}
|
||||
}
|
||||
public string SecondToEndSearch => SearchTerms.Length > 1 ? (_secondToEndSearch ??= string.Join(' ', SearchTerms[1..])) : "";
|
||||
|
||||
/// <summary>
|
||||
/// Return second search split by space if it has
|
||||
|
|
@ -83,16 +93,9 @@ namespace Flow.Launcher.Plugin
|
|||
|
||||
private string SplitSearch(int index)
|
||||
{
|
||||
try
|
||||
{
|
||||
return string.IsNullOrEmpty(ActionKeyword) ? Terms[index] : Terms[index + 1];
|
||||
}
|
||||
catch (IndexOutOfRangeException)
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
return index < SearchTerms.Length ? SearchTerms[index] : string.Empty;
|
||||
}
|
||||
|
||||
public override string ToString() => RawQuery;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -30,7 +30,7 @@ namespace Flow.Launcher
|
|||
|
||||
private void ActionKeyword_OnLoaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
tbOldActionKeyword.Text = string.Join(Query.ActionKeywordSeperater, plugin.Metadata.ActionKeywords.ToArray());
|
||||
tbOldActionKeyword.Text = string.Join(Query.ActionKeywordSeparator, plugin.Metadata.ActionKeywords.ToArray());
|
||||
tbAction.Focus();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -129,12 +129,12 @@ namespace Flow.Launcher
|
|||
var timer = new Timer(1000 * 60 * 60 * 5);
|
||||
timer.Elapsed += async (s, e) =>
|
||||
{
|
||||
await _updater.UpdateApp(API);
|
||||
await _updater.UpdateAppAsync(API);
|
||||
};
|
||||
timer.Start();
|
||||
|
||||
// check updates on startup
|
||||
await _updater.UpdateApp(API);
|
||||
await _updater.UpdateAppAsync(API);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
57
Flow.Launcher/Converters/BorderClipConverter.cs
Normal file
57
Flow.Launcher/Converters/BorderClipConverter.cs
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
// For Clipping inside listbox item
|
||||
|
||||
namespace Flow.Launcher.Converters
|
||||
{
|
||||
public class BorderClipConverter : IMultiValueConverter
|
||||
{
|
||||
public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
if (values.Length == 3 && values[0] is double && values[1] is double && values[2] is CornerRadius)
|
||||
{
|
||||
var width = (double)values[0];
|
||||
var height = (double)values[1];
|
||||
Path myPath = new Path();
|
||||
if (width < Double.Epsilon || height < Double.Epsilon)
|
||||
{
|
||||
return Geometry.Empty;
|
||||
}
|
||||
var radius = (CornerRadius)values[2];
|
||||
var radiusHeight = radius.TopLeft;
|
||||
|
||||
// Drawing Round box for bottom round, and rect for top area of listbox.
|
||||
var corner = new RectangleGeometry(new Rect(0, 0, width, height), radius.TopLeft, radius.TopLeft);
|
||||
var box = new RectangleGeometry(new Rect(0, 0, width, radiusHeight), 0, 0);
|
||||
|
||||
GeometryGroup myGeometryGroup = new GeometryGroup();
|
||||
myGeometryGroup.Children.Add(corner);
|
||||
myGeometryGroup.Children.Add(box);
|
||||
|
||||
CombinedGeometry c1 = new CombinedGeometry(GeometryCombineMode.Union, corner, box);
|
||||
myPath.Data = c1;
|
||||
|
||||
myPath.Data.Freeze();
|
||||
return myPath.Data;
|
||||
}
|
||||
|
||||
return DependencyProperty.UnsetValue;
|
||||
}
|
||||
|
||||
public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -6,6 +6,7 @@ using System.Text;
|
|||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Documents;
|
||||
|
||||
namespace Flow.Launcher.Converters
|
||||
|
|
@ -30,7 +31,9 @@ namespace Flow.Launcher.Converters
|
|||
var currentCharacter = text.Substring(i, 1);
|
||||
if (this.ShouldHighlight(highlightData, i))
|
||||
{
|
||||
textBlock.Inlines.Add(new Bold(new Run(currentCharacter)));
|
||||
|
||||
textBlock.Inlines.Add(new Run(currentCharacter) { Style = (Style)Application.Current.FindResource("HighlightStyle") });
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -16,12 +16,10 @@ namespace Flow.Launcher.Converters
|
|||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
var hotkeyNumber = int.MaxValue;
|
||||
|
||||
if (value is ListBoxItem listBoxItem)
|
||||
{
|
||||
ListBox listBox = ItemsControl.ItemsControlFromItemContainer(listBoxItem) as ListBox;
|
||||
|
||||
if (value is ListBoxItem listBoxItem
|
||||
&& ItemsControl.ItemsControlFromItemContainer(listBoxItem) is ListBox listBox)
|
||||
hotkeyNumber = listBox.ItemContainerGenerator.IndexFromContainer(listBoxItem) + 1;
|
||||
}
|
||||
|
||||
return hotkeyNumber <= MaxVisibleHotkeys ? Visibility.Visible : Visibility.Collapsed;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,11 +8,9 @@ namespace Flow.Launcher.Converters
|
|||
{
|
||||
public object Convert(object value, System.Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
if (value is ListBoxItem listBoxItem)
|
||||
{
|
||||
ListBox listBox = ItemsControl.ItemsControlFromItemContainer(listBoxItem) as ListBox;
|
||||
if (value is ListBoxItem listBoxItem
|
||||
&& ItemsControl.ItemsControlFromItemContainer(listBoxItem) is ListBox listBox)
|
||||
return listBox.ItemContainerGenerator.IndexFromContainer(listBoxItem) + 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -77,6 +77,9 @@
|
|||
<SubType>Designer</SubType>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Resources\Segoe Fluent Icons.ttf">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@ using NHotkey.Wpf;
|
|||
using Flow.Launcher.Core.Resource;
|
||||
using System.Windows;
|
||||
using Flow.Launcher.ViewModel;
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading;
|
||||
|
||||
namespace Flow.Launcher.Helper
|
||||
{
|
||||
|
|
@ -19,10 +21,15 @@ namespace Flow.Launcher.Helper
|
|||
mainViewModel = mainVM;
|
||||
settings = mainViewModel._settings;
|
||||
|
||||
SetHotkey(settings.Hotkey, OnHotkey);
|
||||
SetHotkey(settings.Hotkey, OnToggleHotkey);
|
||||
LoadCustomPluginHotkey();
|
||||
}
|
||||
|
||||
internal static void OnToggleHotkey(object sender, HotkeyEventArgs args)
|
||||
{
|
||||
mainViewModel.ToggleFlowLauncher();
|
||||
}
|
||||
|
||||
private static void SetHotkey(string hotkeyStr, EventHandler<HotkeyEventArgs> action)
|
||||
{
|
||||
var hotkey = new HotkeyModel(hotkeyStr);
|
||||
|
|
@ -53,44 +60,6 @@ namespace Flow.Launcher.Helper
|
|||
}
|
||||
}
|
||||
|
||||
internal static void OnHotkey(object sender, HotkeyEventArgs e)
|
||||
{
|
||||
if (!ShouldIgnoreHotkeys())
|
||||
{
|
||||
UpdateLastQUeryMode();
|
||||
|
||||
mainViewModel.ToggleFlowLauncher();
|
||||
e.Handled = true;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Checks if Flow Launcher should ignore any hotkeys
|
||||
/// </summary>
|
||||
private static bool ShouldIgnoreHotkeys()
|
||||
{
|
||||
return settings.IgnoreHotkeysOnFullscreen && WindowsInteropHelper.IsWindowFullscreen();
|
||||
}
|
||||
|
||||
private static void UpdateLastQUeryMode()
|
||||
{
|
||||
switch(settings.LastQueryMode)
|
||||
{
|
||||
case LastQueryMode.Empty:
|
||||
mainViewModel.ChangeQueryText(string.Empty);
|
||||
break;
|
||||
case LastQueryMode.Preserved:
|
||||
mainViewModel.LastQuerySelected = true;
|
||||
break;
|
||||
case LastQueryMode.Selected:
|
||||
mainViewModel.LastQuerySelected = false;
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentException($"wrong LastQueryMode: <{settings.LastQueryMode}>");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
internal static void LoadCustomPluginHotkey()
|
||||
{
|
||||
if (settings.CustomPluginHotkeys == null)
|
||||
|
|
@ -106,11 +75,11 @@ namespace Flow.Launcher.Helper
|
|||
{
|
||||
SetHotkey(hotkey.Hotkey, (s, e) =>
|
||||
{
|
||||
if (ShouldIgnoreHotkeys())
|
||||
if (mainViewModel.ShouldIgnoreHotkeys())
|
||||
return;
|
||||
|
||||
mainViewModel.MainWindowVisibility = Visibility.Visible;
|
||||
mainViewModel.ChangeQueryText(hotkey.ActionKeyword);
|
||||
mainViewModel.ChangeQueryText(hotkey.ActionKeyword, true);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,11 +9,11 @@
|
|||
d:DesignHeight="300" d:DesignWidth="300">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="150" />
|
||||
<ColumnDefinition Width="125" />
|
||||
<ColumnDefinition Width="160" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBox x:Name="tbHotkey" TabIndex="100" VerticalContentAlignment="Center" Grid.Column="0"
|
||||
PreviewKeyDown="TbHotkey_OnPreviewKeyDown" input:InputMethod.IsInputMethodEnabled="False"/>
|
||||
<TextBlock x:Name="tbMsg" Visibility="Hidden" Margin="5 0 0 0" VerticalAlignment="Center" Grid.Column="1" />
|
||||
<TextBlock x:Name="tbMsg" Visibility="Hidden" Margin="8 0 0 0" VerticalAlignment="Center" Grid.Column="0" HorizontalAlignment="Right"/>
|
||||
<TextBox x:Name="tbHotkey" TabIndex="100" VerticalContentAlignment="Center" Grid.Column="1"
|
||||
PreviewKeyDown="TbHotkey_OnPreviewKeyDown" input:InputMethod.IsInputMethodEnabled="False" Margin="5 0 18 0"/>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
|
@ -38,7 +38,7 @@
|
|||
<system:String x:Key="hideNotifyIcon">Hide tray icon</system:String>
|
||||
<system:String x:Key="querySearchPrecision">Query Search Precision</system:String>
|
||||
<system:String x:Key="ShouldUsePinyin">Should Use Pinyin</system:String>
|
||||
<system:String x:Key="ShouldUsePinyinToolTip">Allows using Pinyin to search. Pinyin is the standard system of romanized spelling for transliterating Chinese</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="shadowEffectNotAllowed">Shadow effect is not allowed while current theme has blur effect enabled</system:String>
|
||||
|
||||
<!--Setting Plugin-->
|
||||
|
|
@ -81,8 +81,9 @@
|
|||
<system:String x:Key="pleaseSelectAnItem">Please select an item</system:String>
|
||||
<system:String x:Key="deleteCustomHotkeyWarning">Are you sure you want to delete {0} plugin hotkey?</system:String>
|
||||
<system:String x:Key="queryWindowShadowEffect">Query window shadow effect</system:String>
|
||||
<system:String x:Key="shadowEffectCPUUsage">Shadow effect has a substantial usage of GPU.</system:String>
|
||||
<system:String x:Key="shadowEffectPerformance">Not recommended if your computer performance is limited.</system:String>
|
||||
<system:String x:Key="shadowEffectCPUUsage">Shadow effect has a substantial usage of GPU. Not recommended if your computer performance is limited.</system:String>
|
||||
<system:String x:Key="useGlyphUI">Use Segoe Fluent Icons</system:String>
|
||||
<system:String x:Key="useGlyphUIEffect">Use Segoe Fluent Icons for query results where supported</system:String>
|
||||
|
||||
<!--Setting Proxy-->
|
||||
<system:String x:Key="proxy">HTTP Proxy</system:String>
|
||||
|
|
|
|||
|
|
@ -81,8 +81,9 @@
|
|||
<system:String x:Key="pleaseSelectAnItem">Vyberte položku, prosím</system:String>
|
||||
<system:String x:Key="deleteCustomHotkeyWarning">Ste si istý, že chcete odstrániť klávesovú skratku {0} pre plugin?</system:String>
|
||||
<system:String x:Key="queryWindowShadowEffect">Tieňový efekt v poli vyhľadávania</system:String>
|
||||
<system:String x:Key="shadowEffectCPUUsage">Tieňový efekt významne využíva GPU.</system:String>
|
||||
<system:String x:Key="shadowEffectPerformance">Neodporúča sa, ak je výkon počítača obmedzený.</system:String>
|
||||
<system:String x:Key="shadowEffectCPUUsage">Tieňový efekt významne využíva GPU. Neodporúča sa, ak je výkon počítača obmedzený.</system:String>
|
||||
<system:String x:Key="useGlyphUI">Použiť ikony Segoe Fluent</system:String>
|
||||
<system:String x:Key="useGlyphUIEffect">Použiť ikony Segoe Fluent, ak sú podporované</system:String>
|
||||
|
||||
<!--Setting Proxy-->
|
||||
<system:String x:Key="proxy">HTTP Proxy</system:String>
|
||||
|
|
@ -179,4 +180,4 @@
|
|||
<system:String x:Key="update_flowlauncher_update_files">Aktualizovať súbory</system:String>
|
||||
<system:String x:Key="update_flowlauncher_update_upadte_description">Aktualizovať popis</system:String>
|
||||
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary>
|
||||
|
|
|
|||
|
|
@ -76,8 +76,7 @@
|
|||
<system:String x:Key="pleaseSelectAnItem">请选择一项</system:String>
|
||||
<system:String x:Key="deleteCustomHotkeyWarning">你确定要删除插件 {0} 的热键吗?</system:String>
|
||||
<system:String x:Key="queryWindowShadowEffect">查询窗口阴影效果</system:String>
|
||||
<system:String x:Key="shadowEffectCPUUsage">阴影效果将占用大量的GPU资源。</system:String>
|
||||
<system:String x:Key="shadowEffectPerformance">如果您的计算机性能有限,则不建议使用。</system:String>
|
||||
<system:String x:Key="shadowEffectCPUUsage">阴影效果将占用大量的GPU资源。 如果您的计算机性能有限,则不建议使用。</system:String>
|
||||
|
||||
<!--设置,代理-->
|
||||
<system:String x:Key="proxy">HTTP 代理</system:String>
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@
|
|||
d:DataContext="{d:DesignInstance vm:MainViewModel}">
|
||||
<Window.Resources>
|
||||
<converters:QuerySuggestionBoxConverter x:Key="QuerySuggestionBoxConverter"/>
|
||||
<converters:BorderClipConverter x:Key="BorderClipConverter"/>
|
||||
</Window.Resources>
|
||||
<Window.InputBindings>
|
||||
<KeyBinding Key="Escape" Command="{Binding EscCommand}"></KeyBinding>
|
||||
|
|
@ -45,6 +46,8 @@
|
|||
<KeyBinding Key="U" Modifiers="Ctrl" Command="{Binding SelectPrevPageCommand}"></KeyBinding>
|
||||
<KeyBinding Key="Home" Modifiers="Alt" Command="{Binding SelectFirstResultCommand}"></KeyBinding>
|
||||
<KeyBinding Key="O" Modifiers="Ctrl" Command="{Binding LoadContextMenuCommand}"></KeyBinding>
|
||||
<KeyBinding Key="Right" Command="{Binding LoadContextMenuCommand}"></KeyBinding>
|
||||
<KeyBinding Key="Left" Command="{Binding EscCommand}"></KeyBinding>
|
||||
<KeyBinding Key="H" Modifiers="Ctrl" Command="{Binding LoadHistoryCommand}"></KeyBinding>
|
||||
<KeyBinding Key="Enter" Modifiers="Ctrl+Shift" Command="{Binding OpenResultCommand}"></KeyBinding>
|
||||
<KeyBinding Key="Enter" Modifiers="Shift" Command="{Binding LoadContextMenuCommand}"></KeyBinding>
|
||||
|
|
@ -62,13 +65,12 @@
|
|||
<KeyBinding Key="D9" Modifiers="{Binding OpenResultCommandModifiers}" Command="{Binding OpenResultCommand}" CommandParameter="8"></KeyBinding>
|
||||
</Window.InputBindings>
|
||||
<Grid>
|
||||
<Border Style="{DynamicResource WindowBorderStyle}" MouseDown="OnMouseDown" CornerRadius="5" >
|
||||
<Border Style="{DynamicResource WindowBorderStyle}" MouseDown="OnMouseDown">
|
||||
<StackPanel Orientation="Vertical">
|
||||
<Grid>
|
||||
<TextBox x:Name="QueryTextSuggestionBox"
|
||||
Style="{DynamicResource QuerySuggestionBoxStyle}"
|
||||
IsEnabled="False"
|
||||
Margin="18,0,56,0">
|
||||
IsEnabled="False">
|
||||
<TextBox.Text>
|
||||
<MultiBinding Converter="{StaticResource QuerySuggestionBoxConverter}">
|
||||
<Binding ElementName="QueryTextBox" Path="Text"/>
|
||||
|
|
@ -82,34 +84,67 @@
|
|||
PreviewDragOver="OnPreviewDragOver"
|
||||
AllowDrop="True"
|
||||
Visibility="Visible"
|
||||
Background="Transparent"
|
||||
Margin="18,0,56,0">
|
||||
Background="Transparent">
|
||||
<TextBox.ContextMenu>
|
||||
<ContextMenu>
|
||||
<MenuItem Command="ApplicationCommands.Cut"/>
|
||||
<MenuItem Command="ApplicationCommands.Copy"/>
|
||||
<MenuItem Command="ApplicationCommands.Paste"/>
|
||||
<Separator />
|
||||
<MenuItem Header="Settings" Click="OnContextMenusForSettingsClick" />
|
||||
<MenuItem Header="{DynamicResource flowlauncher_settings}" Click="OnContextMenusForSettingsClick" />
|
||||
<MenuItem Command="{Binding EscCommand}" Header="Close"/>
|
||||
</ContextMenu>
|
||||
</TextBox.ContextMenu>
|
||||
</TextBox>
|
||||
<svgc:SvgControl Source="{Binding Image}" HorizontalAlignment="Right" Width="42" Height="42"
|
||||
Background="Transparent"/>
|
||||
<Canvas Style="{DynamicResource SearchIconPosition}">
|
||||
<Path Data="{DynamicResource SearchIconImg}" Style="{DynamicResource SearchIconStyle}" Margin="0" Stretch="Fill"/>
|
||||
</Canvas>
|
||||
</Grid>
|
||||
<Line x:Name="ProgressBar" HorizontalAlignment="Right"
|
||||
|
||||
<Grid ClipToBounds="True">
|
||||
<Rectangle Width="Auto" HorizontalAlignment="Stretch" Style="{DynamicResource SeparatorStyle}" />
|
||||
<Line x:Name="ProgressBar" HorizontalAlignment="Right"
|
||||
Style="{DynamicResource PendingLineStyle}" Visibility="{Binding ProgressBarVisibility, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
Y1="0" Y2="0" X2="100" Height="2" Width="752" StrokeThickness="1">
|
||||
</Line>
|
||||
<ContentControl>
|
||||
<flowlauncher:ResultListBox x:Name="ResultListBox" DataContext="{Binding Results}" PreviewMouseDown="OnPreviewMouseButtonDown" />
|
||||
</ContentControl>
|
||||
<ContentControl>
|
||||
<flowlauncher:ResultListBox DataContext="{Binding ContextMenu}" PreviewMouseDown="OnPreviewMouseButtonDown" />
|
||||
</ContentControl>
|
||||
<ContentControl>
|
||||
<flowlauncher:ResultListBox DataContext="{Binding History}" PreviewMouseDown="OnPreviewMouseButtonDown" />
|
||||
</ContentControl>
|
||||
Y1="0" Y2="0" X1="-150" X2="-50" Height="2" Width="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Grid}},Path=ActualWidth}" StrokeThickness="1">
|
||||
</Line>
|
||||
</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}" PreviewMouseDown="OnPreviewMouseButtonDown" />
|
||||
</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 DataContext="{Binding ContextMenu}" PreviewMouseDown="OnPreviewMouseButtonDown" x:Name="ContextMenu"/>
|
||||
</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 DataContext="{Binding History}" PreviewMouseDown="OnPreviewMouseButtonDown" x:Name="History"/>
|
||||
</ContentControl>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</Grid>
|
||||
|
|
|
|||
|
|
@ -207,9 +207,9 @@ namespace Flow.Launcher
|
|||
|
||||
private void InitProgressbarAnimation()
|
||||
{
|
||||
var da = new DoubleAnimation(ProgressBar.X2, ActualWidth + 100,
|
||||
var da = new DoubleAnimation(ProgressBar.X2, ActualWidth + 150,
|
||||
new Duration(new TimeSpan(0, 0, 0, 0, 1600)));
|
||||
var da1 = new DoubleAnimation(ProgressBar.X1, ActualWidth, new Duration(new TimeSpan(0, 0, 0, 0, 1600)));
|
||||
var da1 = new DoubleAnimation(ProgressBar.X1, ActualWidth + 50, new Duration(new TimeSpan(0, 0, 0, 0, 1600)));
|
||||
Storyboard.SetTargetProperty(da, new PropertyPath("(Line.X2)"));
|
||||
Storyboard.SetTargetProperty(da1, new PropertyPath("(Line.X1)"));
|
||||
_progressBarStoryboard.Children.Add(da);
|
||||
|
|
@ -262,7 +262,7 @@ namespace Flow.Launcher
|
|||
{
|
||||
if (_settings.HideWhenDeactive)
|
||||
{
|
||||
Hide();
|
||||
_viewModel.Hide();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -313,25 +313,43 @@ namespace Flow.Launcher
|
|||
/// </summary>
|
||||
private void OnKeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (e.Key == Key.Down)
|
||||
switch (e.Key)
|
||||
{
|
||||
_viewModel.SelectNextItemCommand.Execute(null);
|
||||
e.Handled = true;
|
||||
}
|
||||
else if (e.Key == Key.Up)
|
||||
{
|
||||
_viewModel.SelectPrevItemCommand.Execute(null);
|
||||
e.Handled = true;
|
||||
}
|
||||
else if (e.Key == Key.PageDown)
|
||||
{
|
||||
_viewModel.SelectNextPageCommand.Execute(null);
|
||||
e.Handled = true;
|
||||
}
|
||||
else if (e.Key == Key.PageUp)
|
||||
{
|
||||
_viewModel.SelectPrevPageCommand.Execute(null);
|
||||
e.Handled = true;
|
||||
case Key.Down:
|
||||
_viewModel.SelectNextItemCommand.Execute(null);
|
||||
e.Handled = true;
|
||||
break;
|
||||
case Key.Up:
|
||||
_viewModel.SelectPrevItemCommand.Execute(null);
|
||||
e.Handled = true;
|
||||
break;
|
||||
case Key.PageDown:
|
||||
_viewModel.SelectNextPageCommand.Execute(null);
|
||||
e.Handled = true;
|
||||
break;
|
||||
case Key.PageUp:
|
||||
_viewModel.SelectPrevPageCommand.Execute(null);
|
||||
e.Handled = true;
|
||||
break;
|
||||
case Key.Right:
|
||||
if (_viewModel.SelectedIsFromQueryResults()
|
||||
&& QueryTextBox.CaretIndex == QueryTextBox.Text.Length
|
||||
&& !string.IsNullOrEmpty(QueryTextBox.Text))
|
||||
{
|
||||
_viewModel.LoadContextMenuCommand.Execute(null);
|
||||
e.Handled = true;
|
||||
}
|
||||
break;
|
||||
case Key.Left:
|
||||
if (!_viewModel.SelectedIsFromQueryResults() && QueryTextBox.CaretIndex == 0)
|
||||
{
|
||||
_viewModel.EscCommand.Execute(null);
|
||||
e.Handled = true;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -48,12 +48,7 @@ namespace Flow.Launcher
|
|||
|
||||
public void ChangeQuery(string query, bool requery = false)
|
||||
{
|
||||
_mainVM.ChangeQueryText(query);
|
||||
}
|
||||
|
||||
public void ChangeQueryText(string query, bool selectAll = false)
|
||||
{
|
||||
_mainVM.ChangeQueryText(query);
|
||||
_mainVM.ChangeQueryText(query, requery);
|
||||
}
|
||||
|
||||
public void RestartApp()
|
||||
|
|
|
|||
BIN
Flow.Launcher/Resources/Segoe Fluent Icons.ttf
Normal file
BIN
Flow.Launcher/Resources/Segoe Fluent Icons.ttf
Normal file
Binary file not shown.
|
|
@ -20,6 +20,7 @@
|
|||
IsSynchronizedWithCurrentItem="True"
|
||||
PreviewMouseDown="ListBox_PreviewMouseDown">
|
||||
<!--IsSynchronizedWithCurrentItem: http://stackoverflow.com/a/7833798/2833083-->
|
||||
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Button>
|
||||
|
|
@ -29,7 +30,7 @@
|
|||
</ControlTemplate>
|
||||
</Button.Template>
|
||||
<Button.Content>
|
||||
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="5"
|
||||
<Grid HorizontalAlignment="Left" VerticalAlignment="Stretch" Margin="0"
|
||||
Cursor="Hand" UseLayoutRounding="False">
|
||||
<Grid.Resources>
|
||||
<converter:HighlightTextConverter x:Key="HighlightTextConverter"/>
|
||||
|
|
@ -37,33 +38,35 @@
|
|||
<converter:OpenResultHotkeyVisibilityConverter x:Key="OpenResultHotkeyVisibilityConverter" />
|
||||
</Grid.Resources>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="32" />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition Width="0" />
|
||||
<ColumnDefinition Width="60" />
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image x:Name="ImageIcon" Width="32" Height="32" HorizontalAlignment="Left"
|
||||
Source="{Binding Image}" Visibility="{Binding ShowIcon}" />
|
||||
<TextBlock Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Center"
|
||||
Text="{Binding Glyph.Glyph}" FontFamily="{Binding Glyph.FontFamily}" FontSize="24"
|
||||
Visibility="{Binding ShowGlyph}"/>
|
||||
<Grid Margin="5 0 5 0" Grid.Column="1" HorizontalAlignment="Stretch">
|
||||
<StackPanel Visibility="{Binding ShowOpenResultHotkey}" Grid.Column="2" Margin="0 0 10 0">
|
||||
<TextBlock Margin="12 0 12 0" Style="{DynamicResource ItemHotkeyStyle}" HorizontalAlignment="Right" Opacity="0.8" VerticalAlignment="Center" Padding="0 10 0 10" x:Name="Hotkey">
|
||||
<TextBlock.Visibility>
|
||||
<Binding RelativeSource="{RelativeSource Mode=FindAncestor, AncestorType=ListBoxItem}" Converter="{StaticResource ResourceKey=OpenResultHotkeyVisibilityConverter}" />
|
||||
</TextBlock.Visibility>
|
||||
<TextBlock.Text>
|
||||
<MultiBinding StringFormat="{}{0}+{1}">
|
||||
<Binding Path="OpenResultModifiers" />
|
||||
<Binding RelativeSource="{RelativeSource Mode=FindAncestor, AncestorType=ListBoxItem}" Converter="{StaticResource ResourceKey=OrdinalConverter}" />
|
||||
</MultiBinding>
|
||||
</TextBlock.Text>
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
<Border BorderThickness="0" BorderBrush="Transparent" Margin="9 0 0 0">
|
||||
<Image x:Name="ImageIcon" Width="32" Height="32" HorizontalAlignment="Center" Source="{Binding Image}" Visibility="{Binding ShowIcon}" Margin="0 0 0 0" Stretch="UniformToFill"/>
|
||||
</Border>
|
||||
<Border BorderThickness="0" BorderBrush="Transparent" Margin="9 0 0 0">
|
||||
<TextBlock Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Center" Text="{Binding Glyph.Glyph}" FontFamily="{Binding Glyph.FontFamily}" Visibility="{Binding ShowGlyph}" Style="{DynamicResource ItemGlyph}"/>
|
||||
</Border>
|
||||
<Grid Margin="6 0 10 0" Grid.Column="1" HorizontalAlignment="Stretch">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition Height="Auto" x:Name="SubTitleRowDefinition" />
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Visibility="{Binding ShowOpenResultHotkey}">
|
||||
<TextBlock Margin="0 5 5 0" Style="{DynamicResource ItemSubTitleStyle}" HorizontalAlignment="Right" Opacity="0.8" >
|
||||
<TextBlock.Visibility>
|
||||
<Binding RelativeSource="{RelativeSource Mode=FindAncestor, AncestorType=ListBoxItem}" Converter="{StaticResource ResourceKey=OpenResultHotkeyVisibilityConverter}" />
|
||||
</TextBlock.Visibility>
|
||||
<TextBlock.Text>
|
||||
<MultiBinding StringFormat="{}{0}+{1}">
|
||||
<Binding Path="OpenResultModifiers" />
|
||||
<Binding RelativeSource="{RelativeSource Mode=FindAncestor, AncestorType=ListBoxItem}" Converter="{StaticResource ResourceKey=OrdinalConverter}" />
|
||||
</MultiBinding>
|
||||
</TextBlock.Text>
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
|
||||
<TextBlock Style="{DynamicResource ItemTitleStyle}" DockPanel.Dock="Left"
|
||||
VerticalAlignment="Center" ToolTip="{Binding ShowTitleToolTip}" x:Name="Title"
|
||||
Text="{Binding Result.Title}">
|
||||
|
|
@ -83,17 +86,20 @@
|
|||
</MultiBinding>
|
||||
</vm:ResultsViewModel.FormattedText>
|
||||
</TextBlock>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
</Button.Content>
|
||||
</Button>
|
||||
<!-- a result item height is 50 including margin -->
|
||||
<!-- a result item height is 52 including margin -->
|
||||
<DataTemplate.Triggers>
|
||||
<DataTrigger
|
||||
Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type ListBoxItem}}, Path=IsSelected}"
|
||||
Value="True">
|
||||
<Setter TargetName="Title" Property="Style" Value="{DynamicResource ItemTitleSelectedStyle}" />
|
||||
<Setter TargetName="SubTitle" Property="Style" Value="{DynamicResource ItemSubTitleSelectedStyle}" />
|
||||
<Setter TargetName="Hotkey" Property="Style" Value="{DynamicResource ItemHotkeySelectedStyle}" />
|
||||
<Setter TargetName="ImageIcon" Property="Style" Value="{DynamicResource ItemImageSelectedStyle}" />
|
||||
</DataTrigger>
|
||||
</DataTemplate.Triggers>
|
||||
|
|
@ -104,7 +110,7 @@
|
|||
<Style TargetType="{x:Type ListBoxItem}">
|
||||
<EventSetter Event="MouseEnter" Handler="OnMouseEnter" />
|
||||
<EventSetter Event="MouseMove" Handler="OnMouseMove" />
|
||||
<Setter Property="Height" Value="50" />
|
||||
<Setter Property="Height" Value="52" />
|
||||
<Setter Property="Margin" Value="0" />
|
||||
<Setter Property="Padding" Value="0" />
|
||||
<Setter Property="BorderThickness" Value="0" />
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -23,6 +23,7 @@ namespace Flow.Launcher
|
|||
public readonly IPublicAPI API;
|
||||
private Settings settings;
|
||||
private SettingWindowViewModel viewModel;
|
||||
private static MainViewModel mainViewModel;
|
||||
|
||||
public SettingWindow(IPublicAPI api, SettingWindowViewModel viewModel)
|
||||
{
|
||||
|
|
@ -126,7 +127,7 @@ namespace Flow.Launcher
|
|||
if (HotkeyControl.CurrentHotkeyAvailable)
|
||||
{
|
||||
|
||||
HotKeyMapper.SetHotkey(HotkeyControl.CurrentHotkey, HotKeyMapper.OnHotkey);
|
||||
HotKeyMapper.SetHotkey(HotkeyControl.CurrentHotkey, HotKeyMapper.OnToggleHotkey);
|
||||
HotKeyMapper.RemoveHotkey(settings.Hotkey);
|
||||
settings.Hotkey = HotkeyControl.CurrentHotkey.ToString();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,12 +6,15 @@
|
|||
<Style x:Key="BaseQueryBoxStyle" TargetType="{x:Type TextBox}">
|
||||
<Setter Property="BorderThickness" Value="0" />
|
||||
<Setter Property="FontSize" Value="28" />
|
||||
<Setter Property="FontWeight" Value="Normal" />
|
||||
<Setter Property="Height" Value="46" />
|
||||
<Setter Property="FontWeight" Value="Regular" />
|
||||
<Setter Property="Margin" Value="16 7 0 7" />
|
||||
<Setter Property="Padding" Value="0 4 68 0" />
|
||||
<Setter Property="Background" Value="#2F2F2F" />
|
||||
<Setter Property="Height" Value="48" />
|
||||
<Setter Property="Foreground" Value="#E3E0E3" />
|
||||
<Setter Property="CaretBrush" Value="#E3E0E3" />
|
||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch" />
|
||||
<Setter Property="Stylus.IsFlicksEnabled" Value="False" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
|
|
@ -36,24 +39,34 @@
|
|||
<!-- Further font customisations are dynamically loaded in Theme.cs -->
|
||||
<Style x:Key="BaseQuerySuggestionBoxStyle" BasedOn="{StaticResource BaseQueryBoxStyle}" TargetType="{x:Type TextBox}">
|
||||
<Setter Property="Foreground" Value="DarkGray" />
|
||||
<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="HorizontalAlignment" Value="Stretch" />
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
</Style>
|
||||
|
||||
|
||||
<Style x:Key="BaseWindowBorderStyle" TargetType="{x:Type Border}">
|
||||
<Setter Property="BorderThickness" Value="0" />
|
||||
<Setter Property="CornerRadius" Value="0" />
|
||||
<Setter Property="Background" Value="#2F2F2F"></Setter>
|
||||
<Setter Property="Padding" Value="8 10 8 8" />
|
||||
<Setter Property="Padding" Value="0 0 0 0" />
|
||||
<Setter Property="CornerRadius" Value="5" />
|
||||
</Style>
|
||||
<Style x:Key="BaseWindowStyle" TargetType="{x:Type Window}">
|
||||
<Setter Property="Width" Value="750" />
|
||||
<Setter Property="RenderOptions.ClearTypeHint" Value="Enabled"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="WindowRadius" TargetType="{x:Type Border}">
|
||||
<Setter Property="CornerRadius" Value="5" />
|
||||
</Style>
|
||||
|
||||
<Style x:Key="BasePendingLineStyle" TargetType="{x:Type Line}">
|
||||
<Setter Property="Stroke" Value="Blue" />
|
||||
</Style>
|
||||
|
||||
|
||||
<!-- Item Style -->
|
||||
<Style x:Key="BaseItemTitleStyle" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#FFFFF8" />
|
||||
|
|
@ -64,6 +77,13 @@
|
|||
<Style x:Key="BaseItemSubTitleStyle" TargetType="{x:Type TextBlock}" >
|
||||
<Setter Property="Foreground" Value="#D9D9D4" />
|
||||
<Setter Property="RenderOptions.ClearTypeHint" Value="Enabled"/>
|
||||
<Setter Property="FontSize" Value="13" />
|
||||
<Setter Property="FontWeight" Value="Normal" />
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding ElementName=SubTitle, UpdateSourceTrigger=PropertyChanged, Path=Text.Length}" Value="0">
|
||||
<Setter Property="Height" Value="0" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
<Style x:Key="BaseItemNumberStyle" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
|
|
@ -72,31 +92,58 @@
|
|||
<Setter Property="FontSize" Value="22" />
|
||||
<Setter Property="RenderOptions.ClearTypeHint" Value="Enabled"/>
|
||||
</Style>
|
||||
<Style x:Key="BaseGlyphStyle" 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>
|
||||
<Style x:Key="BaseItemTitleSelectedStyle" TargetType="{x:Type TextBlock}" >
|
||||
<Setter Property="Foreground" Value="#FFFFF8" />
|
||||
<Setter Property="FontSize" Value="16" />
|
||||
<Setter Property="FontWeight" Value="Medium" />
|
||||
<Setter Property="FontWeight" Value="Normal" />
|
||||
<Setter Property="RenderOptions.ClearTypeHint" Value="Enabled"/>
|
||||
</Style>
|
||||
<Style x:Key="BaseItemSubTitleSelectedStyle" TargetType="{x:Type TextBlock}" >
|
||||
<Setter Property="Foreground" Value="#D9D9D4" />
|
||||
<Setter Property="FontSize" Value="13" />
|
||||
<Setter Property="RenderOptions.ClearTypeHint" Value="Enabled"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding ElementName=SubTitle, UpdateSourceTrigger=PropertyChanged, Path=Text.Length}" Value="0">
|
||||
<Setter Property="Height" Value="0" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
<Style x:Key="BaseItemImageSelectedStyle" TargetType="{x:Type Image}" >
|
||||
</Style>
|
||||
|
||||
<SolidColorBrush x:Key="ItemSelectedBackgroundColor">#4D4D4D</SolidColorBrush>
|
||||
|
||||
<Style x:Key="BaseItemImageSelectedStyle" TargetType="{x:Type Image}" >
|
||||
</Style>
|
||||
|
||||
<Style x:Key="BaseListboxStyle" TargetType="{x:Type ListBox}">
|
||||
<Setter Property="BorderBrush" Value="Transparent"/>
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
|
||||
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
|
||||
<Setter Property="Margin" Value="0 0 0 0" />
|
||||
<Setter Property="Padding" Value="0 0 0 0" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="ListBox">
|
||||
<ScrollViewer Focusable="false" Template="{DynamicResource ScrollViewerControlTemplate}">
|
||||
<ScrollViewer.Style>
|
||||
<Style TargetType="ScrollViewer">
|
||||
<Style.Triggers>
|
||||
<Trigger Property="ComputedVerticalScrollBarVisibility" Value="Visible">
|
||||
<Setter Property="Margin" Value="0 0 0 0" />
|
||||
<Setter Property="Padding" Value="0 0 0 0" />
|
||||
</Trigger>
|
||||
<Trigger Property="ComputedVerticalScrollBarVisibility" Value="Collapsed">
|
||||
<Setter Property="Margin" Value="0 0 0 0" />
|
||||
<Setter Property="Padding" Value="0 0 0 0" />
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</ScrollViewer.Style>
|
||||
<VirtualizingStackPanel IsItemsHost="True" />
|
||||
</ScrollViewer>
|
||||
</ControlTemplate>
|
||||
|
|
@ -120,15 +167,16 @@
|
|||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||
Content="{TemplateBinding Content}"
|
||||
Grid.Column="0"
|
||||
Margin="{TemplateBinding Padding}"
|
||||
Margin="0"
|
||||
Grid.Row="0" />
|
||||
|
||||
<!--Scrollbar in thr rigth of ScrollViewer-->
|
||||
<ScrollBar x:Name="PART_VerticalScrollBar"
|
||||
AutomationProperties.AutomationId="VerticalScrollBar"
|
||||
Cursor="Arrow"
|
||||
Grid.Column="1"
|
||||
Margin="3 0 0 0"
|
||||
Grid.Column="0"
|
||||
HorizontalAlignment="Right"
|
||||
Margin="0 0 0 0"
|
||||
Maximum="{TemplateBinding ScrollableHeight}"
|
||||
Minimum="0"
|
||||
Grid.Row="0"
|
||||
|
|
@ -136,7 +184,6 @@
|
|||
Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}"
|
||||
ViewportSize="{TemplateBinding ViewportHeight}"
|
||||
Style="{DynamicResource ScrollBarStyle}" />
|
||||
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
|
||||
|
|
@ -149,7 +196,7 @@
|
|||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Thumb}">
|
||||
<Border CornerRadius="2" DockPanel.Dock="Right" Background="#616161" BorderBrush="Transparent" BorderThickness="0" />
|
||||
<Border CornerRadius="2" DockPanel.Dock="Right" Background="#898989" BorderBrush="Transparent" />
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
|
|
@ -158,6 +205,7 @@
|
|||
<Style x:Key="BaseScrollBarStyle" TargetType="{x:Type ScrollBar}">
|
||||
<Setter Property="Stylus.IsPressAndHoldEnabled" Value="false" />
|
||||
<Setter Property="Stylus.IsFlicksEnabled" Value="false" />
|
||||
<Setter Property="Background" Value="Black" />
|
||||
<!-- must set min width -->
|
||||
<Setter Property="MinWidth" Value="0"/>
|
||||
<Setter Property="Width" Value="5"/>
|
||||
|
|
@ -176,4 +224,72 @@
|
|||
</Setter>
|
||||
|
||||
</Style>
|
||||
<Style x:Key="BaseSeparatorStyle" TargetType="Rectangle">
|
||||
<Setter Property="Visibility" Value="Collapsed" />
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding ElementName=ResultListBox, Path=Visibility}" Value="Visible">
|
||||
<Setter Property="Visibility" Value="Visible" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding ElementName=ContextMenu, Path=Visibility}" Value="Visible">
|
||||
<Setter Property="Visibility" Value="Visible" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding ElementName=History, Path=Visibility}" Value="Visible">
|
||||
<Setter Property="Visibility" Value="Visible" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
<Style x:Key="HighlightStyle">
|
||||
<Setter Property="Inline.FontWeight" Value="Bold" />
|
||||
</Style>
|
||||
|
||||
<Style x:Key="BaseItemHotkeyStyle" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="FontSize" Value="15" />
|
||||
<Setter Property="Foreground" Value="#8f8f8f" />
|
||||
</Style>
|
||||
|
||||
<Style x:Key="BaseItemHotkeySelecetedStyle" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="FontSize" Value="15" />
|
||||
<Setter Property="Foreground" Value="#8f8f8f" />
|
||||
</Style>
|
||||
|
||||
|
||||
<Geometry x:Key="SearchIconImg">F1 M12000,12000z M0,0z M10354,10962C10326,10951 10279,10927 10249,10907 10216,10886 9476,10153 8370,9046 7366,8042 6541,7220 6536,7220 6532,7220 6498,7242 6461,7268 6213,7447 5883,7619 5592,7721 5194,7860 4802,7919 4360,7906 3612,7886 2953,7647 2340,7174 2131,7013 1832,6699 1664,6465 1394,6088 1188,5618 1097,5170 1044,4909 1030,4764 1030,4470 1030,4130 1056,3914 1135,3609 1263,3110 1511,2633 1850,2235 1936,2134 2162,1911 2260,1829 2781,1395 3422,1120 4090,1045 4271,1025 4667,1025 4848,1045 5505,1120 6100,1368 6630,1789 6774,1903 7081,2215 7186,2355 7362,2588 7467,2759 7579,2990 7802,3455 7911,3937 7911,4460 7911,4854 7861,5165 7737,5542 7684,5702 7675,5724 7602,5885 7517,6071 7390,6292 7270,6460 7242,6499 7220,6533 7220,6538 7220,6542 8046,7371 9055,8380 10441,9766 10898,10229 10924,10274 10945,10308 10966,10364 10976,10408 10990,10472 10991,10493 10980,10554 10952,10717 10840,10865 10690,10937 10621,10971 10607,10974 10510,10977 10425,10980 10395,10977 10354,10962z M4685,7050C5214,7001 5694,6809 6100,6484 6209,6396 6396,6209 6484,6100 7151,5267 7246,4110 6721,3190 6369,2571 5798,2137 5100,1956 4706,1855 4222,1855 3830,1957 3448,2056 3140,2210 2838,2453 2337,2855 2010,3427 1908,4080 1877,4274 1877,4656 1908,4850 1948,5105 2028,5370 2133,5590 2459,6272 3077,6782 3810,6973 3967,7014 4085,7034 4290,7053 4371,7061 4583,7059 4685,7050z</Geometry>
|
||||
|
||||
<Style x:Key="BaseSearchIconStyle" TargetType="{x:Type Path}">
|
||||
<Setter Property="Fill" Value="#555555" />
|
||||
<Setter Property="Width" Value="32" />
|
||||
<Setter Property="Height" Value="32" />
|
||||
</Style>
|
||||
<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="Background" Value="Transparent" />
|
||||
<Setter Property="HorizontalAlignment" Value="Right" />
|
||||
</Style>
|
||||
|
||||
<!--for classic themes-->
|
||||
<Style x:Key="SearchIconStyle" TargetType="{x:Type Path}">
|
||||
<Setter Property="Fill" Value="#555555" />
|
||||
<Setter Property="Width" Value="32" />
|
||||
<Setter Property="Height" Value="32" />
|
||||
</Style>
|
||||
<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="Background" Value="Transparent" />
|
||||
<Setter Property="HorizontalAlignment" Value="Right" />
|
||||
</Style>
|
||||
<Style x:Key="ItemHotkeyStyle" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource BaseItemHotkeyStyle}">
|
||||
<Setter Property="FontSize" Value="15" />
|
||||
<Setter Property="Foreground" Value="#8f8f8f" />
|
||||
<Setter Property="Opacity" Value="0.5" />
|
||||
</Style>
|
||||
<Style x:Key="ItemHotkeySelectedStyle" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource BaseItemHotkeySelecetedStyle}">
|
||||
<Setter Property="FontSize" Value="15" />
|
||||
<Setter Property="Foreground" Value="#8f8f8f" />
|
||||
<Setter Property="Opacity" Value="0.5" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
|
||||
|
|
@ -3,32 +3,51 @@
|
|||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="Base.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<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="Background" Value="#000000" />
|
||||
<Setter Property="Foreground" Value="#ffffff" />
|
||||
</Style>
|
||||
<Style x:Key="QuerySuggestionBoxStyle" BasedOn="{StaticResource BaseQuerySuggestionBoxStyle}" TargetType="{x:Type TextBox}">
|
||||
<Setter Property="Background" Value="#000000" />
|
||||
<Setter Property="Foreground" Value="#ffffff" />
|
||||
<Setter Property="Foreground" Value="#8f8f8f" />
|
||||
</Style>
|
||||
<Style x:Key="WindowBorderStyle" BasedOn="{StaticResource BaseWindowBorderStyle}" TargetType="{x:Type Border}">
|
||||
<Setter Property="CornerRadius" Value="4" />
|
||||
<Setter Property="BorderThickness" Value="1" />
|
||||
<Setter Property="BorderBrush" Value="#494949" />
|
||||
<Setter Property="Background" Value="#000000" />
|
||||
</Style>
|
||||
<Style x:Key="WindowStyle" TargetType="{x:Type Window}" BasedOn="{StaticResource BaseWindowStyle}" />
|
||||
<Style x:Key="PendingLineStyle" BasedOn="{StaticResource BasePendingLineStyle}" TargetType="{x:Type Line}" />
|
||||
<Style x:Key="PendingLineStyle" BasedOn="{StaticResource BasePendingLineStyle}" TargetType="{x:Type Line}">
|
||||
<Setter Property="Stroke" Value="White" />
|
||||
</Style>
|
||||
<Style x:Key="ItemTitleStyle" BasedOn="{StaticResource BaseItemTitleStyle}" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#FFFFF8" />
|
||||
</Style>
|
||||
<Style x:Key="ItemSubTitleStyle" BasedOn="{StaticResource BaseItemSubTitleStyle}" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#D9D9D4" />
|
||||
<Setter Property="Foreground" Value="#8f8f8f" />
|
||||
</Style>
|
||||
<Style x:Key="ItemTitleSelectedStyle" BasedOn="{StaticResource BaseItemTitleSelectedStyle}" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#FFFFF8" />
|
||||
</Style>
|
||||
<Style x:Key="ItemSubTitleSelectedStyle" BasedOn="{StaticResource BaseItemSubTitleSelectedStyle}" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#D9D9D4" />
|
||||
<Setter Property="Foreground" Value="#8f8f8f" />
|
||||
</Style>
|
||||
<SolidColorBrush x:Key="ItemSelectedBackgroundColor">#4F6180</SolidColorBrush>
|
||||
<SolidColorBrush x:Key="ItemSelectedBackgroundColor">#494949</SolidColorBrush>
|
||||
<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="HighlightStyle">
|
||||
<Setter Property="Inline.FontWeight" Value="Bold" />
|
||||
</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>
|
||||
</ResourceDictionary>
|
||||
|
|
@ -7,6 +7,9 @@
|
|||
|
||||
<system:Boolean x:Key="ThemeBlurEnabled">True</system:Boolean>
|
||||
|
||||
<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="Foreground" Value="#FFFFFFFF" />
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
|
|
@ -14,6 +17,7 @@
|
|||
|
||||
<Style x:Key="QuerySuggestionBoxStyle" BasedOn="{StaticResource BaseQuerySuggestionBoxStyle}" TargetType="{x:Type TextBox}">
|
||||
<Setter Property="Foreground" Value="LightGray" />
|
||||
<Setter Property="Opacity" Value="0.5" />
|
||||
</Style>
|
||||
|
||||
<Style x:Key="WindowBorderStyle" BasedOn="{StaticResource BaseWindowBorderStyle}" TargetType="{x:Type Border}">
|
||||
|
|
@ -27,12 +31,13 @@
|
|||
<Style x:Key="WindowStyle" BasedOn="{StaticResource BaseWindowStyle}" TargetType="{x:Type Window}">
|
||||
<Setter Property="Background">
|
||||
<Setter.Value>
|
||||
<SolidColorBrush Color="Black" Opacity="0.6"/>
|
||||
<SolidColorBrush Color="Black" Opacity="0.7"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="PendingLineStyle" BasedOn="{StaticResource BasePendingLineStyle}" TargetType="{x:Type Line}">
|
||||
<Setter Property="Stroke" Value="White" />
|
||||
</Style>
|
||||
|
||||
<!-- Item Style -->
|
||||
|
|
@ -42,6 +47,7 @@
|
|||
</Style>
|
||||
<Style x:Key="ItemSubTitleStyle" BasedOn="{StaticResource BaseItemSubTitleStyle}" TargetType="{x:Type TextBlock}" >
|
||||
<Setter Property="Foreground" Value="#FFFFFFFF"/>
|
||||
<Setter Property="Opacity" Value="0.5" />
|
||||
</Style>
|
||||
<Style x:Key="ItemTitleSelectedStyle" BasedOn="{StaticResource BaseItemTitleSelectedStyle}" TargetType="{x:Type TextBlock}" >
|
||||
<Setter Property="Margin" Value="0, -10"/>
|
||||
|
|
@ -49,14 +55,38 @@
|
|||
</Style>
|
||||
<Style x:Key="ItemSubTitleSelectedStyle" BasedOn="{StaticResource BaseItemSubTitleSelectedStyle}" TargetType="{x:Type TextBlock}" >
|
||||
<Setter Property="Foreground" Value="#FFFFFFFF"/>
|
||||
<Setter Property="Opacity" Value="0.5" />
|
||||
</Style>
|
||||
<SolidColorBrush x:Key="ItemSelectedBackgroundColor">#356ef3</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 CornerRadius="2" DockPanel.Dock="Right" Background="#FFFFFF" Opacity="0.5" BorderBrush="Transparent" BorderThickness="0" />
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ScrollBarStyle" BasedOn="{StaticResource BaseScrollBarStyle}" TargetType="{x:Type ScrollBar}">
|
||||
<Setter Property="Background" Value="#a0a0a0"/>
|
||||
</Style>
|
||||
<Style x:Key="SearchIconStyle" TargetType="{x:Type Path}" BasedOn="{StaticResource BaseSearchIconStyle}">
|
||||
<Setter Property="Fill" Value="#ffffff" />
|
||||
<Setter Property="Width" Value="32" />
|
||||
<Setter Property="Height" Value="32" />
|
||||
<Setter Property="Opacity" Value="0.2" />
|
||||
</Style>
|
||||
<Style x:Key="ItemHotkeyStyle" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="FontSize" Value="14" />
|
||||
<Setter Property="Foreground" Value="#ffffff" />
|
||||
<Setter Property="Opacity" Value="0.2" />
|
||||
</Style>
|
||||
<Style x:Key="ItemHotkeySelectedStyle" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="FontSize" Value="14" />
|
||||
<Setter Property="Foreground" Value="#ffffff" />
|
||||
<Setter Property="Opacity" Value="0.2" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
|
|
|
|||
|
|
@ -6,7 +6,9 @@
|
|||
</ResourceDictionary.MergedDictionaries>
|
||||
|
||||
<system:Boolean x:Key="ThemeBlurEnabled">True</system:Boolean>
|
||||
|
||||
<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="Foreground" Value="#FFFFFFFF" />
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
|
|
@ -19,7 +21,7 @@
|
|||
<Style x:Key="WindowBorderStyle" BasedOn="{StaticResource BaseWindowBorderStyle}" TargetType="{x:Type Border}">
|
||||
<Setter Property="Background">
|
||||
<Setter.Value>
|
||||
<SolidColorBrush Color="Black" Opacity="0.3"/>
|
||||
<SolidColorBrush Color="Black" Opacity="0.7"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
|
@ -33,6 +35,7 @@
|
|||
</Style>
|
||||
|
||||
<Style x:Key="PendingLineStyle" BasedOn="{StaticResource BasePendingLineStyle}" TargetType="{x:Type Line}">
|
||||
<Setter Property="Stroke" Value="White" />
|
||||
</Style>
|
||||
|
||||
<!-- Item Style -->
|
||||
|
|
@ -54,9 +57,32 @@
|
|||
|
||||
<!-- 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 CornerRadius="2" DockPanel.Dock="Right" Background="#ffffff" Opacity="0.5" BorderBrush="Transparent" BorderThickness="0" />
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ScrollBarStyle" BasedOn="{StaticResource BaseScrollBarStyle}" TargetType="{x:Type ScrollBar}">
|
||||
<Setter Property="Background" Value="#a0a0a0"/>
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
<Style x:Key="SearchIconStyle" TargetType="{x:Type Path}" BasedOn="{StaticResource BaseSearchIconStyle}">
|
||||
<Setter Property="Fill" Value="#ffffff" />
|
||||
<Setter Property="Width" Value="32" />
|
||||
<Setter Property="Height" Value="32" />
|
||||
<Setter Property="Opacity" Value="0.5" />
|
||||
</Style>
|
||||
<Style x:Key="ItemHotkeyStyle" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="FontSize" Value="14" />
|
||||
<Setter Property="Foreground" Value="#ffffff" />
|
||||
<Setter Property="Opacity" Value="0.5" />
|
||||
</Style>
|
||||
<Style x:Key="ItemHotkeySelectedStyle" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="FontSize" Value="14" />
|
||||
<Setter Property="Foreground" Value="#ffffff" />
|
||||
<Setter Property="Opacity" Value="0.5" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
|
|
@ -6,7 +6,9 @@
|
|||
</ResourceDictionary.MergedDictionaries>
|
||||
|
||||
<system:Boolean x:Key="ThemeBlurEnabled">True</system:Boolean>
|
||||
|
||||
<Style x:Key="ItemGlyph" BasedOn="{StaticResource BaseGlyphStyle}" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#FF000000" />
|
||||
</Style>
|
||||
<Style x:Key="QueryBoxStyle" BasedOn="{StaticResource BaseQueryBoxStyle}" TargetType="{x:Type TextBox}">
|
||||
<Setter Property="Foreground" Value="#FF000000" />
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
|
|
@ -52,9 +54,31 @@
|
|||
|
||||
<!-- 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 CornerRadius="2" DockPanel.Dock="Right" Background="#FFFFFF" BorderBrush="Transparent" BorderThickness="0" />
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ScrollBarStyle" BasedOn="{StaticResource BaseScrollBarStyle}" TargetType="{x:Type ScrollBar}">
|
||||
<Setter Property="Background" Value="#a0a0a0"/>
|
||||
</Style>
|
||||
<Style x:Key="SearchIconStyle" TargetType="{x:Type Path}" BasedOn="{StaticResource BaseSearchIconStyle}">
|
||||
<Setter Property="Fill" Value="#000000" />
|
||||
<Setter Property="Width" Value="32" />
|
||||
<Setter Property="Height" Value="32" />
|
||||
<Setter Property="Opacity" Value="0.2" />
|
||||
</Style>
|
||||
<Style x:Key="ItemHotkeyStyle" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="FontSize" Value="14" />
|
||||
<Setter Property="Foreground" Value="#000000" />
|
||||
<Setter Property="Opacity" Value="0.2" />
|
||||
</Style>
|
||||
<Style x:Key="ItemHotkeySelectedStyle" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="FontSize" Value="14" />
|
||||
<Setter Property="Foreground" Value="#000000" />
|
||||
<Setter Property="Opacity" Value="0.2" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
|
|
|
|||
|
|
@ -4,20 +4,23 @@
|
|||
<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="#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}"/>
|
||||
|
||||
|
||||
<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>
|
||||
|
||||
<Style x:Key="WindowStyle" BasedOn="{StaticResource BaseWindowStyle}" TargetType="{x:Type Window}">
|
||||
</Style>
|
||||
|
||||
|
||||
<Style x:Key="PendingLineStyle" BasedOn="{StaticResource BasePendingLineStyle}" TargetType="{x:Type Line}">
|
||||
</Style>
|
||||
|
||||
|
|
@ -25,18 +28,20 @@
|
|||
<Style x:Key="ItemTitleStyle" BasedOn="{StaticResource BaseItemTitleStyle}" TargetType="{x:Type TextBlock}">
|
||||
</Style>
|
||||
<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>
|
||||
|
|
|
|||
103
Flow.Launcher/Themes/Discord Dark.xaml
Normal file
103
Flow.Launcher/Themes/Discord Dark.xaml
Normal file
|
|
@ -0,0 +1,103 @@
|
|||
<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="#ffffff" />
|
||||
</Style>
|
||||
<Style x:Key="QueryBoxStyle" BasedOn="{StaticResource BaseQueryBoxStyle}" TargetType="{x:Type TextBox}">
|
||||
<Setter Property="Foreground" Value="#dcddde" />
|
||||
<Setter Property="Background" Value="#36393f" />
|
||||
<Setter Property="CaretBrush" Value="#ffffff" />
|
||||
<Setter Property="SelectionBrush" Value="#0a68d8"/>
|
||||
<Setter Property="Height" Value="42" />
|
||||
<Setter Property="FontSize" Value="24" />
|
||||
<Setter Property="Padding" Value="0 0 66 0" />
|
||||
</Style>
|
||||
<Style x:Key="QuerySuggestionBoxStyle" BasedOn="{StaticResource BaseQuerySuggestionBoxStyle}" TargetType="{x:Type TextBox}">
|
||||
<Setter Property="Foreground" Value="#72767d" />
|
||||
<Setter Property="Background" Value="#36393f" />
|
||||
<Setter Property="Height" Value="42" />
|
||||
<Setter Property="FontSize" Value="24" />
|
||||
<Setter Property="Padding" Value="0 0 66 0" />
|
||||
</Style>
|
||||
<Style x:Key="WindowBorderStyle" BasedOn="{StaticResource BaseWindowBorderStyle}" TargetType="{x:Type Border}">
|
||||
<Setter Property="BorderThickness" Value="2" />
|
||||
<Setter Property="BorderBrush" Value="#2f3136" />
|
||||
<Setter Property="CornerRadius" Value="4" />
|
||||
<Setter Property="Background" Value="#36393f" />
|
||||
</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="#ffffff" />
|
||||
<Setter Property="Opacity" Value="0.6" />
|
||||
</Style>
|
||||
|
||||
<!-- Item Style -->
|
||||
<Style x:Key="ItemTitleStyle" BasedOn="{StaticResource BaseItemTitleStyle}" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#dcddde" />
|
||||
</Style>
|
||||
<Style x:Key="ItemSubTitleStyle" BasedOn="{StaticResource BaseItemSubTitleStyle}" TargetType="{x:Type TextBlock}" >
|
||||
<Setter Property="Foreground" Value="#72767d" />
|
||||
<Setter Property="FontSize" Value="13" />
|
||||
</Style>
|
||||
<Style x:Key="ItemNumberStyle" BasedOn="{StaticResource BaseItemNumberStyle}" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#A6A6A6" />
|
||||
</Style>
|
||||
<Style x:Key="ItemTitleSelectedStyle" BasedOn="{StaticResource BaseItemTitleSelectedStyle}" TargetType="{x:Type TextBlock}" >
|
||||
<Setter Property="Cursor" Value="Arrow" />
|
||||
<Setter Property="Foreground" Value="#32bd6a" />
|
||||
</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">#49443c</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.FontWeight" Value="Bold" />
|
||||
</Style>
|
||||
<Style x:Key="ItemHotkeyStyle" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="FontSize" Value="15" />
|
||||
<Setter Property="Foreground" Value="#72767d" />
|
||||
<Setter Property="Opacity" Value="0.8" />
|
||||
</Style>
|
||||
<Style x:Key="ItemHotkeySelectedStyle" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="FontSize" Value="15" />
|
||||
<Setter Property="Foreground" Value="#72767d" />
|
||||
<Setter Property="Opacity" Value="0.8" />
|
||||
</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 CornerRadius="2" DockPanel.Dock="Right" Background="#202225" BorderBrush="Transparent" BorderThickness="0" />
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style x:Key="ScrollBarStyle" BasedOn="{StaticResource BaseScrollBarStyle}" TargetType="{x:Type ScrollBar}">
|
||||
</Style>
|
||||
<Style x:Key="SeparatorStyle" BasedOn="{StaticResource BaseSeparatorStyle}" TargetType="{x:Type Rectangle}">
|
||||
<Setter Property="Fill" Value="#42454a"/>
|
||||
<Setter Property="Height" Value="1"/>
|
||||
<Setter Property="Margin" Value="12 0 12 8"/>
|
||||
</Style>
|
||||
<Style x:Key="SearchIconStyle" TargetType="{x:Type Path}" BasedOn="{StaticResource BaseSearchIconStyle}">
|
||||
<Setter Property="Fill" Value="#42454a" />
|
||||
<Setter Property="Width" Value="32" />
|
||||
<Setter Property="Height" Value="32" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
|
|
@ -7,15 +7,17 @@
|
|||
<Setter Property="Background" Value="LightGray" />
|
||||
<Setter Property="Foreground" Value="#222222" />
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ItemGlyph" BasedOn="{StaticResource BaseGlyphStyle}" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#000000" />
|
||||
</Style>
|
||||
<Style x:Key="QuerySuggestionBoxStyle" BasedOn="{StaticResource BaseQuerySuggestionBoxStyle}" TargetType="{x:Type TextBox}">
|
||||
<Setter Property="Background" Value="LightGray" />
|
||||
<Setter Property="Foreground" Value="#6E6E6E" />
|
||||
<Setter Property="Foreground" Value="#b8b8b8" />
|
||||
</Style>
|
||||
|
||||
<Style x:Key="WindowBorderStyle" BasedOn="{StaticResource BaseWindowBorderStyle}" TargetType="{x:Type Border}">
|
||||
<Setter Property="BorderBrush" Value="LightGray" />
|
||||
<Setter Property="BorderThickness" Value="1" />
|
||||
<Setter Property="BorderThickness" Value="2" />
|
||||
<Setter Property="Background" Value="LightGray"></Setter>
|
||||
</Style>
|
||||
<Style x:Key="WindowStyle" TargetType="{x:Type Window}" BasedOn="{StaticResource BaseWindowStyle}" >
|
||||
|
|
@ -29,20 +31,22 @@
|
|||
<Setter Property="Foreground" Value="#A6A6A6" />
|
||||
</Style>
|
||||
<Style x:Key="ItemSubTitleStyle" BasedOn="{StaticResource BaseItemSubTitleStyle}" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#6B6B6B" />
|
||||
<Setter Property="Foreground" Value="#818181" />
|
||||
<Setter Property="FontSize" Value="13" />
|
||||
</Style>
|
||||
<Style x:Key="ItemTitleSelectedStyle" BasedOn="{StaticResource BaseItemTitleSelectedStyle}" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="White" />
|
||||
</Style>
|
||||
<Style x:Key="ItemSubTitleSelectedStyle" BasedOn="{StaticResource BaseItemSubTitleSelectedStyle}" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#EDEDED" />
|
||||
<Setter Property="Foreground" Value="Silver" />
|
||||
<Setter Property="FontSize" Value="13" />
|
||||
</Style>
|
||||
<SolidColorBrush x:Key="ItemSelectedBackgroundColor">#787878</SolidColorBrush>
|
||||
<Style x:Key="ThumbStyle" BasedOn="{StaticResource BaseThumbStyle}" TargetType="{x:Type Thumb}">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Thumb}">
|
||||
<Border CornerRadius="2" DockPanel.Dock="Right" Background="#DBDADB" BorderBrush="Transparent" BorderThickness="0" />
|
||||
<Border CornerRadius="2" DockPanel.Dock="Right" Background="#eeeeee" BorderBrush="Transparent" BorderThickness="0" />
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
|
|
@ -51,4 +55,17 @@
|
|||
<Style x:Key="ScrollBarStyle" BasedOn="{StaticResource BaseScrollBarStyle}" TargetType="{x:Type ScrollBar}" >
|
||||
<Setter Property="Width" Value="3"/>
|
||||
</Style>
|
||||
<Style x:Key="SearchIconStyle" TargetType="{x:Type Path}" BasedOn="{StaticResource BaseSearchIconStyle}">
|
||||
<Setter Property="Fill" Value="#a4a4a4" />
|
||||
<Setter Property="Width" Value="32" />
|
||||
<Setter Property="Height" Value="32" />
|
||||
</Style>
|
||||
<Style x:Key="ItemHotkeyStyle" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="FontSize" Value="15" />
|
||||
<Setter Property="Foreground" Value="#a3a3a3" />
|
||||
</Style>
|
||||
<Style x:Key="ItemHotkeySelectedStyle" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="FontSize" Value="15" />
|
||||
<Setter Property="Foreground" Value="#a3a3a3" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
|
|
|
|||
78
Flow.Launcher/Themes/League.xaml
Normal file
78
Flow.Launcher/Themes/League.xaml
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
<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>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<Style x:Key="QueryBoxStyle" BasedOn="{StaticResource BaseQueryBoxStyle}" TargetType="{x:Type TextBox}">
|
||||
<Setter Property="Background" Value="#161614"/>
|
||||
<Setter Property="Foreground" Value="#b88f3a" />
|
||||
<Setter Property="CaretBrush" Value="#b88f3a" />
|
||||
<Setter Property="Padding" Value="0 0 66 0" />
|
||||
<Setter Property="Height" Value="42" />
|
||||
</Style>
|
||||
<Style x:Key="ItemGlyph" BasedOn="{StaticResource BaseGlyphStyle}" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#b88f3a" />
|
||||
</Style>
|
||||
<Style x:Key="QuerySuggestionBoxStyle" BasedOn="{StaticResource BaseQuerySuggestionBoxStyle}" TargetType="{x:Type TextBox}">
|
||||
<Setter Property="Background" Value="#161614"/>
|
||||
<Setter Property="Foreground" Value="#a09b8c" />
|
||||
<Setter Property="Padding" Value="0 0 66 0" />
|
||||
<Setter Property="Height" Value="42" />
|
||||
</Style>
|
||||
|
||||
<Style x:Key="WindowBorderStyle" BasedOn="{StaticResource BaseWindowBorderStyle}" TargetType="{x:Type Border}">
|
||||
<Setter Property="CornerRadius" Value="0" />
|
||||
<Setter Property="BorderThickness" Value="1" />
|
||||
<Setter Property="BorderBrush" Value="#785a28" />
|
||||
<Setter Property="Background" Value="#161614"></Setter>
|
||||
</Style>
|
||||
<Style x:Key="WindowStyle" TargetType="{x:Type Window}" BasedOn="{StaticResource BaseWindowStyle}" >
|
||||
<Setter Property="Width" Value="576" />
|
||||
</Style>
|
||||
<Style x:Key="PendingLineStyle" BasedOn="{StaticResource BasePendingLineStyle}" TargetType="{x:Type Line}">
|
||||
<Setter Property="Stroke" Value="#32EC32" />
|
||||
</Style>
|
||||
<Style x:Key="ItemTitleStyle" BasedOn="{StaticResource BaseItemTitleStyle}" TargetType="{x:Type TextBlock}" >
|
||||
<Setter Property="Foreground" Value="#a09b8c"></Setter>
|
||||
</Style>
|
||||
<Style x:Key="ItemSubTitleStyle" BasedOn="{StaticResource BaseItemSubTitleStyle}" TargetType="{x:Type TextBlock}" >
|
||||
<Setter Property="Foreground" Value="#5b5a56"></Setter>
|
||||
</Style>
|
||||
<Style x:Key="ItemTitleSelectedStyle" BasedOn="{StaticResource BaseItemTitleSelectedStyle}" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#a09b8c" />
|
||||
</Style>
|
||||
<Style x:Key="ItemSubTitleSelectedStyle" BasedOn="{StaticResource BaseItemSubTitleSelectedStyle}" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#4bb44b" />
|
||||
<Setter Property="FontSize" Value="13" />
|
||||
</Style>
|
||||
<SolidColorBrush x:Key="ItemSelectedBackgroundColor">#192026</SolidColorBrush>
|
||||
<Style x:Key="ThumbStyle" BasedOn="{StaticResource BaseThumbStyle}" TargetType="{x:Type Thumb}">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Thumb}">
|
||||
<Border CornerRadius="2" DockPanel.Dock="Right" Background="#b88f3a" BorderBrush="Transparent" BorderThickness="0" />
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style x:Key="ScrollBarStyle" BasedOn="{StaticResource BaseScrollBarStyle}" TargetType="{x:Type ScrollBar}" >
|
||||
<Setter Property="Width" Value="4"/>
|
||||
</Style>
|
||||
<Style x:Key="HighlightStyle">
|
||||
<Setter Property="Inline.FontWeight" Value="Bold" />
|
||||
</Style>
|
||||
<Style x:Key="ItemHotkeyStyle" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="FontSize" Value="15" />
|
||||
<Setter Property="Foreground" Value="#5b5a56" />
|
||||
</Style>
|
||||
<Style x:Key="ItemHotkeySelectedStyle" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="FontSize" Value="15" />
|
||||
<Setter Property="Foreground" Value="#5b5a56" />
|
||||
</Style>
|
||||
<Geometry x:Key="SearchIconImg">F1 M12000,12000z M0,0z M10354,10962C10326,10951 10279,10927 10249,10907 10216,10886 9476,10153 8370,9046 7366,8042 6541,7220 6536,7220 6532,7220 6498,7242 6461,7268 6213,7447 5883,7619 5592,7721 5194,7860 4802,7919 4360,7906 3612,7886 2953,7647 2340,7174 2131,7013 1832,6699 1664,6465 1394,6088 1188,5618 1097,5170 1044,4909 1030,4764 1030,4470 1030,4130 1056,3914 1135,3609 1263,3110 1511,2633 1850,2235 1936,2134 2162,1911 2260,1829 2781,1395 3422,1120 4090,1045 4271,1025 4667,1025 4848,1045 5505,1120 6100,1368 6630,1789 6774,1903 7081,2215 7186,2355 7362,2588 7467,2759 7579,2990 7802,3455 7911,3937 7911,4460 7911,4854 7861,5165 7737,5542 7684,5702 7675,5724 7602,5885 7517,6071 7390,6292 7270,6460 7242,6499 7220,6533 7220,6538 7220,6542 8046,7371 9055,8380 10441,9766 10898,10229 10924,10274 10945,10308 10966,10364 10976,10408 10990,10472 10991,10493 10980,10554 10952,10717 10840,10865 10690,10937 10621,10971 10607,10974 10510,10977 10425,10980 10395,10977 10354,10962z M4685,7050C5214,7001 5694,6809 6100,6484 6209,6396 6396,6209 6484,6100 7151,5267 7246,4110 6721,3190 6369,2571 5798,2137 5100,1956 4706,1855 4222,1855 3830,1957 3448,2056 3140,2210 2838,2453 2337,2855 2010,3427 1908,4080 1877,4274 1877,4656 1908,4850 1948,5105 2028,5370 2133,5590 2459,6272 3077,6782 3810,6973 3967,7014 4085,7034 4290,7053 4371,7061 4583,7059 4685,7050z</Geometry>
|
||||
<Style x:Key="SearchIconStyle" TargetType="{x:Type Path}">
|
||||
<Setter Property="Fill" Value="#b88f3a" />
|
||||
<Setter Property="Width" Value="32" />
|
||||
<Setter Property="Height" Value="32" />
|
||||
</Style>
|
||||
|
||||
</ResourceDictionary>
|
||||
|
|
@ -4,15 +4,19 @@
|
|||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/Themes/Base.xaml"></ResourceDictionary>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
|
||||
<Style x:Key="ItemGlyph" 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="Background" Value="White "/>
|
||||
<Setter Property="Foreground" Value="#000000" />
|
||||
<Setter Property="FontSize" Value="22" />
|
||||
</Style>
|
||||
|
||||
<Style x:Key="QuerySuggestionBoxStyle" BasedOn="{StaticResource BaseQuerySuggestionBoxStyle}" TargetType="{x:Type TextBox}">
|
||||
<Setter Property="Background" Value="White"/>
|
||||
<Setter Property="Foreground" Value="#000000" />
|
||||
<Setter Property="Foreground" Value="#d9d9d9" />
|
||||
<Setter Property="FontSize" Value="22" />
|
||||
</Style>
|
||||
|
||||
<Style x:Key="WindowBorderStyle" BasedOn="{StaticResource BaseWindowBorderStyle}" TargetType="{x:Type Border}">
|
||||
|
|
@ -30,22 +34,22 @@
|
|||
<Setter Property="Foreground" Value="#000000"></Setter>
|
||||
</Style>
|
||||
<Style x:Key="ItemSubTitleStyle" BasedOn="{StaticResource BaseItemSubTitleStyle}" TargetType="{x:Type TextBlock}" >
|
||||
<Setter Property="Foreground" Value="#000000"></Setter>
|
||||
<Setter Property="Foreground" Value="#A8A8A8"></Setter>
|
||||
</Style>
|
||||
<Style x:Key="ItemTitleSelectedStyle" BasedOn="{StaticResource BaseItemTitleSelectedStyle}" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#F6F6FF" />
|
||||
<Setter Property="Foreground" Value="#000000" />
|
||||
</Style>
|
||||
<Style x:Key="ItemSubTitleSelectedStyle" BasedOn="{StaticResource BaseItemSubTitleSelectedStyle}" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#F6F6FF" />
|
||||
<Setter Property="Foreground" Value="#818181" />
|
||||
</Style>
|
||||
<SolidColorBrush x:Key="ItemSelectedBackgroundColor">#909090</SolidColorBrush>
|
||||
<SolidColorBrush x:Key="ItemSelectedBackgroundColor">#d9d9d9</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 CornerRadius="2" DockPanel.Dock="Right" Background="#DEDEDE" BorderBrush="Transparent" BorderThickness="0" />
|
||||
<Border CornerRadius="2" DockPanel.Dock="Right" Background="#C3C3C3" BorderBrush="Transparent" BorderThickness="0" />
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
|
|
@ -53,4 +57,17 @@
|
|||
|
||||
<Style x:Key="ScrollBarStyle" BasedOn="{StaticResource BaseScrollBarStyle}" TargetType="{x:Type ScrollBar}">
|
||||
</Style>
|
||||
<Style x:Key="SearchIconStyle" TargetType="{x:Type Path}" BasedOn="{StaticResource BaseSearchIconStyle}">
|
||||
<Setter Property="Fill" Value="#d9d9d9" />
|
||||
<Setter Property="Width" Value="32" />
|
||||
<Setter Property="Height" Value="32" />
|
||||
</Style>
|
||||
<Style x:Key="ItemHotkeyStyle" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="FontSize" Value="15" />
|
||||
<Setter Property="Foreground" Value="#a3a3a3" />
|
||||
</Style>
|
||||
<Style x:Key="ItemHotkeySelectedStyle" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="FontSize" Value="15" />
|
||||
<Setter Property="Foreground" Value="#a3a3a3" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
|
|
@ -1,39 +1,59 @@
|
|||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/Themes/Base.xaml"></ResourceDictionary>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<Style x:Key="QueryBoxStyle" BasedOn="{StaticResource BaseQueryBoxStyle}" TargetType="{x:Type TextBox}">
|
||||
<Setter Property="Background" Value="#ffffff"/>
|
||||
<Setter Property="Foreground" Value="#000000" />
|
||||
</Style>
|
||||
|
||||
<Style x:Key="QuerySuggestionBoxStyle" BasedOn="{StaticResource BaseQuerySuggestionBoxStyle}" TargetType="{x:Type TextBox}">
|
||||
<Setter Property="Background" Value="#ffffff"/>
|
||||
<Setter Property="Foreground" Value="#000000" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<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="Foreground" Value="#FFFFFF" />
|
||||
<Setter Property="Background" Value="#001e4e"/>
|
||||
<Setter Property="Padding" Value="0 0 18 0" />
|
||||
</Style>
|
||||
<Style x:Key="QuerySuggestionBoxStyle" BasedOn="{StaticResource BaseQuerySuggestionBoxStyle}" TargetType="{x:Type TextBox}">
|
||||
<Setter Property="Foreground" Value="#344c71" />
|
||||
<Setter Property="Background" Value="#001e4e" />
|
||||
<Setter Property="Padding" Value="0 0 18 0" />
|
||||
</Style>
|
||||
|
||||
<Style x:Key="WindowBorderStyle" BasedOn="{StaticResource BaseWindowBorderStyle}" TargetType="{x:Type Border}">
|
||||
<Setter Property="Background" Value="#001e4e"></Setter>
|
||||
</Style>
|
||||
<Style x:Key="WindowStyle" TargetType="{x:Type Window}" BasedOn="{StaticResource BaseWindowStyle}" >
|
||||
</Style>
|
||||
<Style x:Key="PendingLineStyle" BasedOn="{StaticResource BasePendingLineStyle}" TargetType="{x:Type Line}" >
|
||||
</Style>
|
||||
<Style x:Key="ItemTitleStyle" BasedOn="{StaticResource BaseItemTitleStyle}" TargetType="{x:Type TextBlock}" >
|
||||
<Setter Property="Foreground" Value="#f5f5f5"></Setter>
|
||||
</Style>
|
||||
<Style x:Key="ItemSubTitleStyle" BasedOn="{StaticResource BaseItemSubTitleStyle}" TargetType="{x:Type TextBlock}" >
|
||||
<Setter Property="Foreground" Value="#A5A5A5"></Setter>
|
||||
<Setter Property="FontSize" Value="13" />
|
||||
</Style>
|
||||
<Style x:Key="ItemTitleSelectedStyle" BasedOn="{StaticResource BaseItemTitleSelectedStyle}" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#f5f5f5" />
|
||||
</Style>
|
||||
<Style x:Key="ItemSubTitleSelectedStyle" BasedOn="{StaticResource BaseItemSubTitleSelectedStyle}" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#A5A5A5"></Setter>
|
||||
<Setter Property="FontSize" Value="13" />
|
||||
</Style>
|
||||
<SolidColorBrush x:Key="ItemSelectedBackgroundColor">#04152E</SolidColorBrush>
|
||||
<Style x:Key="ThumbStyle" BasedOn="{StaticResource BaseThumbStyle}" TargetType="{x:Type Thumb}">
|
||||
</Style>
|
||||
<Style x:Key="ScrollBarStyle" BasedOn="{StaticResource BaseScrollBarStyle}" TargetType="{x:Type ScrollBar}">
|
||||
</Style>
|
||||
<Style x:Key="SearchIconStyle" TargetType="{x:Type Path}" BasedOn="{StaticResource BaseSearchIconStyle}">
|
||||
<Setter Property="Fill" Value="#1d427d" />
|
||||
<Setter Property="Width" Value="32" />
|
||||
<Setter Property="Height" Value="32" />
|
||||
<Setter Property="Opacity" Value="0" />
|
||||
</Style>
|
||||
<Style x:Key="ItemHotkeyStyle" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="FontSize" Value="15" />
|
||||
<Setter Property="Foreground" Value="#2C5595" />
|
||||
</Style>
|
||||
<Style x:Key="ItemHotkeySelectedStyle" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="FontSize" Value="15" />
|
||||
<Setter Property="Foreground" Value="#2C5595" />
|
||||
</Style>
|
||||
|
||||
<Style x:Key="WindowBorderStyle" BasedOn="{StaticResource BaseWindowBorderStyle}" TargetType="{x:Type Border}">
|
||||
<Setter Property="Background" Value="#001e4e"></Setter>
|
||||
</Style>
|
||||
<Style x:Key="WindowStyle" TargetType="{x:Type Window}" BasedOn="{StaticResource BaseWindowStyle}" >
|
||||
</Style>
|
||||
<Style x:Key="PendingLineStyle" BasedOn="{StaticResource BasePendingLineStyle}" TargetType="{x:Type Line}" >
|
||||
</Style>
|
||||
<Style x:Key="ItemTitleStyle" BasedOn="{StaticResource BaseItemTitleStyle}" TargetType="{x:Type TextBlock}" >
|
||||
<Setter Property="Foreground" Value="#f5f5f5"></Setter>
|
||||
</Style>
|
||||
<Style x:Key="ItemSubTitleStyle" BasedOn="{StaticResource BaseItemSubTitleStyle}" TargetType="{x:Type TextBlock}" >
|
||||
<Setter Property="Foreground" Value="#c2c2c2"></Setter>
|
||||
</Style>
|
||||
<Style x:Key="ItemTitleSelectedStyle" BasedOn="{StaticResource BaseItemTitleSelectedStyle}" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#f5f5f5" />
|
||||
</Style>
|
||||
<Style x:Key="ItemSubTitleSelectedStyle" BasedOn="{StaticResource BaseItemSubTitleSelectedStyle}" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#c2c2c2" />
|
||||
</Style>
|
||||
<SolidColorBrush x:Key="ItemSelectedBackgroundColor">#006ac1</SolidColorBrush>
|
||||
<Style x:Key="ThumbStyle" BasedOn="{StaticResource BaseThumbStyle}" TargetType="{x:Type Thumb}">
|
||||
</Style>
|
||||
<Style x:Key="ScrollBarStyle" BasedOn="{StaticResource BaseScrollBarStyle}" TargetType="{x:Type ScrollBar}">
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
|
|
@ -3,6 +3,9 @@
|
|||
<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="#ffffff" />
|
||||
</Style>
|
||||
<Style x:Key="QueryBoxStyle" BasedOn="{StaticResource BaseQueryBoxStyle}" TargetType="{x:Type TextBox}">
|
||||
<Setter Property="Background" Value="#2e3440" />
|
||||
<Setter Property="Foreground" Value="#eceff4" />
|
||||
|
|
@ -11,7 +14,7 @@
|
|||
|
||||
<Style x:Key="QuerySuggestionBoxStyle" BasedOn="{StaticResource BaseQuerySuggestionBoxStyle}" TargetType="{x:Type TextBox}">
|
||||
<Setter Property="Background" Value="#2e3440" />
|
||||
<Setter Property="Foreground" Value="#eceff4" />
|
||||
<Setter Property="Foreground" Value="#50596b" />
|
||||
<Setter Property="FontSize" Value="30" />
|
||||
</Style>
|
||||
|
||||
|
|
@ -22,29 +25,31 @@
|
|||
</Style>
|
||||
<Style x:Key="WindowStyle" TargetType="{x:Type Window}" BasedOn="{StaticResource BaseWindowStyle}" >
|
||||
</Style>
|
||||
<Style x:Key="PendingLineStyle" BasedOn="{StaticResource BasePendingLineStyle}" TargetType="{x:Type Line}" />
|
||||
<Style x:Key="PendingLineStyle" BasedOn="{StaticResource BasePendingLineStyle}" TargetType="{x:Type Line}">
|
||||
<Setter Property="Stroke" Value="White" />
|
||||
</Style>
|
||||
<Style x:Key="ItemTitleStyle" BasedOn="{StaticResource BaseItemTitleStyle}" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#e5e9f0" />
|
||||
<Setter Property="FontWeight" Value="Bold" />
|
||||
</Style>
|
||||
<Style x:Key="ItemNumberStyle" BasedOn="{StaticResource BaseItemNumberStyle}" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#A6A6A6" />
|
||||
<Setter Property="Foreground" Value="#6F7C95" />
|
||||
</Style>
|
||||
<Style x:Key="ItemSubTitleStyle" BasedOn="{StaticResource BaseItemSubTitleStyle}" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#d8dee9" />
|
||||
<Setter Property="Foreground" Value="#606c83" />
|
||||
</Style>
|
||||
<Style x:Key="ItemTitleSelectedStyle" BasedOn="{StaticResource BaseItemTitleSelectedStyle}" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#2e3440" />
|
||||
<Setter Property="Foreground" Value="#e5e9f0" />
|
||||
</Style>
|
||||
<Style x:Key="ItemSubTitleSelectedStyle" BasedOn="{StaticResource BaseItemSubTitleSelectedStyle}" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#4c566a" />
|
||||
<Setter Property="Foreground" Value="#8391AB" />
|
||||
</Style>
|
||||
<SolidColorBrush x:Key="ItemSelectedBackgroundColor">#5e81ac</SolidColorBrush>
|
||||
<SolidColorBrush x:Key="ItemSelectedBackgroundColor">#4e586b</SolidColorBrush>
|
||||
<Style x:Key="ThumbStyle" BasedOn="{StaticResource BaseThumbStyle}" TargetType="{x:Type Thumb}">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Thumb}">
|
||||
<Border CornerRadius="2" DockPanel.Dock="Right" Background="#4c566a" BorderBrush="Transparent" BorderThickness="0" />
|
||||
<Border CornerRadius="2" DockPanel.Dock="Right" Background="#B2B6BE" BorderBrush="Transparent" BorderThickness="0" />
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
|
|
@ -53,4 +58,17 @@
|
|||
<Style x:Key="ScrollBarStyle" BasedOn="{StaticResource BaseScrollBarStyle}" TargetType="{x:Type ScrollBar}" >
|
||||
<Setter Property="Width" Value="3"/>
|
||||
</Style>
|
||||
<Style x:Key="SearchIconStyle" TargetType="{x:Type Path}" BasedOn="{StaticResource BaseSearchIconStyle}">
|
||||
<Setter Property="Fill" Value="#50596b" />
|
||||
<Setter Property="Width" Value="32" />
|
||||
<Setter Property="Height" Value="32" />
|
||||
</Style>
|
||||
<Style x:Key="ItemHotkeyStyle" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="FontSize" Value="15" />
|
||||
<Setter Property="Foreground" Value="#8391AB" />
|
||||
</Style>
|
||||
<Style x:Key="ItemHotkeySelectedStyle" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="FontSize" Value="15" />
|
||||
<Setter Property="Foreground" Value="#8391AB" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
|
|
|
|||
|
|
@ -3,16 +3,19 @@
|
|||
<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="#ffffff" />
|
||||
</Style>
|
||||
<Style x:Key="QueryBoxStyle" BasedOn="{StaticResource BaseQueryBoxStyle}" TargetType="{x:Type TextBox}">
|
||||
<Setter Property="Background" Value="#4c566a" />
|
||||
<Setter Property="Foreground" Value="#eceff4" />
|
||||
<Setter Property="FontSize" Value="30" />
|
||||
<Setter Property="FontSize" Value="25" />
|
||||
</Style>
|
||||
|
||||
<Style x:Key="QuerySuggestionBoxStyle" BasedOn="{StaticResource BaseQuerySuggestionBoxStyle}" TargetType="{x:Type TextBox}">
|
||||
<Setter Property="Background" Value="#4c566a" />
|
||||
<Setter Property="Foreground" Value="#eceff4" />
|
||||
<Setter Property="FontSize" Value="30" />
|
||||
<Setter Property="FontSize" Value="25" />
|
||||
</Style>
|
||||
|
||||
<Style x:Key="WindowBorderStyle" BasedOn="{StaticResource BaseWindowBorderStyle}" TargetType="{x:Type Border}">
|
||||
|
|
@ -22,24 +25,26 @@
|
|||
</Style>
|
||||
<Style x:Key="WindowStyle" TargetType="{x:Type Window}" BasedOn="{StaticResource BaseWindowStyle}" >
|
||||
</Style>
|
||||
<Style x:Key="PendingLineStyle" BasedOn="{StaticResource BasePendingLineStyle}" TargetType="{x:Type Line}" />
|
||||
<Style x:Key="PendingLineStyle" BasedOn="{StaticResource BasePendingLineStyle}" TargetType="{x:Type Line}">
|
||||
<Setter Property="Stroke" Value="White" />
|
||||
</Style>
|
||||
<Style x:Key="ItemTitleStyle" BasedOn="{StaticResource BaseItemTitleStyle}" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#e5e9f0" />
|
||||
<Setter Property="FontWeight" Value="Bold" />
|
||||
</Style>
|
||||
<Style x:Key="ItemNumberStyle" BasedOn="{StaticResource BaseItemNumberStyle}" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#A6A6A6" />
|
||||
<Setter Property="Foreground" Value="#798090" />
|
||||
</Style>
|
||||
<Style x:Key="ItemSubTitleStyle" BasedOn="{StaticResource BaseItemSubTitleStyle}" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#d8dee9" />
|
||||
<Setter Property="Foreground" Value="#798090" />
|
||||
</Style>
|
||||
<Style x:Key="ItemTitleSelectedStyle" BasedOn="{StaticResource BaseItemTitleSelectedStyle}" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#2e3440" />
|
||||
<Setter Property="Foreground" Value="#FFFFFF" />
|
||||
</Style>
|
||||
<Style x:Key="ItemSubTitleSelectedStyle" BasedOn="{StaticResource BaseItemSubTitleSelectedStyle}" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#4c566a" />
|
||||
<Setter Property="Foreground" Value="#9498A0" />
|
||||
</Style>
|
||||
<SolidColorBrush x:Key="ItemSelectedBackgroundColor">#5e81ac</SolidColorBrush>
|
||||
<SolidColorBrush x:Key="ItemSelectedBackgroundColor">#596479</SolidColorBrush>
|
||||
<Style x:Key="ThumbStyle" BasedOn="{StaticResource BaseThumbStyle}" TargetType="{x:Type Thumb}">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
|
|
@ -49,8 +54,20 @@
|
|||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ScrollBarStyle" BasedOn="{StaticResource BaseScrollBarStyle}" TargetType="{x:Type ScrollBar}" >
|
||||
<Setter Property="Width" Value="3"/>
|
||||
</Style>
|
||||
<Style x:Key="SearchIconStyle" TargetType="{x:Type Path}" BasedOn="{StaticResource BaseSearchIconStyle}">
|
||||
<Setter Property="Fill" Value="#687693" />
|
||||
<Setter Property="Width" Value="32" />
|
||||
<Setter Property="Height" Value="32" />
|
||||
</Style>
|
||||
<Style x:Key="ItemHotkeyStyle" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="FontSize" Value="14" />
|
||||
<Setter Property="Foreground" Value="#687693" />
|
||||
</Style>
|
||||
<Style x:Key="ItemHotkeySelectedStyle" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="FontSize" Value="14" />
|
||||
<Setter Property="Foreground" Value="#687693" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
|
|
|
|||
|
|
@ -2,35 +2,76 @@
|
|||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/Themes/Base.xaml"></ResourceDictionary>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<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="Background" Value="#1f1d1f"/>
|
||||
<Setter Property="Foreground" Value="#cc1081" />
|
||||
<Setter Property="CaretBrush" Value="#cc1081" />
|
||||
<Setter Property="SelectionBrush" Value="#e564b1"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="QuerySuggestionBoxStyle" BasedOn="{StaticResource BaseQuerySuggestionBoxStyle}" TargetType="{x:Type TextBox}">
|
||||
<Setter Property="Background" Value="#1f1d1f"/>
|
||||
<Setter Property="Foreground" Value="#cc1081" />
|
||||
<Setter Property="Foreground" Value="#71114b" />
|
||||
</Style>
|
||||
|
||||
<Style x:Key="WindowBorderStyle" BasedOn="{StaticResource BaseWindowBorderStyle}" TargetType="{x:Type Border}">
|
||||
<Setter Property="Background" Value="#1f1d1f"></Setter>
|
||||
<Setter Property="BorderThickness" Value="2"></Setter>
|
||||
<Setter Property="BorderBrush" Value="#000000"></Setter>
|
||||
</Style>
|
||||
<Style x:Key="WindowStyle" TargetType="{x:Type Window}" BasedOn="{StaticResource BaseWindowStyle}" >
|
||||
</Style>
|
||||
<Style x:Key="PendingLineStyle" BasedOn="{StaticResource BasePendingLineStyle}" TargetType="{x:Type Line}" ></Style>
|
||||
<Style x:Key="PendingLineStyle" BasedOn="{StaticResource BasePendingLineStyle}" TargetType="{x:Type Line}">
|
||||
<Setter Property="Stroke" Value="#cc1081" />
|
||||
</Style>
|
||||
<Style x:Key="ItemTitleStyle" BasedOn="{StaticResource BaseItemTitleStyle}" TargetType="{x:Type TextBlock}" >
|
||||
<Setter Property="Foreground" Value="#f5f5f5"></Setter>
|
||||
</Style>
|
||||
<Style x:Key="ItemSubTitleStyle" BasedOn="{StaticResource BaseItemSubTitleStyle}" TargetType="{x:Type TextBlock}" >
|
||||
<Setter Property="Foreground" Value="#c2c2c2"></Setter>
|
||||
<Setter Property="Opacity" Value="0.5"></Setter>
|
||||
</Style>
|
||||
<Style x:Key="ItemTitleSelectedStyle" BasedOn="{StaticResource BaseItemTitleSelectedStyle}" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#f5f5f5" />
|
||||
</Style>
|
||||
<Style x:Key="ItemSubTitleSelectedStyle" BasedOn="{StaticResource BaseItemSubTitleSelectedStyle}" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#c2c2c2" />
|
||||
<Setter Property="Foreground" Value="#ed92c9" />
|
||||
</Style>
|
||||
<SolidColorBrush x:Key="ItemSelectedBackgroundColor">#cc1081</SolidColorBrush>
|
||||
<Style x:Key="ThumbStyle" BasedOn="{StaticResource BaseThumbStyle}" TargetType="{x:Type Thumb}"></Style>
|
||||
<Style x:Key="ScrollBarStyle" BasedOn="{StaticResource BaseScrollBarStyle}" TargetType="{x:Type ScrollBar}"></Style>
|
||||
<Style x:Key="ThumbStyle" BasedOn="{StaticResource BaseThumbStyle}" TargetType="{x:Type Thumb}">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Thumb}">
|
||||
<Border CornerRadius="2" DockPanel.Dock="Right" Background="#e564b1" BorderBrush="Transparent" BorderThickness="0" />
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style x:Key="ScrollBarStyle" BasedOn="{StaticResource BaseScrollBarStyle}" TargetType="{x:Type ScrollBar}">
|
||||
</Style>
|
||||
<Geometry x:Key="SearchIconImg">F1 M20,20z M0,0z M14.75,1A5.24,5.24,0,0,0,10,4A5.24,5.24,0,0,0,0,6.25C0,11.75 10,19 10,19 10,19 20,11.75 20,6.25A5.25,5.25,0,0,0,14.75,1z</Geometry>
|
||||
|
||||
<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="Background" Value="Transparent" />
|
||||
<Setter Property="HorizontalAlignment" Value="Right" />
|
||||
</Style>
|
||||
<Style x:Key="SearchIconStyle" TargetType="{x:Type Path}">
|
||||
<Setter Property="Fill" Value="#cc1081" />
|
||||
<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" />
|
||||
</Style>
|
||||
<Style x:Key="ItemHotkeySelectedStyle" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="FontSize" Value="14" />
|
||||
<Setter Property="Foreground" Value="#ed92c9" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
102
Flow.Launcher/Themes/Sublime.xaml
Normal file
102
Flow.Launcher/Themes/Sublime.xaml
Normal file
|
|
@ -0,0 +1,102 @@
|
|||
<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="#5bafb0" />
|
||||
</Style>
|
||||
<Style x:Key="QueryBoxStyle" BasedOn="{StaticResource BaseQueryBoxStyle}" TargetType="{x:Type TextBox}">
|
||||
<Setter Property="FontSize" Value="24" />
|
||||
<Setter Property="Background" Value="#303840" />
|
||||
<Setter Property="Foreground" Value="#d2d8e5" />
|
||||
<Setter Property="CaretBrush" Value="#FFAA47" />
|
||||
<Setter Property="FontSize" Value="26" />
|
||||
<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="#303840" />
|
||||
<Setter Property="Foreground" Value="#798189" />
|
||||
<Setter Property="FontSize" Value="26" />
|
||||
<Setter Property="Height" Value="42" />
|
||||
<Setter Property="Padding" Value="0 4 66 0" />
|
||||
</Style>
|
||||
<Style x:Key="WindowBorderStyle" BasedOn="{StaticResource BaseWindowBorderStyle}" TargetType="{x:Type Border}">
|
||||
<Setter Property="BorderThickness" Value="2" />
|
||||
<Setter Property="BorderBrush" Value="#6c7279" />
|
||||
<Setter Property="CornerRadius" Value="6" />
|
||||
<Setter Property="Background" Value="#303840" />
|
||||
</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="#FFAA47" />
|
||||
</Style>
|
||||
|
||||
<!-- Item Style -->
|
||||
<Style x:Key="ItemTitleStyle" BasedOn="{StaticResource BaseItemTitleStyle}" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#5989b2" />
|
||||
</Style>
|
||||
<Style x:Key="ItemSubTitleStyle" BasedOn="{StaticResource BaseItemSubTitleStyle}" TargetType="{x:Type TextBlock}" >
|
||||
<Setter Property="Foreground" Value="#7b858f" />
|
||||
<Setter Property="FontSize" Value="13" />
|
||||
</Style>
|
||||
<Style x:Key="ItemNumberStyle" BasedOn="{StaticResource BaseItemNumberStyle}" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#7b858f" />
|
||||
</Style>
|
||||
<Style x:Key="ItemTitleSelectedStyle" BasedOn="{StaticResource BaseItemTitleSelectedStyle}" TargetType="{x:Type TextBlock}" >
|
||||
<Setter Property="Cursor" Value="Arrow" />
|
||||
<Setter Property="Foreground" Value="#5bafb0" />
|
||||
</Style>
|
||||
<Style x:Key="ItemSubTitleSelectedStyle" BasedOn="{StaticResource BaseItemSubTitleSelectedStyle}" TargetType="{x:Type TextBlock}" >
|
||||
<Setter Property="Cursor" Value="Arrow" />
|
||||
<Setter Property="Foreground" Value="#cc8ec8" />
|
||||
</Style>
|
||||
<SolidColorBrush x:Key="ItemSelectedBackgroundColor">#3c454e</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="#ea7354" />
|
||||
</Style>
|
||||
<Style x:Key="ItemHotkeyStyle" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="FontSize" Value="13" />
|
||||
<Setter Property="Foreground" Value="#5bafb0" />
|
||||
</Style>
|
||||
<Style x:Key="ItemHotkeySelectedStyle" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="FontSize" Value="13" />
|
||||
<Setter Property="Foreground" Value="#ea7354" />
|
||||
</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 CornerRadius="2" DockPanel.Dock="Right" Background="#6c7279" BorderBrush="Transparent" BorderThickness="0" />
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style x:Key="ScrollBarStyle" BasedOn="{StaticResource BaseScrollBarStyle}" TargetType="{x:Type ScrollBar}">
|
||||
</Style>
|
||||
<Style x:Key="SeparatorStyle" BasedOn="{StaticResource BaseSeparatorStyle}" TargetType="{x:Type Rectangle}">
|
||||
<Setter Property="Fill" Value="#3c454e"/>
|
||||
<Setter Property="Height" Value="1"/>
|
||||
<Setter Property="Margin" Value="0 0 0 8"/>
|
||||
</Style>
|
||||
<Style x:Key="SearchIconStyle" TargetType="{x:Type Path}" BasedOn="{StaticResource BaseSearchIconStyle}">
|
||||
<Setter Property="Fill" Value="#3c454e" />
|
||||
<Setter Property="Width" Value="32" />
|
||||
<Setter Property="Height" Value="32" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
105
Flow.Launcher/Themes/Win10Light.xaml
Normal file
105
Flow.Launcher/Themes/Win10Light.xaml
Normal file
|
|
@ -0,0 +1,105 @@
|
|||
<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="#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="Background" Value="#dddddd" />
|
||||
<Setter Property="CaretBrush" Value="#000000" />
|
||||
<Setter Property="BorderBrush" Value="Black"/>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
<Setter Property="FontSize" Value="28" />
|
||||
<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="28" />
|
||||
<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 CornerRadius="2" DockPanel.Dock="Right" Background="#bebebe" BorderBrush="Transparent" BorderThickness="0" />
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style x:Key="ScrollBarStyle" BasedOn="{StaticResource BaseScrollBarStyle}" TargetType="{x:Type ScrollBar}">
|
||||
</Style>
|
||||
<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 8"/>
|
||||
</Style>
|
||||
<Style x:Key="SearchIconStyle" TargetType="{x:Type Path}" BasedOn="{StaticResource BaseSearchIconStyle}">
|
||||
<Setter Property="Fill" Value="#555555" />
|
||||
<Setter Property="Width" Value="32" />
|
||||
<Setter Property="Height" Value="32" />
|
||||
<Setter Property="Opacity" Value="0.2" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
106
Flow.Launcher/Themes/Win11Dark.xaml
Normal file
106
Flow.Launcher/Themes/Win11Dark.xaml
Normal file
|
|
@ -0,0 +1,106 @@
|
|||
<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="#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="Background" Value="#202020" />
|
||||
<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">#2d2d2d</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.FontWeight" Value="Bold" />
|
||||
</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 CornerRadius="2" DockPanel.Dock="Right" Background="#9a9a9a" BorderBrush="Transparent" BorderThickness="0" />
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style x:Key="ScrollBarStyle" BasedOn="{StaticResource BaseScrollBarStyle}" TargetType="{x:Type ScrollBar}">
|
||||
</Style>
|
||||
<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" TargetType="{x:Type Path}" BasedOn="{StaticResource BaseSearchIconStyle}">
|
||||
<Setter Property="Fill" Value="#4d4d4d" />
|
||||
<Setter Property="Width" Value="32" />
|
||||
<Setter Property="Height" Value="32" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
103
Flow.Launcher/Themes/Win11Light.xaml
Normal file
103
Flow.Launcher/Themes/Win11Light.xaml
Normal file
|
|
@ -0,0 +1,103 @@
|
|||
<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="#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="Background" Value="#f3f3f3" />
|
||||
<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="Height" Value="42" />
|
||||
</Style>
|
||||
<Style x:Key="QuerySuggestionBoxStyle" BasedOn="{StaticResource BaseQuerySuggestionBoxStyle}" TargetType="{x:Type TextBox}">
|
||||
<Setter Property="Background" Value="#f3f3f3" />
|
||||
<Setter Property="Foreground" Value="#b5b5b5" />
|
||||
<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="#aaaaaa" />
|
||||
<Setter Property="CornerRadius" Value="5" />
|
||||
<Setter Property="Background" Value="#f3f3f3" />
|
||||
</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}">
|
||||
</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="#A6A6A6" />
|
||||
</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">#eaeaea</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" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource BaseItemHotkeySelecetedStyle}">
|
||||
<Setter Property="FontSize" Value="13" />
|
||||
<Setter Property="Foreground" Value="#acacac" />
|
||||
</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 CornerRadius="2" DockPanel.Dock="Right" Background="#868686" BorderBrush="Transparent" BorderThickness="0" />
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style x:Key="ScrollBarStyle" BasedOn="{StaticResource BaseScrollBarStyle}" TargetType="{x:Type ScrollBar}">
|
||||
</Style>
|
||||
<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" TargetType="{x:Type Path}" BasedOn="{StaticResource BaseSearchIconStyle}">
|
||||
<Setter Property="Fill" Value="#555555" />
|
||||
<Setter Property="Width" Value="32" />
|
||||
<Setter Property="Height" Value="32" />
|
||||
<Setter Property="Opacity" Value="0.2" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
|
|
@ -21,6 +21,8 @@ using Microsoft.VisualStudio.Threading;
|
|||
using System.Threading.Channels;
|
||||
using ISavable = Flow.Launcher.Plugin.ISavable;
|
||||
using System.Windows.Threading;
|
||||
using NHotkey;
|
||||
|
||||
|
||||
namespace Flow.Launcher.ViewModel
|
||||
{
|
||||
|
|
@ -108,7 +110,9 @@ namespace Flow.Launcher.ViewModel
|
|||
}
|
||||
|
||||
Log.Error("MainViewModel", "Unexpected ResultViewUpdate ends");
|
||||
};
|
||||
}
|
||||
|
||||
;
|
||||
|
||||
void continueAction(Task t)
|
||||
{
|
||||
|
|
@ -145,6 +149,24 @@ namespace Flow.Launcher.ViewModel
|
|||
}
|
||||
}
|
||||
|
||||
private void UpdateLastQUeryMode()
|
||||
{
|
||||
switch (_settings.LastQueryMode)
|
||||
{
|
||||
case LastQueryMode.Empty:
|
||||
ChangeQueryText(string.Empty);
|
||||
break;
|
||||
case LastQueryMode.Preserved:
|
||||
LastQuerySelected = true;
|
||||
break;
|
||||
case LastQueryMode.Selected:
|
||||
LastQuerySelected = false;
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentException($"wrong LastQueryMode: <{_settings.LastQueryMode}>");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void InitializeKeyCommands()
|
||||
{
|
||||
|
|
@ -156,7 +178,18 @@ namespace Flow.Launcher.ViewModel
|
|||
}
|
||||
else
|
||||
{
|
||||
MainWindowVisibility = Visibility.Collapsed;
|
||||
Hide();
|
||||
}
|
||||
});
|
||||
|
||||
ClearQueryCommand = new RelayCommand(_ =>
|
||||
{
|
||||
if (!string.IsNullOrEmpty(QueryText))
|
||||
{
|
||||
ChangeQueryText(string.Empty);
|
||||
|
||||
// Push Event to UI SystemQuery has changed
|
||||
//OnPropertyChanged(nameof(SystemQueryText));
|
||||
}
|
||||
});
|
||||
|
||||
|
|
@ -194,7 +227,7 @@ namespace Flow.Launcher.ViewModel
|
|||
|
||||
if (hideWindow)
|
||||
{
|
||||
MainWindowVisibility = Visibility.Collapsed;
|
||||
Hide();
|
||||
}
|
||||
|
||||
if (SelectedIsFromQueryResults())
|
||||
|
|
@ -239,8 +272,8 @@ namespace Flow.Launcher.ViewModel
|
|||
|
||||
ReloadPluginDataCommand = new RelayCommand(_ =>
|
||||
{
|
||||
MainWindowVisibility = Visibility.Collapsed;
|
||||
|
||||
Hide();
|
||||
|
||||
PluginManager
|
||||
.ReloadData()
|
||||
.ContinueWith(_ =>
|
||||
|
|
@ -280,13 +313,23 @@ namespace Flow.Launcher.ViewModel
|
|||
/// but we don't want to move cursor to end when query is updated from TextBox
|
||||
/// </summary>
|
||||
/// <param name="queryText"></param>
|
||||
public void ChangeQueryText(string queryText)
|
||||
public void ChangeQueryText(string queryText, bool reQuery = false)
|
||||
{
|
||||
QueryText = queryText;
|
||||
if (QueryText!=queryText)
|
||||
{
|
||||
// re-query is done in QueryText's setter method
|
||||
QueryText = queryText;
|
||||
}
|
||||
else if (reQuery)
|
||||
{
|
||||
Query();
|
||||
}
|
||||
QueryTextCursorMovedToEnd = true;
|
||||
}
|
||||
|
||||
public bool LastQuerySelected { get; set; }
|
||||
|
||||
// This is not a reliable indicator of the cursor's position, it is manually set for a specific purpose.
|
||||
public bool QueryTextCursorMovedToEnd { get; set; }
|
||||
|
||||
private ResultsViewModel _selectedResults;
|
||||
|
|
@ -328,7 +371,6 @@ namespace Flow.Launcher.ViewModel
|
|||
}
|
||||
|
||||
public Visibility ProgressBarVisibility { get; set; }
|
||||
|
||||
public Visibility MainWindowVisibility { get; set; }
|
||||
|
||||
public ICommand EscCommand { get; set; }
|
||||
|
|
@ -342,6 +384,7 @@ namespace Flow.Launcher.ViewModel
|
|||
public ICommand LoadHistoryCommand { get; set; }
|
||||
public ICommand OpenResultCommand { get; set; }
|
||||
public ICommand ReloadPluginDataCommand { get; set; }
|
||||
public ICommand ClearQueryCommand { get; private set; }
|
||||
|
||||
public string OpenResultCommandModifiers { get; private set; }
|
||||
|
||||
|
|
@ -590,6 +633,7 @@ namespace Flow.Launcher.ViewModel
|
|||
{
|
||||
Title = InternationalizationManager.Instance.GetTranslation("setAsTopMostInThisQuery"),
|
||||
IcoPath = "Images\\up.png",
|
||||
Glyph = new GlyphInfo(FontFamily: "/Resources/#Segoe Fluent Icons", Glyph: "\xeac2"),
|
||||
PluginDirectory = Constant.ProgramDirectory,
|
||||
Action = _ =>
|
||||
{
|
||||
|
|
@ -627,7 +671,7 @@ namespace Flow.Launcher.ViewModel
|
|||
return menu;
|
||||
}
|
||||
|
||||
private bool SelectedIsFromQueryResults()
|
||||
internal bool SelectedIsFromQueryResults()
|
||||
{
|
||||
var selected = SelectedResults == Results;
|
||||
return selected;
|
||||
|
|
@ -652,7 +696,7 @@ namespace Flow.Launcher.ViewModel
|
|||
OpenResultCommandModifiers = _settings.OpenResultModifiers ?? DefaultOpenResultModifiers;
|
||||
}
|
||||
|
||||
internal void ToggleFlowLauncher()
|
||||
public async void ToggleFlowLauncher()
|
||||
{
|
||||
if (MainWindowVisibility != Visibility.Visible)
|
||||
{
|
||||
|
|
@ -660,12 +704,48 @@ namespace Flow.Launcher.ViewModel
|
|||
}
|
||||
else
|
||||
{
|
||||
switch (_settings.LastQueryMode)
|
||||
{
|
||||
case LastQueryMode.Empty:
|
||||
ChangeQueryText(string.Empty);
|
||||
Application.Current.MainWindow.Opacity = 0; // Trick for no delay
|
||||
await Task.Delay(100);
|
||||
Application.Current.MainWindow.Opacity = 1;
|
||||
break;
|
||||
case LastQueryMode.Preserved:
|
||||
LastQuerySelected = true;
|
||||
break;
|
||||
case LastQueryMode.Selected:
|
||||
LastQuerySelected = false;
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentException($"wrong LastQueryMode: <{_settings.LastQueryMode}>");
|
||||
}
|
||||
MainWindowVisibility = Visibility.Collapsed;
|
||||
}
|
||||
}
|
||||
|
||||
public void Hide()
|
||||
{
|
||||
if (MainWindowVisibility != Visibility.Collapsed)
|
||||
{
|
||||
ToggleFlowLauncher();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Checks if Flow Launcher should ignore any hotkeys
|
||||
/// </summary>
|
||||
public bool ShouldIgnoreHotkeys()
|
||||
{
|
||||
return _settings.IgnoreHotkeysOnFullscreen && WindowsInteropHelper.IsWindowFullscreen();
|
||||
}
|
||||
|
||||
|
||||
|
||||
#region Public Methods
|
||||
|
||||
public void Save()
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ namespace Flow.Launcher.ViewModel
|
|||
public Visibility ActionKeywordsVisibility => PluginPair.Metadata.ActionKeywords.Count == 1 ? Visibility.Visible : Visibility.Collapsed;
|
||||
public string InitilizaTime => PluginPair.Metadata.InitTime.ToString() + "ms";
|
||||
public string QueryTime => PluginPair.Metadata.AvgQueryTime + "ms";
|
||||
public string ActionKeywordsText => string.Join(Query.ActionKeywordSeperater, PluginPair.Metadata.ActionKeywords);
|
||||
public string ActionKeywordsText => string.Join(Query.ActionKeywordSeparator, PluginPair.Metadata.ActionKeywords);
|
||||
public int Priority => PluginPair.Metadata.Priority;
|
||||
|
||||
public void ChangeActionKeyword(string newActionKeyword, string oldActionKeyword)
|
||||
|
|
|
|||
|
|
@ -44,13 +44,42 @@ namespace Flow.Launcher.ViewModel
|
|||
private Settings Settings { get; }
|
||||
|
||||
public Visibility ShowOpenResultHotkey =>
|
||||
Settings.ShowOpenResultHotkey ? Visibility.Visible : Visibility.Hidden;
|
||||
Settings.ShowOpenResultHotkey ? Visibility.Visible : Visibility.Collapsed;
|
||||
|
||||
public Visibility ShowIcon => Result.IcoPath != null || Result.Icon is not null || Glyph == null
|
||||
? Visibility.Visible
|
||||
: Visibility.Hidden;
|
||||
public Visibility ShowIcon
|
||||
{
|
||||
get
|
||||
{
|
||||
// If both glyph and image icons are not available, it will then be the default icon
|
||||
if (!ImgIconAvailable && !GlyphAvailable)
|
||||
return Visibility.Visible;
|
||||
|
||||
// Although user can choose to use glyph icons, plugins may choose to supply only image icons.
|
||||
// In this case we ignore the setting because otherwise icons will not display as intended
|
||||
if (Settings.UseGlyphIcons && !GlyphAvailable && ImgIconAvailable)
|
||||
return Visibility.Visible;
|
||||
|
||||
return !Settings.UseGlyphIcons && ImgIconAvailable ? Visibility.Visible : Visibility.Hidden;
|
||||
}
|
||||
}
|
||||
|
||||
public Visibility ShowGlyph
|
||||
{
|
||||
get
|
||||
{
|
||||
// Although user can choose to not use glyph icons, plugins may choose to supply only glyph icons.
|
||||
// In this case we ignore the setting because otherwise icons will not display as intended
|
||||
if (!Settings.UseGlyphIcons && !ImgIconAvailable && GlyphAvailable)
|
||||
return Visibility.Visible;
|
||||
|
||||
return Settings.UseGlyphIcons && GlyphAvailable ? Visibility.Visible : Visibility.Hidden;
|
||||
}
|
||||
}
|
||||
|
||||
private bool GlyphAvailable => Glyph is not null;
|
||||
|
||||
private bool ImgIconAvailable => !string.IsNullOrEmpty(Result.IcoPath) || Result.Icon is not null;
|
||||
|
||||
public Visibility ShowGlyph => Glyph is not null ? Visibility.Visible : Visibility.Hidden;
|
||||
public string OpenResultModifiers => Settings.OpenResultModifiers;
|
||||
|
||||
public string ShowTitleToolTip => string.IsNullOrEmpty(Result.TitleToolTip)
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ namespace Flow.Launcher.ViewModel
|
|||
|
||||
#region Properties
|
||||
|
||||
public int MaxHeight => MaxResults * 50;
|
||||
public int MaxHeight => MaxResults * 52;
|
||||
|
||||
public int SelectedIndex { get; set; }
|
||||
|
||||
|
|
@ -166,7 +166,7 @@ namespace Flow.Launcher.ViewModel
|
|||
switch (Visbility)
|
||||
{
|
||||
case Visibility.Collapsed when Results.Count > 0:
|
||||
Margin = new Thickness { Top = 8 };
|
||||
Margin = new Thickness { Top = 0 };
|
||||
SelectedIndex = 0;
|
||||
Visbility = Visibility.Visible;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ namespace Flow.Launcher.ViewModel
|
|||
|
||||
public async void UpdateApp()
|
||||
{
|
||||
await _updater.UpdateApp(App.API, false);
|
||||
await _updater.UpdateAppAsync(App.API, false);
|
||||
}
|
||||
|
||||
public bool AutoUpdates
|
||||
|
|
@ -304,6 +304,12 @@ namespace Flow.Launcher.ViewModel
|
|||
}
|
||||
}
|
||||
|
||||
public bool UseGlyphIcons
|
||||
{
|
||||
get { return Settings.UseGlyphIcons; }
|
||||
set { Settings.UseGlyphIcons = value; }
|
||||
}
|
||||
|
||||
public Brush PreviewBackground
|
||||
{
|
||||
get
|
||||
|
|
|
|||
|
|
@ -1,56 +0,0 @@
|
|||
using BinaryAnalysis.UnidecodeSharp;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
|
||||
namespace Flow.Launcher.Plugin.BrowserBookmark
|
||||
{
|
||||
public class Bookmark : IEquatable<Bookmark>, IEqualityComparer<Bookmark>
|
||||
{
|
||||
private string m_Name;
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Name;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_Name = value;
|
||||
}
|
||||
}
|
||||
public string Url { get; set; }
|
||||
public string Source { get; set; }
|
||||
public int Score { get; set; }
|
||||
|
||||
/* TODO: since Source maybe unimportant, we just need to compare Name and Url */
|
||||
public bool Equals(Bookmark other)
|
||||
{
|
||||
return Equals(this, other);
|
||||
}
|
||||
|
||||
public bool Equals(Bookmark x, Bookmark y)
|
||||
{
|
||||
if (Object.ReferenceEquals(x, y)) return true;
|
||||
if (Object.ReferenceEquals(x, null) || Object.ReferenceEquals(y, null))
|
||||
return false;
|
||||
|
||||
return x.Name == y.Name && x.Url == y.Url;
|
||||
}
|
||||
|
||||
public int GetHashCode(Bookmark bookmark)
|
||||
{
|
||||
if (Object.ReferenceEquals(bookmark, null)) return 0;
|
||||
int hashName = bookmark.Name == null ? 0 : bookmark.Name.GetHashCode();
|
||||
int hashUrl = bookmark.Url == null ? 0 : bookmark.Url.GetHashCode();
|
||||
return hashName ^ hashUrl;
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return GetHashCode(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
using Flow.Launcher.Plugin.BrowserBookmark.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace Flow.Launcher.Plugin.BrowserBookmark
|
||||
{
|
||||
public class ChromeBookmarkLoader : ChromiumBookmarkLoader
|
||||
{
|
||||
public override List<Bookmark> GetBookmarks()
|
||||
{
|
||||
return LoadChromeBookmarks();
|
||||
}
|
||||
|
||||
private List<Bookmark> LoadChromeBookmarks()
|
||||
{
|
||||
var bookmarks = new List<Bookmark>();
|
||||
var platformPath = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
|
||||
bookmarks.AddRange(LoadBookmarks(Path.Combine(platformPath, @"Google\Chrome\User Data"), "Google Chrome"));
|
||||
bookmarks.AddRange(LoadBookmarks(Path.Combine(platformPath, @"Google\Chrome SxS\User Data"), "Google Chrome Canary"));
|
||||
bookmarks.AddRange(LoadBookmarks(Path.Combine(platformPath, @"Chromium\User Data"), "Chromium"));
|
||||
return bookmarks;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,87 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace Flow.Launcher.Plugin.BrowserBookmark
|
||||
{
|
||||
public class ChromeBookmarks
|
||||
{
|
||||
private List<Bookmark> bookmarks = new List<Bookmark>();
|
||||
|
||||
public List<Bookmark> GetBookmarks()
|
||||
{
|
||||
bookmarks.Clear();
|
||||
LoadChromeBookmarks();
|
||||
|
||||
return bookmarks;
|
||||
}
|
||||
|
||||
private void ParseChromeBookmarks(String path, string source)
|
||||
{
|
||||
if (!File.Exists(path)) return;
|
||||
|
||||
string all = File.ReadAllText(path);
|
||||
Regex nameRegex = new Regex("\"name\": \"(?<name>.*?)\"");
|
||||
MatchCollection nameCollection = nameRegex.Matches(all);
|
||||
Regex typeRegex = new Regex("\"type\": \"(?<type>.*?)\"");
|
||||
MatchCollection typeCollection = typeRegex.Matches(all);
|
||||
Regex urlRegex = new Regex("\"url\": \"(?<url>.*?)\"");
|
||||
MatchCollection urlCollection = urlRegex.Matches(all);
|
||||
|
||||
List<string> names = (from Match match in nameCollection select match.Groups["name"].Value).ToList();
|
||||
List<string> types = (from Match match in typeCollection select match.Groups["type"].Value).ToList();
|
||||
List<string> urls = (from Match match in urlCollection select match.Groups["url"].Value).ToList();
|
||||
|
||||
int urlIndex = 0;
|
||||
for (int i = 0; i < names.Count; i++)
|
||||
{
|
||||
string name = DecodeUnicode(names[i]);
|
||||
string type = types[i];
|
||||
if (type == "url")
|
||||
{
|
||||
string url = urls[urlIndex];
|
||||
urlIndex++;
|
||||
|
||||
if (url == null) continue;
|
||||
if (url.StartsWith("javascript:", StringComparison.OrdinalIgnoreCase)) continue;
|
||||
if (url.StartsWith("vbscript:", StringComparison.OrdinalIgnoreCase)) continue;
|
||||
|
||||
bookmarks.Add(new Bookmark()
|
||||
{
|
||||
Name = name,
|
||||
Url = url,
|
||||
Source = source
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void LoadChromeBookmarks(string path, string name)
|
||||
{
|
||||
if (!Directory.Exists(path)) return;
|
||||
var paths = Directory.GetDirectories(path);
|
||||
|
||||
foreach (var profile in paths)
|
||||
{
|
||||
if (File.Exists(Path.Combine(profile, "Bookmarks")))
|
||||
ParseChromeBookmarks(Path.Combine(profile, "Bookmarks"), name + (Path.GetFileName(profile) == "Default" ? "" : (" (" + Path.GetFileName(profile) + ")")));
|
||||
}
|
||||
}
|
||||
|
||||
private void LoadChromeBookmarks()
|
||||
{
|
||||
String platformPath = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
|
||||
LoadChromeBookmarks(Path.Combine(platformPath, @"Google\Chrome\User Data"), "Google Chrome");
|
||||
LoadChromeBookmarks(Path.Combine(platformPath, @"Google\Chrome SxS\User Data"), "Google Chrome Canary");
|
||||
LoadChromeBookmarks(Path.Combine(platformPath, @"Chromium\User Data"), "Chromium");
|
||||
}
|
||||
|
||||
private String DecodeUnicode(String dataStr)
|
||||
{
|
||||
Regex reg = new Regex(@"(?i)\\[uU]([0-9a-f]{4})");
|
||||
return reg.Replace(dataStr, m => ((char)Convert.ToInt32(m.Groups[1].Value, 16)).ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
using Flow.Launcher.Plugin.BrowserBookmark.Models;
|
||||
using Microsoft.AspNetCore.Authentication;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace Flow.Launcher.Plugin.BrowserBookmark
|
||||
{
|
||||
public abstract class ChromiumBookmarkLoader : IBookmarkLoader
|
||||
{
|
||||
public abstract List<Bookmark> GetBookmarks();
|
||||
protected List<Bookmark> LoadBookmarks(string browserDataPath, string name)
|
||||
{
|
||||
var bookmarks = new List<Bookmark>();
|
||||
if (!Directory.Exists(browserDataPath)) return bookmarks;
|
||||
var paths = Directory.GetDirectories(browserDataPath);
|
||||
|
||||
foreach (var profile in paths)
|
||||
{
|
||||
var bookmarkPath = Path.Combine(profile, "Bookmarks");
|
||||
if (!File.Exists(bookmarkPath))
|
||||
continue;
|
||||
|
||||
var source = name + (Path.GetFileName(profile) == "Default" ? "" : $" ({Path.GetFileName(profile)})");
|
||||
bookmarks.AddRange(LoadBookmarksFromFile(bookmarkPath, source));
|
||||
}
|
||||
return bookmarks;
|
||||
}
|
||||
|
||||
protected List<Bookmark> LoadBookmarksFromFile(string path, string source)
|
||||
{
|
||||
if (!File.Exists(path))
|
||||
return new();
|
||||
var bookmarks = new List<Bookmark>();
|
||||
using var jsonDocument = JsonDocument.Parse(File.ReadAllText(path));
|
||||
if (!jsonDocument.RootElement.TryGetProperty("roots", out var rootElement))
|
||||
return new();
|
||||
foreach (var folder in rootElement.EnumerateObject())
|
||||
{
|
||||
EnumerateFolderBookmark(folder.Value, bookmarks, source);
|
||||
}
|
||||
return bookmarks;
|
||||
}
|
||||
|
||||
private void EnumerateFolderBookmark(JsonElement folderElement, List<Bookmark> bookmarks, string source)
|
||||
{
|
||||
foreach (var subElement in folderElement.GetProperty("children").EnumerateArray())
|
||||
{
|
||||
switch (subElement.GetProperty("type").GetString())
|
||||
{
|
||||
case "folder":
|
||||
EnumerateFolderBookmark(subElement, bookmarks, source);
|
||||
break;
|
||||
default:
|
||||
bookmarks.Add(new Bookmark(
|
||||
subElement.GetProperty("name").GetString(),
|
||||
subElement.GetProperty("url").GetString(),
|
||||
source));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Flow.Launcher.Infrastructure;
|
||||
using Flow.Launcher.Plugin.BrowserBookmark.Models;
|
||||
using Flow.Launcher.Plugin.SharedModels;
|
||||
|
||||
namespace Flow.Launcher.Plugin.BrowserBookmark.Commands
|
||||
{
|
||||
internal static class BookmarkLoader
|
||||
{
|
||||
internal static MatchResult MatchProgram(Bookmark bookmark, string queryString)
|
||||
{
|
||||
var match = StringMatcher.FuzzySearch(queryString, bookmark.Name);
|
||||
if (match.IsSearchPrecisionScoreMet())
|
||||
return match;
|
||||
|
||||
return StringMatcher.FuzzySearch(queryString, bookmark.Url);
|
||||
}
|
||||
|
||||
internal static List<Bookmark> LoadAllBookmarks(Settings setting)
|
||||
{
|
||||
|
||||
var chromeBookmarks = new ChromeBookmarkLoader();
|
||||
var mozBookmarks = new FirefoxBookmarkLoader();
|
||||
var edgeBookmarks = new EdgeBookmarkLoader();
|
||||
|
||||
var allBookmarks = new List<Bookmark>();
|
||||
|
||||
// Add Firefox bookmarks
|
||||
allBookmarks.AddRange(mozBookmarks.GetBookmarks());
|
||||
|
||||
// Add Chrome bookmarks
|
||||
allBookmarks.AddRange(chromeBookmarks.GetBookmarks());
|
||||
|
||||
// Add Edge (Chromium) bookmarks
|
||||
allBookmarks.AddRange(edgeBookmarks.GetBookmarks());
|
||||
|
||||
foreach (var browser in setting.CustomChromiumBrowsers)
|
||||
{
|
||||
var loader = new CustomChromiumBookmarkLoader(browser);
|
||||
allBookmarks.AddRange(loader.GetBookmarks());
|
||||
}
|
||||
|
||||
return allBookmarks.Distinct().ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Flow.Launcher.Infrastructure;
|
||||
using Flow.Launcher.Plugin.SharedModels;
|
||||
|
||||
namespace Flow.Launcher.Plugin.BrowserBookmark.Commands
|
||||
{
|
||||
internal static class Bookmarks
|
||||
{
|
||||
internal static MatchResult MatchProgram(Bookmark bookmark, string queryString)
|
||||
{
|
||||
var match = StringMatcher.FuzzySearch(queryString, bookmark.Name);
|
||||
if (match.IsSearchPrecisionScoreMet())
|
||||
return match;
|
||||
|
||||
return StringMatcher.FuzzySearch(queryString, bookmark.Url);
|
||||
}
|
||||
|
||||
internal static List<Bookmark> LoadAllBookmarks()
|
||||
{
|
||||
var allbookmarks = new List<Bookmark>();
|
||||
|
||||
var chromeBookmarks = new ChromeBookmarks();
|
||||
var mozBookmarks = new FirefoxBookmarks();
|
||||
var edgeBookmarks = new EdgeBookmarks();
|
||||
|
||||
//TODO: Let the user select which browser's bookmarks are displayed
|
||||
// Add Firefox bookmarks
|
||||
mozBookmarks.GetBookmarks().ForEach(x => allbookmarks.Add(x));
|
||||
|
||||
// Add Chrome bookmarks
|
||||
chromeBookmarks.GetBookmarks().ForEach(x => allbookmarks.Add(x));
|
||||
|
||||
// Add Edge (Chromium) bookmarks
|
||||
edgeBookmarks.GetBookmarks().ForEach(x => allbookmarks.Add(x));
|
||||
|
||||
return allbookmarks.Distinct().ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
using Flow.Launcher.Plugin.BrowserBookmark.Models;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Flow.Launcher.Plugin.BrowserBookmark
|
||||
{
|
||||
public class CustomChromiumBookmarkLoader : ChromiumBookmarkLoader
|
||||
{
|
||||
public CustomChromiumBookmarkLoader(CustomBrowser browser)
|
||||
{
|
||||
BrowserName = browser.Name;
|
||||
BrowserDataPath = browser.DataDirectoryPath;
|
||||
}
|
||||
public string BrowserDataPath { get; init; }
|
||||
public string BookmarkFilePath { get; init; }
|
||||
public string BrowserName { get; init; }
|
||||
|
||||
public override List<Bookmark> GetBookmarks() => BrowserDataPath != null ? LoadBookmarks(BrowserDataPath, BrowserName) : LoadBookmarksFromFile(BookmarkFilePath, BrowserName);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
using Flow.Launcher.Plugin.BrowserBookmark.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text.Json;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace Flow.Launcher.Plugin.BrowserBookmark
|
||||
{
|
||||
public class EdgeBookmarkLoader : ChromiumBookmarkLoader
|
||||
{
|
||||
private List<Bookmark> LoadEdgeBookmarks()
|
||||
{
|
||||
var bookmarks = new List<Bookmark>();
|
||||
var platformPath = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
|
||||
bookmarks.AddRange(LoadBookmarks(Path.Combine(platformPath, @"Microsoft\Edge\User Data"), "Microsoft Edge"));
|
||||
bookmarks.AddRange(LoadBookmarks(Path.Combine(platformPath, @"Microsoft\Edge Dev\User Data"), "Microsoft Edge Dev"));
|
||||
bookmarks.AddRange(LoadBookmarks(Path.Combine(platformPath, @"Microsoft\Edge SxS\User Data"), "Microsoft Edge Canary"));
|
||||
|
||||
return bookmarks;
|
||||
}
|
||||
|
||||
public override List<Bookmark> GetBookmarks() => LoadEdgeBookmarks();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,87 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace Flow.Launcher.Plugin.BrowserBookmark
|
||||
{
|
||||
public class EdgeBookmarks
|
||||
{
|
||||
private List<Bookmark> bookmarks = new List<Bookmark>();
|
||||
|
||||
public List<Bookmark> GetBookmarks()
|
||||
{
|
||||
bookmarks.Clear();
|
||||
LoadEdgeBookmarks();
|
||||
|
||||
return bookmarks;
|
||||
}
|
||||
|
||||
private void ParseEdgeBookmarks(string path, string source)
|
||||
{
|
||||
if (!File.Exists(path)) return;
|
||||
|
||||
string all = File.ReadAllText(path);
|
||||
Regex nameRegex = new Regex("\"name\": \"(?<name>.*?)\"");
|
||||
MatchCollection nameCollection = nameRegex.Matches(all);
|
||||
Regex typeRegex = new Regex("\"type\": \"(?<type>.*?)\"");
|
||||
MatchCollection typeCollection = typeRegex.Matches(all);
|
||||
Regex urlRegex = new Regex("\"url\": \"(?<url>.*?)\"");
|
||||
MatchCollection urlCollection = urlRegex.Matches(all);
|
||||
|
||||
List<string> names = (from Match match in nameCollection select match.Groups["name"].Value).ToList();
|
||||
List<string> types = (from Match match in typeCollection select match.Groups["type"].Value).ToList();
|
||||
List<string> urls = (from Match match in urlCollection select match.Groups["url"].Value).ToList();
|
||||
|
||||
int urlIndex = 0;
|
||||
for (int i = 0; i < names.Count; i++)
|
||||
{
|
||||
string name = DecodeUnicode(names[i]);
|
||||
string type = types[i];
|
||||
if (type == "url")
|
||||
{
|
||||
string url = urls[urlIndex];
|
||||
urlIndex++;
|
||||
|
||||
if (url == null) continue;
|
||||
if (url.StartsWith("javascript:", StringComparison.OrdinalIgnoreCase)) continue;
|
||||
if (url.StartsWith("vbscript:", StringComparison.OrdinalIgnoreCase)) continue;
|
||||
|
||||
bookmarks.Add(new Bookmark()
|
||||
{
|
||||
Name = name,
|
||||
Url = url,
|
||||
Source = source
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void LoadEdgeBookmarks(string path, string name)
|
||||
{
|
||||
if (!Directory.Exists(path)) return;
|
||||
var paths = Directory.GetDirectories(path);
|
||||
|
||||
foreach (var profile in paths)
|
||||
{
|
||||
if (File.Exists(Path.Combine(profile, "Bookmarks")))
|
||||
ParseEdgeBookmarks(Path.Combine(profile, "Bookmarks"), name + (Path.GetFileName(profile) == "Default" ? "" : (" (" + Path.GetFileName(profile) + ")")));
|
||||
}
|
||||
}
|
||||
|
||||
private void LoadEdgeBookmarks()
|
||||
{
|
||||
string platformPath = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
|
||||
LoadEdgeBookmarks(Path.Combine(platformPath, @"Microsoft\Edge\User Data"), "Microsoft Edge");
|
||||
LoadEdgeBookmarks(Path.Combine(platformPath, @"Microsoft\Edge Dev\User Data"), "Microsoft Edge Dev");
|
||||
LoadEdgeBookmarks(Path.Combine(platformPath, @"Microsoft\Edge SxS\User Data"), "Microsoft Edge Canary");
|
||||
}
|
||||
|
||||
private string DecodeUnicode(string dataStr)
|
||||
{
|
||||
Regex reg = new Regex(@"(?i)\\[uU]([0-9a-f]{4})");
|
||||
return reg.Replace(dataStr, m => ((char)Convert.ToInt32(m.Groups[1].Value, 16)).ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
using Flow.Launcher.Plugin.BrowserBookmark.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.SQLite;
|
||||
|
|
@ -6,7 +7,7 @@ using System.Linq;
|
|||
|
||||
namespace Flow.Launcher.Plugin.BrowserBookmark
|
||||
{
|
||||
public class FirefoxBookmarks
|
||||
public class FirefoxBookmarkLoader : IBookmarkLoader
|
||||
{
|
||||
private const string queryAllBookmarks = @"SELECT moz_places.url, moz_bookmarks.title
|
||||
FROM moz_places
|
||||
|
|
@ -27,10 +28,10 @@ namespace Flow.Launcher.Plugin.BrowserBookmark
|
|||
if (string.IsNullOrEmpty(PlacesPath) || !File.Exists(PlacesPath))
|
||||
return new List<Bookmark>();
|
||||
|
||||
var bookmarList = new List<Bookmark>();
|
||||
var bookmarkList = new List<Bookmark>();
|
||||
|
||||
// create the connection string and init the connection
|
||||
string dbPath = string.Format(dbPathFormat, PlacesPath);
|
||||
string dbPath = string.Format(dbPathFormat, PlacesPath);
|
||||
using (var dbConnection = new SQLiteConnection(dbPath))
|
||||
{
|
||||
// Open connection to the database file and execute the query
|
||||
|
|
@ -38,14 +39,13 @@ namespace Flow.Launcher.Plugin.BrowserBookmark
|
|||
var reader = new SQLiteCommand(queryAllBookmarks, dbConnection).ExecuteReader();
|
||||
|
||||
// return results in List<Bookmark> format
|
||||
bookmarList = reader.Select(x => new Bookmark()
|
||||
{
|
||||
Name = (x["title"] is DBNull) ? string.Empty : x["title"].ToString(),
|
||||
Url = x["url"].ToString()
|
||||
}).ToList();
|
||||
bookmarkList = reader.Select(
|
||||
x => new Bookmark(x["title"] is DBNull ? string.Empty : x["title"].ToString(),
|
||||
x["url"].ToString())
|
||||
).ToList();
|
||||
}
|
||||
|
||||
return bookmarList;
|
||||
return bookmarkList;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -63,7 +63,8 @@ namespace Flow.Launcher.Plugin.BrowserBookmark
|
|||
|
||||
// get firefox default profile directory from profiles.ini
|
||||
string ini;
|
||||
using (var sReader = new StreamReader(profileIni)) {
|
||||
using (var sReader = new StreamReader(profileIni))
|
||||
{
|
||||
ini = sReader.ReadToEnd();
|
||||
}
|
||||
|
||||
|
|
@ -95,7 +96,10 @@ namespace Flow.Launcher.Plugin.BrowserBookmark
|
|||
Version=2
|
||||
*/
|
||||
|
||||
var lines = ini.Split(new string[] { "\r\n" }, StringSplitOptions.None).ToList();
|
||||
var lines = ini.Split(new string[]
|
||||
{
|
||||
"\r\n"
|
||||
}, StringSplitOptions.None).ToList();
|
||||
|
||||
var defaultProfileFolderNameRaw = lines.Where(x => x.Contains("Default=") && x != "Default=1").FirstOrDefault() ?? string.Empty;
|
||||
|
||||
|
|
@ -104,14 +108,14 @@ namespace Flow.Launcher.Plugin.BrowserBookmark
|
|||
|
||||
var defaultProfileFolderName = defaultProfileFolderNameRaw.Split('=').Last();
|
||||
|
||||
var indexOfDefaultProfileAtttributePath = lines.IndexOf("Path="+ defaultProfileFolderName);
|
||||
var indexOfDefaultProfileAtttributePath = lines.IndexOf("Path=" + defaultProfileFolderName);
|
||||
|
||||
// Seen in the example above, the IsRelative attribute is always above the Path attribute
|
||||
var relativeAttribute = lines[indexOfDefaultProfileAtttributePath - 1];
|
||||
|
||||
return relativeAttribute == "0" // See above, the profile is located in a custom location, path is not relative, so IsRelative=0
|
||||
? defaultProfileFolderName + @"\places.sqlite"
|
||||
: Path.Combine(profileFolderPath, defaultProfileFolderName) + @"\places.sqlite";
|
||||
? defaultProfileFolderName + @"\places.sqlite"
|
||||
: Path.Combine(profileFolderPath, defaultProfileFolderName) + @"\places.sqlite";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -126,4 +130,4 @@ namespace Flow.Launcher.Plugin.BrowserBookmark
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -69,4 +69,8 @@
|
|||
<PackageReference Include="UnidecodeSharp" Version="1.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Remove="Bookmark.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
using Flow.Launcher.Plugin.BrowserBookmark.Models;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Flow.Launcher.Plugin.BrowserBookmark
|
||||
{
|
||||
public interface IBookmarkLoader
|
||||
{
|
||||
public List<Bookmark> GetBookmarks();
|
||||
}
|
||||
}
|
||||
|
|
@ -14,4 +14,9 @@
|
|||
<system:String x:Key="flowlauncher_plugin_browserbookmark_settings_choose">Choose</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_browserbookmark_copyurl_title">Copy url</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_browserbookmark_copyurl_subtitle">Copy the bookmark's url to clipboard</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_browserbookmark_loadBrowserFrom">Load Browser From:</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_browserbookmark_browserName">Browser Name</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_browserbookmark_browserBookmarkDataDirectory">DataDirectoryPath</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_browserbookmark_addBrowserBookmark">Add</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_browserbookmark_removeBrowserBookmark">Delete</system:String>
|
||||
</ResourceDictionary>
|
||||
|
|
@ -14,4 +14,9 @@
|
|||
<system:String x:Key="flowlauncher_plugin_browserbookmark_settings_choose">Prehliadať</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_browserbookmark_copyurl_title">Kopírovať URL</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_browserbookmark_copyurl_subtitle">Kopírovať URL záložky do schránky</system:String>
|
||||
</ResourceDictionary>
|
||||
<system:String x:Key="flowlauncher_plugin_browserbookmark_loadBrowserFrom" >Načítať prehliadač z:</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_browserbookmark_browserName">Názov prehliadača</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_browserbookmark_browserBookDataDirectory">Umiestnenie priečinka Data</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_browserbookmark_addBrowserBookmark">Pridať</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_browserbookmark_removeBrowserBookmark">Odstrániť</system:String>
|
||||
</ResourceDictionary>
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ namespace Flow.Launcher.Plugin.BrowserBookmark
|
|||
|
||||
_settings = context.API.LoadSettingJsonStorage<Settings>();
|
||||
|
||||
cachedBookmarks = Bookmarks.LoadAllBookmarks();
|
||||
cachedBookmarks = BookmarkLoader.LoadAllBookmarks(_settings);
|
||||
}
|
||||
|
||||
public List<Result> Query(Query query)
|
||||
|
|
@ -45,7 +45,7 @@ namespace Flow.Launcher.Plugin.BrowserBookmark
|
|||
Title = c.Name,
|
||||
SubTitle = c.Url,
|
||||
IcoPath = @"Images\bookmark.png",
|
||||
Score = Bookmarks.MatchProgram(c, param).Score,
|
||||
Score = BookmarkLoader.MatchProgram(c, param).Score,
|
||||
Action = _ =>
|
||||
{
|
||||
if (_settings.OpenInNewBrowserWindow)
|
||||
|
|
@ -93,7 +93,7 @@ namespace Flow.Launcher.Plugin.BrowserBookmark
|
|||
{
|
||||
cachedBookmarks.Clear();
|
||||
|
||||
cachedBookmarks = Bookmarks.LoadAllBookmarks();
|
||||
cachedBookmarks = BookmarkLoader.LoadAllBookmarks(_settings);
|
||||
}
|
||||
|
||||
public string GetTranslatedPluginTitle()
|
||||
|
|
|
|||
|
|
@ -0,0 +1,22 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace Flow.Launcher.Plugin.BrowserBookmark.Models
|
||||
{
|
||||
// Source may be important in the future
|
||||
public record Bookmark(string Name, string Url, string Source = "")
|
||||
{
|
||||
public override int GetHashCode()
|
||||
{
|
||||
var hashName = Name?.GetHashCode() ?? 0;
|
||||
var hashUrl = Url?.GetHashCode() ?? 0;
|
||||
return hashName ^ hashUrl;
|
||||
}
|
||||
|
||||
public virtual bool Equals(Bookmark other)
|
||||
{
|
||||
return other != null && Name == other.Name && Url == other.Url;
|
||||
}
|
||||
|
||||
public List<CustomBrowser> CustomBrowsers { get; set; }= new();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
namespace Flow.Launcher.Plugin.BrowserBookmark.Models
|
||||
{
|
||||
public class CustomBrowser : BaseModel
|
||||
{
|
||||
private string _name;
|
||||
private string _dataDirectoryPath;
|
||||
public string Name
|
||||
{
|
||||
get => _name;
|
||||
set
|
||||
{
|
||||
_name = value;
|
||||
OnPropertyChanged(nameof(Name));
|
||||
}
|
||||
}
|
||||
public string DataDirectoryPath
|
||||
{
|
||||
get => _dataDirectoryPath;
|
||||
set
|
||||
{
|
||||
_dataDirectoryPath = value;
|
||||
OnPropertyChanged(nameof(DataDirectoryPath));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,9 +1,15 @@
|
|||
namespace Flow.Launcher.Plugin.BrowserBookmark.Models
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Flow.Launcher.Plugin.BrowserBookmark.Models
|
||||
{
|
||||
public class Settings : BaseModel
|
||||
{
|
||||
public bool OpenInNewBrowserWindow { get; set; } = true;
|
||||
|
||||
public string BrowserPath { get; set; }
|
||||
|
||||
public ObservableCollection<CustomBrowser> CustomChromiumBrowsers { get; set; } = new();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
<Window x:Class="Flow.Launcher.Plugin.BrowserBookmark.Views.CustomBrowserSettingWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:Flow.Launcher.Plugin.BrowserBookmark.Models"
|
||||
mc:Ignorable="d"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
Title="CustomBrowserSetting" Height="350" Width="600"
|
||||
KeyDown="WindowKeyDown"
|
||||
>
|
||||
<Window.DataContext>
|
||||
<local:CustomBrowser/>
|
||||
</Window.DataContext>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="100"/>
|
||||
<RowDefinition Height="100"/>
|
||||
<RowDefinition Height="60"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="6*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Grid.Row="0" Grid.Column="0" Text="Browser Name" FontSize="15"
|
||||
HorizontalAlignment="Left" VerticalAlignment="Center" Margin="80 0 0 0"/>
|
||||
<TextBlock Grid.Row="1" Grid.Column="0" Text="Browser Data Directory Path" FontSize="15"
|
||||
HorizontalAlignment="Left" VerticalAlignment="Center" Margin="80 0 0 0"/>
|
||||
<TextBox Grid.Row="0" Grid.Column="1" Text="{Binding Name}"
|
||||
HorizontalAlignment="Left" VerticalAlignment="Center" Width="100" Height="30" Margin="50 0 0 0"/>
|
||||
<TextBox Grid.Row="1" Grid.Column="1" Text="{Binding DataDirectoryPath}"
|
||||
HorizontalAlignment="Left" VerticalAlignment="Center" Width="200" Height="30" Margin="50 0 0 0"/>
|
||||
<StackPanel HorizontalAlignment="Center" Grid.Row="2" Orientation="Horizontal" Grid.Column="1" Height="70">
|
||||
<Button Name="btnConfirm" Content="Confirm" Margin="15" Click="ConfirmCancelEditCustomBrowser"/>
|
||||
<Button Content="Cancel" Margin="15" Click="ConfirmCancelEditCustomBrowser"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Window>
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
using Flow.Launcher.Plugin.BrowserBookmark.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace Flow.Launcher.Plugin.BrowserBookmark.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for CustomBrowserSetting.xaml
|
||||
/// </summary>
|
||||
public partial class CustomBrowserSettingWindow : Window
|
||||
{
|
||||
private CustomBrowser currentCustomBrowser;
|
||||
public CustomBrowserSettingWindow(CustomBrowser browser)
|
||||
{
|
||||
InitializeComponent();
|
||||
currentCustomBrowser = browser;
|
||||
DataContext = new CustomBrowser
|
||||
{
|
||||
Name = browser.Name, DataDirectoryPath = browser.DataDirectoryPath
|
||||
};
|
||||
}
|
||||
|
||||
private void ConfirmCancelEditCustomBrowser(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (DataContext is CustomBrowser editBrowser && e.Source is Button button)
|
||||
{
|
||||
if (button.Name == "btnConfirm")
|
||||
{
|
||||
currentCustomBrowser.Name = editBrowser.Name;
|
||||
currentCustomBrowser.DataDirectoryPath = editBrowser.DataDirectoryPath;
|
||||
Close();
|
||||
}
|
||||
}
|
||||
|
||||
Close();
|
||||
}
|
||||
|
||||
private void WindowKeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (e.Key == Key.Enter)
|
||||
{
|
||||
ConfirmCancelEditCustomBrowser(sender, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -5,21 +5,23 @@
|
|||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
Background="White"
|
||||
d:DesignHeight="300" d:DesignWidth="500">
|
||||
<Grid>
|
||||
d:DesignHeight="300" d:DesignWidth="500"
|
||||
DataContext="{Binding RelativeSource={RelativeSource Self}}">
|
||||
<Grid Margin="10">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="90" />
|
||||
<RowDefinition />
|
||||
<RowDefinition Height="50" />
|
||||
<RowDefinition Height="80"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel>
|
||||
<Grid Grid.Row="0" Margin="40 40 0 0">
|
||||
<Grid Grid.Row="0" Margin="30 20 0 0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="160" />
|
||||
<ColumnDefinition Width="140"/>
|
||||
<ColumnDefinition Width="100"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Label Grid.Column="0" Content="{DynamicResource flowlauncher_plugin_browserbookmark_settings_openBookmarks}"
|
||||
FontSize="15" Margin="0 5 0 0"/>
|
||||
FontSize="15" Margin="10 5 0 0"/>
|
||||
<RadioButton Grid.Column="1" Name="NewWindowBrowser" GroupName="OpenSearchBehaviour"
|
||||
Content="{DynamicResource flowlauncher_plugin_browserbookmark_settings_newWindow}"
|
||||
Click="OnNewBrowserWindowClick" />
|
||||
|
|
@ -28,12 +30,44 @@
|
|||
Click="OnNewTabClick" />
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
<StackPanel VerticalAlignment="Top" Grid.Row="1" Height="106" Margin="41,13,0,0">
|
||||
<StackPanel Orientation="Horizontal" VerticalAlignment="Top" Grid.Row="1" Height="60" Margin="30,20,0,0">
|
||||
<Label Content="{DynamicResource flowlauncher_plugin_browserbookmark_settings_setBrowserFromPath}"
|
||||
Height="28" Margin="0,0,155,0" HorizontalAlignment="Left" Width="290"/>
|
||||
<TextBox x:Name="browserPathBox" HorizontalAlignment="Left" Height="34" TextWrapping="NoWrap" VerticalAlignment="Top" Width="311" RenderTransformOrigin="0.502,-1.668" TextChanged="OnBrowserPathTextChanged" />
|
||||
<Button x:Name="viewButton" Content="{DynamicResource flowlauncher_plugin_browserbookmark_settings_choose}"
|
||||
HorizontalAlignment="Left" Margin="340,-35,-1,0" Width="100" Height="34" Click="OnChooseClick" FontSize="14" />
|
||||
Height="28" Margin="10"/>
|
||||
<TextBox x:Name="BrowserPathBox"
|
||||
HorizontalAlignment="Left"
|
||||
Height="30"
|
||||
TextWrapping="NoWrap"
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding Settings.BrowserPath}"
|
||||
Width="240"
|
||||
Margin="10"/>
|
||||
<Button x:Name="ViewButton" Content="{DynamicResource flowlauncher_plugin_browserbookmark_settings_choose}"
|
||||
HorizontalAlignment="Left" Margin="10" Width="100" Height="30" Click="OnChooseClick" FontSize="14" />
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Row="2" Orientation="Vertical" Margin="30,20,0,0">
|
||||
<TextBlock Text="{DynamicResource flowlauncher_plugin_browserbookmark_loadBrowserFrom}" Margin="10"/>
|
||||
<ListView Grid.Row="2" ItemsSource="{Binding Settings.CustomChromiumBrowsers}"
|
||||
SelectedItem="{Binding SelectedCustomBrowser}"
|
||||
Margin="10"
|
||||
BorderBrush="DarkGray"
|
||||
BorderThickness="1"
|
||||
Style="{StaticResource {x:Static GridView.GridViewStyleKey}}"
|
||||
Height="auto"
|
||||
Name="CustomBrowsers"
|
||||
MouseDoubleClick="MouseDoubleClickOnSelectedCustomBrowser">
|
||||
<ListView.View>
|
||||
<GridView>
|
||||
<GridViewColumn DisplayMemberBinding="{Binding Name, Mode=OneWay}" Header="{DynamicResource flowlauncher_plugin_browserbookmark_browserName}"/>
|
||||
<GridViewColumn DisplayMemberBinding="{Binding DataDirectoryPath, Mode=OneWay}" Header="{DynamicResource flowlauncher_plugin_browserbookmark_browserBookmarkDataDirectory}"/>
|
||||
</GridView>
|
||||
</ListView.View>
|
||||
</ListView>
|
||||
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
|
||||
<Button Content="{DynamicResource flowlauncher_plugin_browserbookmark_addBrowserBookmark}"
|
||||
Margin="10" Click="NewCustomBrowser" Width="80" />
|
||||
<Button Content="{DynamicResource flowlauncher_plugin_browserbookmark_removeBrowserBookmark}"
|
||||
Margin="10" Click="DeleteCustomBrowser" Width="80"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
|
@ -2,33 +2,34 @@ using Microsoft.Win32;
|
|||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using Flow.Launcher.Plugin.BrowserBookmark.Models;
|
||||
using System.Windows.Input;
|
||||
|
||||
namespace Flow.Launcher.Plugin.BrowserBookmark.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for BrowserBookmark.xaml
|
||||
/// </summary>
|
||||
public partial class SettingsControl : UserControl
|
||||
public partial class SettingsControl
|
||||
{
|
||||
private readonly Settings _settings;
|
||||
public Settings Settings { get; }
|
||||
public CustomBrowser SelectedCustomBrowser { get; set; }
|
||||
|
||||
public SettingsControl(Settings settings)
|
||||
{
|
||||
Settings = settings;
|
||||
InitializeComponent();
|
||||
_settings = settings;
|
||||
browserPathBox.Text = _settings.BrowserPath;
|
||||
NewWindowBrowser.IsChecked = _settings.OpenInNewBrowserWindow;
|
||||
NewTabInBrowser.IsChecked = !_settings.OpenInNewBrowserWindow;
|
||||
NewWindowBrowser.IsChecked = Settings.OpenInNewBrowserWindow;
|
||||
NewTabInBrowser.IsChecked = !Settings.OpenInNewBrowserWindow;
|
||||
}
|
||||
|
||||
private void OnNewBrowserWindowClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
_settings.OpenInNewBrowserWindow = true;
|
||||
Settings.OpenInNewBrowserWindow = true;
|
||||
}
|
||||
|
||||
private void OnNewTabClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
_settings.OpenInNewBrowserWindow = false;
|
||||
Settings.OpenInNewBrowserWindow = false;
|
||||
}
|
||||
|
||||
private void OnChooseClick(object sender, RoutedEventArgs e)
|
||||
|
|
@ -39,14 +40,39 @@ namespace Flow.Launcher.Plugin.BrowserBookmark.Views
|
|||
fileBrowserDialog.CheckPathExists = true;
|
||||
if (fileBrowserDialog.ShowDialog() == true)
|
||||
{
|
||||
browserPathBox.Text = fileBrowserDialog.FileName;
|
||||
_settings.BrowserPath = fileBrowserDialog.FileName;
|
||||
Settings.BrowserPath = fileBrowserDialog.FileName;
|
||||
}
|
||||
}
|
||||
|
||||
private void OnBrowserPathTextChanged(object sender, TextChangedEventArgs e)
|
||||
private void NewCustomBrowser(object sender, RoutedEventArgs e)
|
||||
{
|
||||
_settings.BrowserPath = browserPathBox.Text;
|
||||
var newBrowser = new CustomBrowser();
|
||||
var window = new CustomBrowserSettingWindow(newBrowser);
|
||||
window.ShowDialog();
|
||||
if (newBrowser is not
|
||||
{
|
||||
Name: null,
|
||||
DataDirectoryPath: null
|
||||
})
|
||||
{
|
||||
Settings.CustomChromiumBrowsers.Add(newBrowser);
|
||||
}
|
||||
}
|
||||
|
||||
private void DeleteCustomBrowser(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if(CustomBrowsers.SelectedItem is CustomBrowser selectedCustomBrowser)
|
||||
{
|
||||
Settings.CustomChromiumBrowsers.Remove(selectedCustomBrowser);
|
||||
}
|
||||
}
|
||||
private void MouseDoubleClickOnSelectedCustomBrowser(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
if (SelectedCustomBrowser is null)
|
||||
return;
|
||||
|
||||
var window = new CustomBrowserSettingWindow(SelectedCustomBrowser);
|
||||
window.ShowDialog();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
"Name": "Browser Bookmarks",
|
||||
"Description": "Search your browser bookmarks",
|
||||
"Author": "qianlifeng, Ioannis G.",
|
||||
"Version": "1.4.4",
|
||||
"Version": "1.5.1",
|
||||
"Language": "csharp",
|
||||
"Website": "https://github.com/Flow-Launcher/Flow.Launcher",
|
||||
"ExecuteFileName": "Flow.Launcher.Plugin.BrowserBookmark.dll",
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ namespace Flow.Launcher.Plugin.Explorer.Search.WindowsIndex
|
|||
{
|
||||
|
||||
// Reserved keywords in oleDB
|
||||
private const string reservedStringPattern = @"^[`\@\#\^,\&\/\\\$\%_]+$";
|
||||
private const string reservedStringPattern = @"^[`\@\#\^,\&\/\\\$\%_;\[\]]+$";
|
||||
|
||||
internal static async Task<List<Result>> ExecuteWindowsIndexSearchAsync(string indexQueryString, string connectionString, Query query, CancellationToken token)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
"Name": "Explorer",
|
||||
"Description": "Search and manage files and folders. Explorer utilises Windows Index Search",
|
||||
"Author": "Jeremy Wu",
|
||||
"Version": "1.9.0",
|
||||
"Version": "1.9.1",
|
||||
"Language": "csharp",
|
||||
"Website": "https://github.com/Flow-Launcher/Flow.Launcher",
|
||||
"ExecuteFileName": "Flow.Launcher.Plugin.Explorer.dll",
|
||||
|
|
|
|||
|
|
@ -12,11 +12,11 @@ namespace Flow.Launcher.Plugin.PluginIndicator
|
|||
{
|
||||
// if query contains more than one word, eg. github tips
|
||||
// user has decided to type something else rather than wanting to see the available action keywords
|
||||
if (query.Terms.Length > 1)
|
||||
if (query.SearchTerms.Length > 1)
|
||||
return new List<Result>();
|
||||
|
||||
var results = from keyword in PluginManager.NonGlobalPlugins.Keys
|
||||
where keyword.StartsWith(query.Terms[0])
|
||||
where keyword.StartsWith(query.SearchTerms[0])
|
||||
let metadata = PluginManager.NonGlobalPlugins[keyword].Metadata
|
||||
where !metadata.Disabled
|
||||
select new Result
|
||||
|
|
@ -27,7 +27,7 @@ namespace Flow.Launcher.Plugin.PluginIndicator
|
|||
IcoPath = metadata.IcoPath,
|
||||
Action = c =>
|
||||
{
|
||||
context.API.ChangeQuery($"{keyword}{Plugin.Query.TermSeperater}");
|
||||
context.API.ChangeQuery($"{keyword}{Plugin.Query.TermSeparator}");
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ namespace Flow.Launcher.Plugin.PluginsManager.Models
|
|||
{
|
||||
try
|
||||
{
|
||||
await using var jsonStream = await Http.GetStreamAsync("https://raw.githubusercontent.com/Flow-Launcher/Flow.Launcher.PluginsManifest/plugin_api_v2/plugins.json")
|
||||
await using var jsonStream = await Http.GetStreamAsync("https://cdn.jsdelivr.net/gh/Flow-Launcher/Flow.Launcher.PluginsManifest/plugins.json")
|
||||
.ConfigureAwait(false);
|
||||
|
||||
UserPlugins = await JsonSerializer.DeserializeAsync<List<UserPlugin>>(jsonStream).ConfigureAwait(false);
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
"Name": "Plugins Manager",
|
||||
"Description": "Management of installing, uninstalling or updating Flow Launcher plugins",
|
||||
"Author": "Jeremy Wu",
|
||||
"Version": "1.8.5",
|
||||
"Version": "1.9.0",
|
||||
"Language": "csharp",
|
||||
"Website": "https://github.com/Flow-Launcher/Flow.Launcher",
|
||||
"ExecuteFileName": "Flow.Launcher.Plugin.PluginsManager.dll",
|
||||
|
|
|
|||
|
|
@ -23,9 +23,7 @@ namespace Flow.Launcher.Plugin.ProcessKiller
|
|||
|
||||
public List<Result> Query(Query query)
|
||||
{
|
||||
var termToSearch = query.Terms.Length <= 1
|
||||
? null
|
||||
: string.Join(Plugin.Query.TermSeperater, query.Terms.Skip(1)).ToLower();
|
||||
var termToSearch = query.Search;
|
||||
|
||||
var processlist = processHelper.GetMatchingProcesses(termToSearch);
|
||||
|
||||
|
|
|
|||
|
|
@ -190,7 +190,8 @@ namespace Flow.Launcher.Plugin.Program
|
|||
"flowlauncher_plugin_program_disable_dlgtitle_success_message"));
|
||||
return false;
|
||||
},
|
||||
IcoPath = "Images/disable.png"
|
||||
IcoPath = "Images/disable.png",
|
||||
Glyph = new GlyphInfo(FontFamily: "/Resources/#Segoe Fluent Icons", Glyph: "\xece4"),
|
||||
}
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -149,7 +149,8 @@ namespace Flow.Launcher.Plugin.Program.Programs
|
|||
|
||||
return true;
|
||||
},
|
||||
IcoPath = "Images/user.png"
|
||||
IcoPath = "Images/user.png",
|
||||
Glyph = new GlyphInfo(FontFamily: "/Resources/#Segoe Fluent Icons", Glyph: "\xe7ee"),
|
||||
},
|
||||
new Result
|
||||
{
|
||||
|
|
@ -168,7 +169,8 @@ namespace Flow.Launcher.Plugin.Program.Programs
|
|||
|
||||
return true;
|
||||
},
|
||||
IcoPath = "Images/cmd.png"
|
||||
IcoPath = "Images/cmd.png",
|
||||
Glyph = new GlyphInfo(FontFamily: "/Resources/#Segoe Fluent Icons", Glyph: "\xe7ef"),
|
||||
},
|
||||
new Result
|
||||
{
|
||||
|
|
@ -192,7 +194,8 @@ namespace Flow.Launcher.Plugin.Program.Programs
|
|||
|
||||
return true;
|
||||
},
|
||||
IcoPath = "Images/folder.png"
|
||||
IcoPath = "Images/folder.png",
|
||||
Glyph = new GlyphInfo(FontFamily: "/Resources/#Segoe Fluent Icons", Glyph: "\xe838"),
|
||||
}
|
||||
};
|
||||
return contextMenus;
|
||||
|
|
|
|||
|
|
@ -15,12 +15,12 @@
|
|||
<RowDefinition Height="50"/>
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Stretch">
|
||||
<StackPanel Orientation="Vertical" Width="250">
|
||||
<StackPanel Orientation="Vertical" Width="Auto">
|
||||
<CheckBox Name="StartMenuEnabled" IsChecked="{Binding EnableStartMenuSource}" Margin="5" Content="{DynamicResource flowlauncher_plugin_program_index_start}" ToolTip="{DynamicResource flowlauncher_plugin_program_index_start_tooltip}" />
|
||||
<CheckBox Name="RegistryEnabled" IsChecked="{Binding EnableRegistrySource}" Margin="5" Content="{DynamicResource flowlauncher_plugin_program_index_registry}" ToolTip="{DynamicResource flowlauncher_plugin_program_index_registry_tooltip}" />
|
||||
<CheckBox Name="DescriptionEnabled" IsChecked="{Binding EnableDescription}" Margin="5" Content="{DynamicResource flowlauncher_plugin_program_enable_description}" ToolTip="{DynamicResource flowlauncher_plugin_program_enable_description_tooltip}" />
|
||||
</StackPanel>
|
||||
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
|
||||
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Width="Auto">
|
||||
<Button Height="31" HorizontalAlignment="Right" Margin="10" Width="100" x:Name="btnLoadAllProgramSource" Click="btnLoadAllProgramSource_OnClick" Content="{DynamicResource flowlauncher_plugin_program_all_programs}" />
|
||||
<Button Height="31" HorizontalAlignment="Right" Margin="10" Width="100" x:Name="btnProgramSuffixes" Click="BtnProgramSuffixes_OnClick" Content="{DynamicResource flowlauncher_plugin_program_suffixes}" />
|
||||
<Button Height="31" HorizontalAlignment="Right" Margin="10" Width="100" x:Name="btnReindex" Click="btnReindex_Click" Content="{DynamicResource flowlauncher_plugin_program_reindex}" />
|
||||
|
|
|
|||
|
|
@ -325,7 +325,7 @@ namespace Flow.Launcher.Plugin.Shell
|
|||
|
||||
private void OnWinRPressed()
|
||||
{
|
||||
context.API.ChangeQuery($"{context.CurrentPluginMetadata.ActionKeywords[0]}{Plugin.Query.TermSeperater}");
|
||||
context.API.ChangeQuery($"{context.CurrentPluginMetadata.ActionKeywords[0]}{Plugin.Query.TermSeparator}");
|
||||
|
||||
// show the main window and set focus to the query box
|
||||
Window mainWindow = Application.Current.MainWindow;
|
||||
|
|
|
|||
|
|
@ -96,6 +96,7 @@ namespace Flow.Launcher.Plugin.Sys
|
|||
{
|
||||
Title = "Shutdown",
|
||||
SubTitle = context.API.GetTranslation("flowlauncher_plugin_sys_shutdown_computer"),
|
||||
Glyph = new GlyphInfo (FontFamily:"/Resources/#Segoe Fluent Icons", Glyph:"\xe7e8"),
|
||||
IcoPath = "Images\\shutdown.png",
|
||||
Action = c =>
|
||||
{
|
||||
|
|
@ -115,6 +116,7 @@ namespace Flow.Launcher.Plugin.Sys
|
|||
{
|
||||
Title = "Restart",
|
||||
SubTitle = context.API.GetTranslation("flowlauncher_plugin_sys_restart_computer"),
|
||||
Glyph = new GlyphInfo (FontFamily:"/Resources/#Segoe Fluent Icons", Glyph:"\xe777"),
|
||||
IcoPath = "Images\\restart.png",
|
||||
Action = c =>
|
||||
{
|
||||
|
|
@ -134,6 +136,7 @@ namespace Flow.Launcher.Plugin.Sys
|
|||
{
|
||||
Title = "Restart With Advanced Boot Options",
|
||||
SubTitle = context.API.GetTranslation("flowlauncher_plugin_sys_restart_advanced"),
|
||||
Glyph = new GlyphInfo (FontFamily:"/Resources/#Segoe Fluent Icons", Glyph:"\xecc5"),
|
||||
IcoPath = "Images\\restart_advanced.png",
|
||||
Action = c =>
|
||||
{
|
||||
|
|
@ -152,6 +155,7 @@ namespace Flow.Launcher.Plugin.Sys
|
|||
{
|
||||
Title = "Log Off",
|
||||
SubTitle = context.API.GetTranslation("flowlauncher_plugin_sys_log_off"),
|
||||
Glyph = new GlyphInfo (FontFamily:"/Resources/#Segoe Fluent Icons", Glyph:"\xe77b"),
|
||||
IcoPath = "Images\\logoff.png",
|
||||
Action = c => ExitWindowsEx(EWX_LOGOFF, 0)
|
||||
},
|
||||
|
|
@ -159,6 +163,7 @@ namespace Flow.Launcher.Plugin.Sys
|
|||
{
|
||||
Title = "Lock",
|
||||
SubTitle = context.API.GetTranslation("flowlauncher_plugin_sys_lock"),
|
||||
Glyph = new GlyphInfo (FontFamily:"/Resources/#Segoe Fluent Icons", Glyph:"\xe72e"),
|
||||
IcoPath = "Images\\lock.png",
|
||||
Action = c =>
|
||||
{
|
||||
|
|
@ -170,6 +175,7 @@ namespace Flow.Launcher.Plugin.Sys
|
|||
{
|
||||
Title = "Sleep",
|
||||
SubTitle = context.API.GetTranslation("flowlauncher_plugin_sys_sleep"),
|
||||
Glyph = new GlyphInfo (FontFamily:"/Resources/#Segoe Fluent Icons", Glyph:"\xec46"),
|
||||
IcoPath = "Images\\sleep.png",
|
||||
Action = c => FormsApplication.SetSuspendState(PowerState.Suspend, false, false)
|
||||
},
|
||||
|
|
@ -177,6 +183,7 @@ namespace Flow.Launcher.Plugin.Sys
|
|||
{
|
||||
Title = "Hibernate",
|
||||
SubTitle = context.API.GetTranslation("flowlauncher_plugin_sys_hibernate"),
|
||||
Glyph = new GlyphInfo (FontFamily:"/Resources/#Segoe Fluent Icons", Glyph:"\xe945"),
|
||||
IcoPath = "Images\\hibernate.png",
|
||||
Action= c =>
|
||||
{
|
||||
|
|
@ -194,6 +201,7 @@ namespace Flow.Launcher.Plugin.Sys
|
|||
Title = "Empty Recycle Bin",
|
||||
SubTitle = context.API.GetTranslation("flowlauncher_plugin_sys_emptyrecyclebin"),
|
||||
IcoPath = "Images\\recyclebin.png",
|
||||
Glyph = new GlyphInfo (FontFamily:"/Resources/#Segoe Fluent Icons", Glyph:"\xe74d"),
|
||||
Action = c =>
|
||||
{
|
||||
// http://www.pinvoke.net/default.aspx/shell32/SHEmptyRecycleBin.html
|
||||
|
|
|
|||
Loading…
Reference in a new issue