Merge branch 'dev' into dependabot/nuget/System.Data.SQLite.Core-1.0.116

This commit is contained in:
Kevin Zhang 2022-11-06 10:27:05 -06:00 committed by GitHub
commit e77be5e3da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
67 changed files with 2415 additions and 704 deletions

View file

@ -1,4 +1,6 @@
namespace Flow.Launcher.Core.ExternalPlugins using System;
namespace Flow.Launcher.Core.ExternalPlugins
{ {
public record UserPlugin public record UserPlugin
{ {
@ -12,5 +14,8 @@
public string UrlDownload { get; set; } public string UrlDownload { get; set; }
public string UrlSourceCode { get; set; } public string UrlSourceCode { get; set; }
public string IcoPath { get; set; } public string IcoPath { get; set; }
public DateTime LatestReleaseDate { get; set; }
public DateTime DateAdded { get; set; }
} }
} }

View file

@ -252,6 +252,7 @@ namespace Flow.Launcher.Infrastructure.Image
image.BeginInit(); image.BeginInit();
image.CacheOption = BitmapCacheOption.OnLoad; image.CacheOption = BitmapCacheOption.OnLoad;
image.UriSource = new Uri(path); image.UriSource = new Uri(path);
image.CreateOptions = BitmapCreateOptions.IgnoreColorProfile;
image.EndInit(); image.EndInit();
return image; return image;
} }

View file

@ -202,7 +202,11 @@ namespace Flow.Launcher.Infrastructure
if (allQuerySubstringsMatched) if (allQuerySubstringsMatched)
{ {
var nearestSpaceIndex = CalculateClosestSpaceIndex(spaceIndices, firstMatchIndex); var nearestSpaceIndex = CalculateClosestSpaceIndex(spaceIndices, firstMatchIndex);
var score = CalculateSearchScore(query, stringToCompare, firstMatchIndex - nearestSpaceIndex - 1,
// firstMatchIndex - nearestSpaceIndex - 1 is to set the firstIndex as the index of the first matched char
// preceded by a space e.g. 'world' matching 'hello world' firstIndex would be 0 not 6
// giving more weight than 'we or donald' by allowing the distance calculation to treat the starting position at after the space.
var score = CalculateSearchScore(query, stringToCompare, firstMatchIndex - nearestSpaceIndex - 1, spaceIndices,
lastMatchIndex - firstMatchIndex, allSubstringsContainedInCompareString); lastMatchIndex - firstMatchIndex, allSubstringsContainedInCompareString);
var resultList = indexList.Select(x => translationMapping?.MapToOriginalIndex(x) ?? x).Distinct().ToList(); var resultList = indexList.Select(x => translationMapping?.MapToOriginalIndex(x) ?? x).Distinct().ToList();
@ -296,7 +300,7 @@ namespace Flow.Launcher.Infrastructure
return currentQuerySubstringIndex >= querySubstringsLength; return currentQuerySubstringIndex >= querySubstringsLength;
} }
private static int CalculateSearchScore(string query, string stringToCompare, int firstIndex, int matchLen, private static int CalculateSearchScore(string query, string stringToCompare, int firstIndex, List<int> spaceIndices, int matchLen,
bool allSubstringsContainedInCompareString) bool allSubstringsContainedInCompareString)
{ {
// A match found near the beginning of a string is scored more than a match found near the end // A match found near the beginning of a string is scored more than a match found near the end
@ -304,6 +308,14 @@ namespace Flow.Launcher.Infrastructure
// while the score is lower if they are more spread out // while the score is lower if they are more spread out
var score = 100 * (query.Length + 1) / ((1 + firstIndex) + (matchLen + 1)); var score = 100 * (query.Length + 1) / ((1 + firstIndex) + (matchLen + 1));
// Give more weight to a match that is closer to the start of the string.
// if the first matched char is immediately before space and all strings are contained in the compare string e.g. 'world' matching 'hello world'
// and 'world hello', because both have 'world' immediately preceded by space, their firstIndex will be 0 when distance is calculated,
// to prevent them scoring the same, we adjust the score by deducting the number of spaces it has from the start of the string, so 'world hello'
// will score slightly higher than 'hello world' because 'hello world' has one additional space.
if (firstIndex == 0 && allSubstringsContainedInCompareString)
score -= spaceIndices.Count;
// A match with less characters assigning more weights // A match with less characters assigning more weights
if (stringToCompare.Length - query.Length < 5) if (stringToCompare.Length - query.Length < 5)
{ {

View file

@ -41,6 +41,10 @@ namespace Flow.Launcher.Infrastructure.UserSettings
public bool UseGlyphIcons { get; set; } = true; public bool UseGlyphIcons { get; set; } = true;
public bool UseAnimation { get; set; } = true; public bool UseAnimation { get; set; } = true;
public bool UseSound { get; set; } = true; public bool UseSound { get; set; } = true;
public bool UseClock { get; set; } = true;
public bool UseDate { get; set; } = false;
public string TimeFormat { get; set; } = "hh:mm tt";
public string DateFormat { get; set; } = "MM'/'dd ddd";
public bool FirstLaunch { get; set; } = true; public bool FirstLaunch { get; set; } = true;
public double SettingWindowWidth { get; set; } = 1000; public double SettingWindowWidth { get; set; } = 1000;
@ -199,7 +203,7 @@ namespace Flow.Launcher.Infrastructure.UserSettings
} }
public bool LeaveCmdOpen { get; set; } public bool LeaveCmdOpen { get; set; }
public bool HideWhenDeactive { get; set; } = true; public bool HideWhenDeactive { get; set; } = true;
public bool RememberLastLaunchLocation { get; set; } public SearchWindowPositions SearchWindowPosition { get; set; } = SearchWindowPositions.MouseScreenCenter;
public bool IgnoreHotkeysOnFullscreen { get; set; } public bool IgnoreHotkeysOnFullscreen { get; set; }
public HttpProxy Proxy { get; set; } = new HttpProxy(); public HttpProxy Proxy { get; set; } = new HttpProxy();
@ -225,4 +229,12 @@ namespace Flow.Launcher.Infrastructure.UserSettings
Light, Light,
Dark Dark
} }
public enum SearchWindowPositions
{
RememberLastLaunchLocation,
MouseScreenCenter,
MouseScreenCenterTop,
MouseScreenLeftTop,
MouseScreenRightTop
}
} }

View file

@ -50,7 +50,7 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="Moq" Version="4.16.1" /> <PackageReference Include="Moq" Version="4.16.1" />
<PackageReference Include="nunit" Version="3.13.2" /> <PackageReference Include="nunit" Version="3.13.2" />
<PackageReference Include="NUnit3TestAdapter" Version="4.0.0"> <PackageReference Include="NUnit3TestAdapter" Version="4.2.1">
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference> </PackageReference>

View file

@ -129,14 +129,20 @@ namespace Flow.Launcher.Test
} }
} }
/// <summary>
/// These are standard match scenarios
/// The intention of this test is provide a bench mark for how much the score has increased from a change.
/// Usually the increase in scoring should not be drastic, increase of less than 10 is acceptable.
/// </summary>
[TestCase(Chrome, Chrome, 157)] [TestCase(Chrome, Chrome, 157)]
[TestCase(Chrome, LastIsChrome, 147)] [TestCase(Chrome, LastIsChrome, 145)]
[TestCase("chro", HelpCureHopeRaiseOnMindEntityChrome, 50)] [TestCase("chro", HelpCureHopeRaiseOnMindEntityChrome, 50)]
[TestCase("chr", HelpCureHopeRaiseOnMindEntityChrome, 30)] [TestCase("chr", HelpCureHopeRaiseOnMindEntityChrome, 30)]
[TestCase(Chrome, UninstallOrChangeProgramsOnYourComputer, 21)] [TestCase(Chrome, UninstallOrChangeProgramsOnYourComputer, 21)]
[TestCase(Chrome, CandyCrushSagaFromKing, 0)] [TestCase(Chrome, CandyCrushSagaFromKing, 0)]
[TestCase("sql", MicrosoftSqlServerManagementStudio, 110)] [TestCase("sql", MicrosoftSqlServerManagementStudio, 109)]
[TestCase("sql manag", MicrosoftSqlServerManagementStudio, 121)] //double spacing intended [TestCase("sql manag", MicrosoftSqlServerManagementStudio, 120)] //double spacing intended
public void WhenGivenQueryString_ThenShouldReturn_TheDesiredScoring( public void WhenGivenQueryString_ThenShouldReturn_TheDesiredScoring(
string queryString, string compareString, int expectedScore) string queryString, string compareString, int expectedScore)
{ {
@ -275,7 +281,40 @@ namespace Flow.Launcher.Test
$"Query: \"{queryString}\"{Environment.NewLine} " + $"Query: \"{queryString}\"{Environment.NewLine} " +
$"CompareString1: \"{compareString1}\", Score: {compareString1Result.Score}{Environment.NewLine}" + $"CompareString1: \"{compareString1}\", Score: {compareString1Result.Score}{Environment.NewLine}" +
$"Should be greater than{Environment.NewLine}" + $"Should be greater than{Environment.NewLine}" +
$"CompareString2: \"{compareString2}\", Score: {compareString1Result.Score}{Environment.NewLine}"); $"CompareString2: \"{compareString2}\", Score: {compareString2Result.Score}{Environment.NewLine}");
}
[TestCase("red", "red colour", "metro red")]
[TestCase("red", "this red colour", "this colour red")]
[TestCase("red", "this red colour", "this colour is very red")]
[TestCase("red", "this red colour", "this colour is surprisingly super awesome red and cool")]
[TestCase("red", "this colour is surprisingly super red very and cool", "this colour is surprisingly super very red and cool")]
public void WhenGivenTwoStrings_Scoring_ShouldGiveMoreWeightToTheStringCloserToIndexZero(
string queryString, string compareString1, string compareString2)
{
// When
var matcher = new StringMatcher { UserSettingSearchPrecision = SearchPrecisionScore.Regular };
// Given
var compareString1Result = matcher.FuzzyMatch(queryString, compareString1);
var compareString2Result = matcher.FuzzyMatch(queryString, compareString2);
Debug.WriteLine("");
Debug.WriteLine("###############################################");
Debug.WriteLine($"QueryString: \"{queryString}\"{Environment.NewLine}");
Debug.WriteLine(
$"CompareString1: \"{compareString1}\", Score: {compareString1Result.Score}{Environment.NewLine}");
Debug.WriteLine(
$"CompareString2: \"{compareString2}\", Score: {compareString2Result.Score}{Environment.NewLine}");
Debug.WriteLine("###############################################");
Debug.WriteLine("");
// Should
Assert.True(compareString1Result.Score > compareString2Result.Score,
$"Query: \"{queryString}\"{Environment.NewLine} " +
$"CompareString1: \"{compareString1}\", Score: {compareString1Result.Score}{Environment.NewLine}" +
$"Should be greater than{Environment.NewLine}" +
$"CompareString2: \"{compareString2}\", Score: {compareString2Result.Score}{Environment.NewLine}");
} }
[TestCase("vim", "Vim", "ignoreDescription", "ignore.exe", "Vim Diff", "ignoreDescription", "ignore.exe")] [TestCase("vim", "Vim", "ignoreDescription", "ignore.exe", "Vim Diff", "ignoreDescription", "ignore.exe")]

View file

@ -0,0 +1,43 @@
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.Controls;
using System.Windows.Data;
namespace Flow.Launcher.Converters
{
public class BoolToVisibilityConverter : IValueConverter
{
public object Convert(object value, System.Type targetType, object parameter, CultureInfo culture)
{
if (parameter != null)
{
if (value is true)
{
return Visibility.Collapsed;
}
else
{
return Visibility.Visible;
}
}
else {
if (value is true)
{
return Visibility.Visible;
}
else {
return Visibility.Collapsed;
}
}
}
public object ConvertBack(object value, System.Type targetType, object parameter, CultureInfo culture) => throw new System.InvalidOperationException();
}
}

View file

@ -0,0 +1,32 @@
using System;
using System.Globalization;
using System.Windows.Data;
using Flow.Launcher.Core.Resource;
using Flow.Launcher.ViewModel;
namespace Flow.Launcher.Converters
{
public class TextConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
var ID = value.ToString();
switch(ID)
{
case PluginStoreItemViewModel.NewRelease:
return InternationalizationManager.Instance.GetTranslation("pluginStore_NewRelease");
case PluginStoreItemViewModel.RecentlyUpdated:
return InternationalizationManager.Instance.GetTranslation("pluginStore_RecentlyUpdated");
case PluginStoreItemViewModel.None:
return InternationalizationManager.Instance.GetTranslation("pluginStore_None");
case PluginStoreItemViewModel.Installed:
return InternationalizationManager.Instance.GetTranslation("pluginStore_Installed");
default:
return ID;
}
}
public object ConvertBack(object value, System.Type targetType, object parameter, CultureInfo culture) => throw new System.InvalidOperationException();
}
}

View file

@ -17,7 +17,7 @@ namespace Flow.Launcher.Helper
internal static void Initialize(MainViewModel mainVM) internal static void Initialize(MainViewModel mainVM)
{ {
mainViewModel = mainVM; mainViewModel = mainVM;
settings = mainViewModel._settings; settings = mainViewModel.Settings;
SetHotkey(settings.Hotkey, OnToggleHotkey); SetHotkey(settings.Hotkey, OnToggleHotkey);
LoadCustomPluginHotkey(); LoadCustomPluginHotkey();

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View file

@ -77,13 +77,13 @@
<system:String x:Key="plugin_query_time">Søgetid:</system:String> <system:String x:Key="plugin_query_time">Søgetid:</system:String>
<system:String x:Key="plugin_query_version">| Version</system:String> <system:String x:Key="plugin_query_version">| Version</system:String>
<system:String x:Key="plugin_query_web">Website</system:String> <system:String x:Key="plugin_query_web">Website</system:String>
<system:String x:Key="plugin_uninstall">Uninstall</system:String> <system:String x:Key="uninstallbtn">Uninstall</system:String>
<!-- Setting Plugin Store --> <!-- Setting Plugin Store -->
<system:String x:Key="pluginStore">Plugin Store</system:String> <system:String x:Key="pluginStore">Plugin Store</system:String>
<system:String x:Key="refresh">Refresh</system:String> <system:String x:Key="refresh">Refresh</system:String>
<system:String x:Key="install">Install</system:String> <system:String x:Key="installbtn">Install</system:String>
<!-- Setting Theme --> <!-- Setting Theme -->
<system:String x:Key="theme">Tema</system:String> <system:String x:Key="theme">Tema</system:String>

View file

@ -77,13 +77,13 @@
<system:String x:Key="plugin_query_time">Abfragezeit:</system:String> <system:String x:Key="plugin_query_time">Abfragezeit:</system:String>
<system:String x:Key="plugin_query_version">Version</system:String> <system:String x:Key="plugin_query_version">Version</system:String>
<system:String x:Key="plugin_query_web">Webseite</system:String> <system:String x:Key="plugin_query_web">Webseite</system:String>
<system:String x:Key="plugin_uninstall">Deinstallieren</system:String> <system:String x:Key="uninstallbtn">Deinstallieren</system:String>
<!-- Setting Plugin Store --> <!-- Setting Plugin Store -->
<system:String x:Key="pluginStore">Erweiterungen laden</system:String> <system:String x:Key="pluginStore">Erweiterungen laden</system:String>
<system:String x:Key="refresh">Aktualisieren</system:String> <system:String x:Key="refresh">Aktualisieren</system:String>
<system:String x:Key="install">Installieren</system:String> <system:String x:Key="installbtn">Installieren</system:String>
<!-- Setting Theme --> <!-- Setting Theme -->
<system:String x:Key="theme">Design</system:String> <system:String x:Key="theme">Design</system:String>

View file

@ -23,6 +23,8 @@
<system:String x:Key="textTitle">Text</system:String> <system:String x:Key="textTitle">Text</system:String>
<system:String x:Key="GameMode">Game Mode</system:String> <system:String x:Key="GameMode">Game Mode</system:String>
<system:String x:Key="GameModeToolTip">Suspend the use of Hotkeys.</system:String> <system:String x:Key="GameModeToolTip">Suspend the use of Hotkeys.</system:String>
<system:String x:Key="PositionReset">Position Reset</system:String>
<system:String x:Key="PositionResetToolTip">Reset search window position</system:String>
<!-- Setting General --> <!-- Setting General -->
<system:String x:Key="flowlauncher_settings">Flow Launcher Settings</system:String> <system:String x:Key="flowlauncher_settings">Flow Launcher Settings</system:String>
@ -33,7 +35,13 @@
<system:String x:Key="setAutoStartFailed">Error setting launch on startup</system:String> <system:String x:Key="setAutoStartFailed">Error setting launch on startup</system:String>
<system:String x:Key="hideFlowLauncherWhenLoseFocus">Hide Flow Launcher when focus is lost</system:String> <system:String x:Key="hideFlowLauncherWhenLoseFocus">Hide Flow Launcher when focus is lost</system:String>
<system:String x:Key="dontPromptUpdateMsg">Do not show new version notifications</system:String> <system:String x:Key="dontPromptUpdateMsg">Do not show new version notifications</system:String>
<system:String x:Key="SearchWindowPosition">Search Window Position</system:String>
<system:String x:Key="rememberLastLocation">Remember last launch location</system:String> <system:String x:Key="rememberLastLocation">Remember last launch location</system:String>
<system:String x:Key="SearchWindowPositionRememberLastLaunchLocation">Remember Last Location</system:String>
<system:String x:Key="SearchWindowPositionMouseScreenCenter">Mouse Focused Screen - Center</system:String>
<system:String x:Key="SearchWindowPositionMouseScreenCenterTop">Mouse Focused Screen - Center Top</system:String>
<system:String x:Key="SearchWindowPositionMouseScreenLeftTop">Mouse Focused Screen - Left Top</system:String>
<system:String x:Key="SearchWindowPositionMouseScreenRightTop">Mouse Focused Screen - Right Top</system:String>
<system:String x:Key="language">Language</system:String> <system:String x:Key="language">Language</system:String>
<system:String x:Key="lastQueryMode">Last Query Style</system:String> <system:String x:Key="lastQueryMode">Last Query Style</system:String>
<system:String x:Key="lastQueryModeToolTip">Show/Hide previous results when Flow Launcher is reactivated.</system:String> <system:String x:Key="lastQueryModeToolTip">Show/Hide previous results when Flow Launcher is reactivated.</system:String>
@ -84,13 +92,24 @@
<system:String x:Key="plugin_query_time">Query time:</system:String> <system:String x:Key="plugin_query_time">Query time:</system:String>
<system:String x:Key="plugin_query_version">| Version</system:String> <system:String x:Key="plugin_query_version">| Version</system:String>
<system:String x:Key="plugin_query_web">Website</system:String> <system:String x:Key="plugin_query_web">Website</system:String>
<system:String x:Key="plugin_uninstall">Uninstall</system:String>
<!-- Setting Plugin Store --> <!-- Setting Plugin Store -->
<system:String x:Key="pluginStore">Plugin Store</system:String> <system:String x:Key="pluginStore">Plugin Store</system:String>
<system:String x:Key="pluginStore_NewRelease">New Release</system:String>
<system:String x:Key="pluginStore_RecentlyUpdated">Recently Updated</system:String>
<system:String x:Key="pluginStore_None">Plugins</system:String>
<system:String x:Key="pluginStore_Installed">Installed</system:String>
<system:String x:Key="refresh">Refresh</system:String> <system:String x:Key="refresh">Refresh</system:String>
<system:String x:Key="install">Install</system:String> <system:String x:Key="installbtn">Install</system:String>
<system:String x:Key="uninstallbtn">Uninstall</system:String>
<system:String x:Key="updatebtn">Update</system:String>
<system:String x:Key="LabelInstalledToolTip">Plug-in already installed</system:String>
<system:String x:Key="LabelNew">New Version</system:String>
<system:String x:Key="LabelNewToolTip">This plug-in has been updated within the last 7 days</system:String>
<system:String x:Key="LabelUpdateToolTip">New Update is Available</system:String>
<!-- Setting Theme --> <!-- Setting Theme -->
<system:String x:Key="theme">Theme</system:String> <system:String x:Key="theme">Theme</system:String>
@ -113,6 +132,8 @@
<system:String x:Key="SoundEffectTip">Play a small sound when the search window opens</system:String> <system:String x:Key="SoundEffectTip">Play a small sound when the search window opens</system:String>
<system:String x:Key="Animation">Animation</system:String> <system:String x:Key="Animation">Animation</system:String>
<system:String x:Key="AnimationTip">Use Animation in UI</system:String> <system:String x:Key="AnimationTip">Use Animation in UI</system:String>
<system:String x:Key="Clock">Clock</system:String>
<system:String x:Key="Date">Date</system:String>
<!-- Setting Hotkey --> <!-- Setting Hotkey -->
<system:String x:Key="hotkey">Hotkey</system:String> <system:String x:Key="hotkey">Hotkey</system:String>

View file

@ -77,13 +77,13 @@
<system:String x:Key="plugin_query_time">Tiempo de consulta:</system:String> <system:String x:Key="plugin_query_time">Tiempo de consulta:</system:String>
<system:String x:Key="plugin_query_version">| Versión</system:String> <system:String x:Key="plugin_query_version">| Versión</system:String>
<system:String x:Key="plugin_query_web">Sitio web</system:String> <system:String x:Key="plugin_query_web">Sitio web</system:String>
<system:String x:Key="plugin_uninstall">Uninstall</system:String> <system:String x:Key="uninstallbtn">Uninstall</system:String>
<!-- Setting Plugin Store --> <!-- Setting Plugin Store -->
<system:String x:Key="pluginStore">Tienda de Plugins</system:String> <system:String x:Key="pluginStore">Tienda de Plugins</system:String>
<system:String x:Key="refresh">Recargar</system:String> <system:String x:Key="refresh">Recargar</system:String>
<system:String x:Key="install">Instalar</system:String> <system:String x:Key="installbtn">Instalar</system:String>
<!-- Setting Theme --> <!-- Setting Theme -->
<system:String x:Key="theme">Tema</system:String> <system:String x:Key="theme">Tema</system:String>

View file

@ -77,13 +77,13 @@
<system:String x:Key="plugin_query_time">Utilisation :</system:String> <system:String x:Key="plugin_query_time">Utilisation :</system:String>
<system:String x:Key="plugin_query_version">| Version</system:String> <system:String x:Key="plugin_query_version">| Version</system:String>
<system:String x:Key="plugin_query_web">Website</system:String> <system:String x:Key="plugin_query_web">Website</system:String>
<system:String x:Key="plugin_uninstall">Désinstaller</system:String> <system:String x:Key="uninstallbtn">Désinstaller</system:String>
<!-- Setting Plugin Store --> <!-- Setting Plugin Store -->
<system:String x:Key="pluginStore">Plugin Store</system:String> <system:String x:Key="pluginStore">Plugin Store</system:String>
<system:String x:Key="refresh">Refresh</system:String> <system:String x:Key="refresh">Refresh</system:String>
<system:String x:Key="install">Install</system:String> <system:String x:Key="installbtn">Install</system:String>
<!-- Setting Theme --> <!-- Setting Theme -->
<system:String x:Key="theme">Thèmes</system:String> <system:String x:Key="theme">Thèmes</system:String>

View file

@ -77,13 +77,13 @@
<system:String x:Key="plugin_query_time">Tempo ricerca:</system:String> <system:String x:Key="plugin_query_time">Tempo ricerca:</system:String>
<system:String x:Key="plugin_query_version">| Versione</system:String> <system:String x:Key="plugin_query_version">| Versione</system:String>
<system:String x:Key="plugin_query_web">Sito Web</system:String> <system:String x:Key="plugin_query_web">Sito Web</system:String>
<system:String x:Key="plugin_uninstall">Disinstalla</system:String> <system:String x:Key="uninstallbtn">Disinstalla</system:String>
<!-- Setting Plugin Store --> <!-- Setting Plugin Store -->
<system:String x:Key="pluginStore">Negozio dei Plugin</system:String> <system:String x:Key="pluginStore">Negozio dei Plugin</system:String>
<system:String x:Key="refresh">Aggiorna</system:String> <system:String x:Key="refresh">Aggiorna</system:String>
<system:String x:Key="install">Installa</system:String> <system:String x:Key="installbtn">Installa</system:String>
<!-- Setting Theme --> <!-- Setting Theme -->
<system:String x:Key="theme">Tema</system:String> <system:String x:Key="theme">Tema</system:String>

View file

@ -77,13 +77,13 @@
<system:String x:Key="plugin_query_time">クエリ時間:</system:String> <system:String x:Key="plugin_query_time">クエリ時間:</system:String>
<system:String x:Key="plugin_query_version">| バージョン</system:String> <system:String x:Key="plugin_query_version">| バージョン</system:String>
<system:String x:Key="plugin_query_web">ウェブサイト</system:String> <system:String x:Key="plugin_query_web">ウェブサイト</system:String>
<system:String x:Key="plugin_uninstall">アンインストール</system:String> <system:String x:Key="uninstallbtn">アンインストール</system:String>
<!-- Setting Plugin Store --> <!-- Setting Plugin Store -->
<system:String x:Key="pluginStore">プラグインストア</system:String> <system:String x:Key="pluginStore">プラグインストア</system:String>
<system:String x:Key="refresh">Refresh</system:String> <system:String x:Key="refresh">Refresh</system:String>
<system:String x:Key="install">Install</system:String> <system:String x:Key="installbtn">Install</system:String>
<!-- Setting Theme --> <!-- Setting Theme -->
<system:String x:Key="theme">テーマ</system:String> <system:String x:Key="theme">テーマ</system:String>

View file

@ -77,13 +77,13 @@
<system:String x:Key="plugin_query_time">쿼리 시간:</system:String> <system:String x:Key="plugin_query_time">쿼리 시간:</system:String>
<system:String x:Key="plugin_query_version">| 버전</system:String> <system:String x:Key="plugin_query_version">| 버전</system:String>
<system:String x:Key="plugin_query_web">웹사이트</system:String> <system:String x:Key="plugin_query_web">웹사이트</system:String>
<system:String x:Key="plugin_uninstall">제거</system:String> <system:String x:Key="uninstallbtn">제거</system:String>
<!-- Setting Plugin Store --> <!-- Setting Plugin Store -->
<system:String x:Key="pluginStore">플러그인 스토어</system:String> <system:String x:Key="pluginStore">플러그인 스토어</system:String>
<system:String x:Key="refresh">새로고침</system:String> <system:String x:Key="refresh">새로고침</system:String>
<system:String x:Key="install">설치</system:String> <system:String x:Key="installbtn">설치</system:String>
<!-- Setting Theme --> <!-- Setting Theme -->
<system:String x:Key="theme">테마</system:String> <system:String x:Key="theme">테마</system:String>

View file

@ -77,13 +77,13 @@
<system:String x:Key="plugin_query_time">Query time:</system:String> <system:String x:Key="plugin_query_time">Query time:</system:String>
<system:String x:Key="plugin_query_version">| Version</system:String> <system:String x:Key="plugin_query_version">| Version</system:String>
<system:String x:Key="plugin_query_web">Website</system:String> <system:String x:Key="plugin_query_web">Website</system:String>
<system:String x:Key="plugin_uninstall">Uninstall</system:String> <system:String x:Key="uninstallbtn">Uninstall</system:String>
<!-- Setting Plugin Store --> <!-- Setting Plugin Store -->
<system:String x:Key="pluginStore">Plugin Store</system:String> <system:String x:Key="pluginStore">Plugin Store</system:String>
<system:String x:Key="refresh">Refresh</system:String> <system:String x:Key="refresh">Refresh</system:String>
<system:String x:Key="install">Install</system:String> <system:String x:Key="installbtn">Install</system:String>
<!-- Setting Theme --> <!-- Setting Theme -->
<system:String x:Key="theme">Theme</system:String> <system:String x:Key="theme">Theme</system:String>

View file

@ -77,13 +77,13 @@
<system:String x:Key="plugin_query_time">Query tijd:</system:String> <system:String x:Key="plugin_query_time">Query tijd:</system:String>
<system:String x:Key="plugin_query_version">| Versie</system:String> <system:String x:Key="plugin_query_version">| Versie</system:String>
<system:String x:Key="plugin_query_web">Website</system:String> <system:String x:Key="plugin_query_web">Website</system:String>
<system:String x:Key="plugin_uninstall">Uninstall</system:String> <system:String x:Key="uninstallbtn">Uninstall</system:String>
<!-- Setting Plugin Store --> <!-- Setting Plugin Store -->
<system:String x:Key="pluginStore">Plugin Winkel</system:String> <system:String x:Key="pluginStore">Plugin Winkel</system:String>
<system:String x:Key="refresh">Vernieuwen</system:String> <system:String x:Key="refresh">Vernieuwen</system:String>
<system:String x:Key="install">Installeren</system:String> <system:String x:Key="installbtn">Installeren</system:String>
<!-- Setting Theme --> <!-- Setting Theme -->
<system:String x:Key="theme">Thema</system:String> <system:String x:Key="theme">Thema</system:String>

View file

@ -77,13 +77,13 @@
<system:String x:Key="plugin_query_time">Czas zapytania:</system:String> <system:String x:Key="plugin_query_time">Czas zapytania:</system:String>
<system:String x:Key="plugin_query_version">| Version</system:String> <system:String x:Key="plugin_query_version">| Version</system:String>
<system:String x:Key="plugin_query_web">Website</system:String> <system:String x:Key="plugin_query_web">Website</system:String>
<system:String x:Key="plugin_uninstall">Odinstalowywanie</system:String> <system:String x:Key="uninstallbtn">Odinstalowywanie</system:String>
<!-- Setting Plugin Store --> <!-- Setting Plugin Store -->
<system:String x:Key="pluginStore">Plugin Store</system:String> <system:String x:Key="pluginStore">Plugin Store</system:String>
<system:String x:Key="refresh">Refresh</system:String> <system:String x:Key="refresh">Refresh</system:String>
<system:String x:Key="install">Install</system:String> <system:String x:Key="installbtn">Install</system:String>
<!-- Setting Theme --> <!-- Setting Theme -->
<system:String x:Key="theme">Skórka</system:String> <system:String x:Key="theme">Skórka</system:String>

View file

@ -77,13 +77,13 @@
<system:String x:Key="plugin_query_time">Tempo de consulta:</system:String> <system:String x:Key="plugin_query_time">Tempo de consulta:</system:String>
<system:String x:Key="plugin_query_version">| Version</system:String> <system:String x:Key="plugin_query_version">| Version</system:String>
<system:String x:Key="plugin_query_web">Website</system:String> <system:String x:Key="plugin_query_web">Website</system:String>
<system:String x:Key="plugin_uninstall">Desinstalar</system:String> <system:String x:Key="uninstallbtn">Desinstalar</system:String>
<!-- Setting Plugin Store --> <!-- Setting Plugin Store -->
<system:String x:Key="pluginStore">Plugin Store</system:String> <system:String x:Key="pluginStore">Plugin Store</system:String>
<system:String x:Key="refresh">Refresh</system:String> <system:String x:Key="refresh">Refresh</system:String>
<system:String x:Key="install">Install</system:String> <system:String x:Key="installbtn">Install</system:String>
<!-- Setting Theme --> <!-- Setting Theme -->
<system:String x:Key="theme">Tema</system:String> <system:String x:Key="theme">Tema</system:String>

View file

@ -77,13 +77,13 @@
<system:String x:Key="plugin_query_time">Tempo de consulta:</system:String> <system:String x:Key="plugin_query_time">Tempo de consulta:</system:String>
<system:String x:Key="plugin_query_version">| Versão</system:String> <system:String x:Key="plugin_query_version">| Versão</system:String>
<system:String x:Key="plugin_query_web">Site</system:String> <system:String x:Key="plugin_query_web">Site</system:String>
<system:String x:Key="plugin_uninstall">Desinstalar</system:String> <system:String x:Key="uninstallbtn">Desinstalar</system:String>
<!-- Setting Plugin Store --> <!-- Setting Plugin Store -->
<system:String x:Key="pluginStore">Loja de plugins</system:String> <system:String x:Key="pluginStore">Loja de plugins</system:String>
<system:String x:Key="refresh">Recarregar</system:String> <system:String x:Key="refresh">Recarregar</system:String>
<system:String x:Key="install">Instalar</system:String> <system:String x:Key="installbtn">Instalar</system:String>
<!-- Setting Theme --> <!-- Setting Theme -->
<system:String x:Key="theme">Tema</system:String> <system:String x:Key="theme">Tema</system:String>

View file

@ -77,13 +77,13 @@
<system:String x:Key="plugin_query_time">Запрос:</system:String> <system:String x:Key="plugin_query_time">Запрос:</system:String>
<system:String x:Key="plugin_query_version">| Version</system:String> <system:String x:Key="plugin_query_version">| Version</system:String>
<system:String x:Key="plugin_query_web">Website</system:String> <system:String x:Key="plugin_query_web">Website</system:String>
<system:String x:Key="plugin_uninstall">Удалить</system:String> <system:String x:Key="uninstallbtn">Удалить</system:String>
<!-- Setting Plugin Store --> <!-- Setting Plugin Store -->
<system:String x:Key="pluginStore">Plugin Store</system:String> <system:String x:Key="pluginStore">Plugin Store</system:String>
<system:String x:Key="refresh">Refresh</system:String> <system:String x:Key="refresh">Refresh</system:String>
<system:String x:Key="install">Install</system:String> <system:String x:Key="installbtn">Install</system:String>
<!-- Setting Theme --> <!-- Setting Theme -->
<system:String x:Key="theme">Тема</system:String> <system:String x:Key="theme">Тема</system:String>

View file

@ -77,13 +77,13 @@
<system:String x:Key="plugin_query_time">Trvanie dopytu:</system:String> <system:String x:Key="plugin_query_time">Trvanie dopytu:</system:String>
<system:String x:Key="plugin_query_version">| Verzia</system:String> <system:String x:Key="plugin_query_version">| Verzia</system:String>
<system:String x:Key="plugin_query_web">Webstránka</system:String> <system:String x:Key="plugin_query_web">Webstránka</system:String>
<system:String x:Key="plugin_uninstall">Odinštalovať</system:String> <system:String x:Key="uninstallbtn">Odinštalovať</system:String>
<!-- Setting Plugin Store --> <!-- Setting Plugin Store -->
<system:String x:Key="pluginStore">Repozitár pluginov</system:String> <system:String x:Key="pluginStore">Repozitár pluginov</system:String>
<system:String x:Key="refresh">Obnoviť</system:String> <system:String x:Key="refresh">Obnoviť</system:String>
<system:String x:Key="install">Inštalovať</system:String> <system:String x:Key="installbtn">Inštalovať</system:String>
<!-- Setting Theme --> <!-- Setting Theme -->
<system:String x:Key="theme">Motív</system:String> <system:String x:Key="theme">Motív</system:String>

View file

@ -77,13 +77,13 @@
<system:String x:Key="plugin_query_time">Vreme upita:</system:String> <system:String x:Key="plugin_query_time">Vreme upita:</system:String>
<system:String x:Key="plugin_query_version">| Version</system:String> <system:String x:Key="plugin_query_version">| Version</system:String>
<system:String x:Key="plugin_query_web">Website</system:String> <system:String x:Key="plugin_query_web">Website</system:String>
<system:String x:Key="plugin_uninstall">Uninstall</system:String> <system:String x:Key="uninstallbtn">Uninstall</system:String>
<!-- Setting Plugin Store --> <!-- Setting Plugin Store -->
<system:String x:Key="pluginStore">Plugin Store</system:String> <system:String x:Key="pluginStore">Plugin Store</system:String>
<system:String x:Key="refresh">Refresh</system:String> <system:String x:Key="refresh">Refresh</system:String>
<system:String x:Key="install">Install</system:String> <system:String x:Key="installbtn">Install</system:String>
<!-- Setting Theme --> <!-- Setting Theme -->
<system:String x:Key="theme">Tema</system:String> <system:String x:Key="theme">Tema</system:String>

View file

@ -77,13 +77,13 @@
<system:String x:Key="plugin_query_time">Sorgu Süresi:</system:String> <system:String x:Key="plugin_query_time">Sorgu Süresi:</system:String>
<system:String x:Key="plugin_query_version">Sürüm</system:String> <system:String x:Key="plugin_query_version">Sürüm</system:String>
<system:String x:Key="plugin_query_web">İnternet Sitesi</system:String> <system:String x:Key="plugin_query_web">İnternet Sitesi</system:String>
<system:String x:Key="plugin_uninstall">Kaldır</system:String> <system:String x:Key="uninstallbtn">Kaldır</system:String>
<!-- Setting Plugin Store --> <!-- Setting Plugin Store -->
<system:String x:Key="pluginStore">Eklenti Mağazası</system:String> <system:String x:Key="pluginStore">Eklenti Mağazası</system:String>
<system:String x:Key="refresh">Yenile</system:String> <system:String x:Key="refresh">Yenile</system:String>
<system:String x:Key="install">İndir</system:String> <system:String x:Key="installbtn">İndir</system:String>
<!-- Setting Theme --> <!-- Setting Theme -->
<system:String x:Key="theme">Temalar</system:String> <system:String x:Key="theme">Temalar</system:String>

View file

@ -77,13 +77,13 @@
<system:String x:Key="plugin_query_time">Запит:</system:String> <system:String x:Key="plugin_query_time">Запит:</system:String>
<system:String x:Key="plugin_query_version">| Версія</system:String> <system:String x:Key="plugin_query_version">| Версія</system:String>
<system:String x:Key="plugin_query_web">Сайт</system:String> <system:String x:Key="plugin_query_web">Сайт</system:String>
<system:String x:Key="plugin_uninstall">Uninstall</system:String> <system:String x:Key="uninstallbtn">Uninstall</system:String>
<!-- Setting Plugin Store --> <!-- Setting Plugin Store -->
<system:String x:Key="pluginStore">Магазин плагінів</system:String> <system:String x:Key="pluginStore">Магазин плагінів</system:String>
<system:String x:Key="refresh">Оновити</system:String> <system:String x:Key="refresh">Оновити</system:String>
<system:String x:Key="install">Встановити</system:String> <system:String x:Key="installbtn">Встановити</system:String>
<!-- Setting Theme --> <!-- Setting Theme -->
<system:String x:Key="theme">Тема</system:String> <system:String x:Key="theme">Тема</system:String>

View file

@ -77,13 +77,13 @@
<system:String x:Key="plugin_query_time">查询耗时:</system:String> <system:String x:Key="plugin_query_time">查询耗时:</system:String>
<system:String x:Key="plugin_query_version">| 版本</system:String> <system:String x:Key="plugin_query_version">| 版本</system:String>
<system:String x:Key="plugin_query_web">官方网站</system:String> <system:String x:Key="plugin_query_web">官方网站</system:String>
<system:String x:Key="plugin_uninstall">卸载</system:String> <system:String x:Key="uninstallbtn">卸载</system:String>
<!-- Setting Plugin Store --> <!-- Setting Plugin Store -->
<system:String x:Key="pluginStore">插件商店</system:String> <system:String x:Key="pluginStore">插件商店</system:String>
<system:String x:Key="refresh">刷新</system:String> <system:String x:Key="refresh">刷新</system:String>
<system:String x:Key="install">安装</system:String> <system:String x:Key="installbtn">安装</system:String>
<!-- Setting Theme --> <!-- Setting Theme -->
<system:String x:Key="theme">主题</system:String> <system:String x:Key="theme">主题</system:String>

View file

@ -77,13 +77,13 @@
<system:String x:Key="plugin_query_time">查詢耗時:</system:String> <system:String x:Key="plugin_query_time">查詢耗時:</system:String>
<system:String x:Key="plugin_query_version">| 版本</system:String> <system:String x:Key="plugin_query_version">| 版本</system:String>
<system:String x:Key="plugin_query_web">官方網站</system:String> <system:String x:Key="plugin_query_web">官方網站</system:String>
<system:String x:Key="plugin_uninstall">解除安裝</system:String> <system:String x:Key="uninstallbtn">解除安裝</system:String>
<!-- Setting Plugin Store --> <!-- Setting Plugin Store -->
<system:String x:Key="pluginStore">外掛商店</system:String> <system:String x:Key="pluginStore">外掛商店</system:String>
<system:String x:Key="refresh">重新整理</system:String> <system:String x:Key="refresh">重新整理</system:String>
<system:String x:Key="install">安裝</system:String> <system:String x:Key="installbtn">安裝</system:String>
<!-- Setting Theme --> <!-- Setting Theme -->
<system:String x:Key="theme">主題</system:String> <system:String x:Key="theme">主題</system:String>

View file

@ -1,5 +1,4 @@
<Window <Window x:Class="Flow.Launcher.MainWindow"
x:Class="Flow.Launcher.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:converters="clr-namespace:Flow.Launcher.Converters" xmlns:converters="clr-namespace:Flow.Launcher.Converters"
@ -32,193 +31,200 @@
Visibility="{Binding MainWindowVisibility, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Visibility="{Binding MainWindowVisibility, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
WindowStartupLocation="Manual" WindowStartupLocation="Manual"
WindowStyle="None" WindowStyle="None"
mc:Ignorable="d" mc:Ignorable="d">
Left="{Binding Left, Mode=TwoWay}"
Top="{Binding Top, Mode=TwoWay}">
<Window.Resources> <Window.Resources>
<converters:QuerySuggestionBoxConverter x:Key="QuerySuggestionBoxConverter" /> <converters:QuerySuggestionBoxConverter x:Key="QuerySuggestionBoxConverter" />
<converters:BorderClipConverter x:Key="BorderClipConverter" /> <converters:BorderClipConverter x:Key="BorderClipConverter" />
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
</Window.Resources> </Window.Resources>
<Window.InputBindings> <Window.InputBindings>
<KeyBinding Key="Escape" Command="{Binding EscCommand}" /> <KeyBinding Key="Escape"
<KeyBinding Key="F1" Command="{Binding StartHelpCommand}" /> Command="{Binding EscCommand}" />
<KeyBinding Key="F5" Command="{Binding ReloadPluginDataCommand}" /> <KeyBinding Key="F1"
<KeyBinding Key="Tab" Command="{Binding AutocompleteQueryCommand}" /> Command="{Binding StartHelpCommand}" />
<KeyBinding <KeyBinding Key="F5"
Key="Tab" Command="{Binding ReloadPluginDataCommand}" />
<KeyBinding Key="Tab"
Command="{Binding AutocompleteQueryCommand}" />
<KeyBinding Key="Tab"
Command="{Binding AutocompleteQueryCommand}" Command="{Binding AutocompleteQueryCommand}"
Modifiers="Shift" /> Modifiers="Shift" />
<KeyBinding <KeyBinding Key="I"
Key="I"
Command="{Binding OpenSettingCommand}" Command="{Binding OpenSettingCommand}"
Modifiers="Ctrl" /> Modifiers="Ctrl" />
<KeyBinding <KeyBinding Key="N"
Key="N"
Command="{Binding SelectNextItemCommand}" Command="{Binding SelectNextItemCommand}"
Modifiers="Ctrl" /> Modifiers="Ctrl" />
<KeyBinding <KeyBinding Key="J"
Key="J"
Command="{Binding SelectNextItemCommand}" Command="{Binding SelectNextItemCommand}"
Modifiers="Ctrl" /> Modifiers="Ctrl" />
<KeyBinding <KeyBinding Key="D"
Key="D"
Command="{Binding SelectNextPageCommand}" Command="{Binding SelectNextPageCommand}"
Modifiers="Ctrl" /> Modifiers="Ctrl" />
<KeyBinding <KeyBinding Key="P"
Key="P"
Command="{Binding SelectPrevItemCommand}" Command="{Binding SelectPrevItemCommand}"
Modifiers="Ctrl" /> Modifiers="Ctrl" />
<KeyBinding <KeyBinding Key="K"
Key="K"
Command="{Binding SelectPrevItemCommand}" Command="{Binding SelectPrevItemCommand}"
Modifiers="Ctrl" /> Modifiers="Ctrl" />
<KeyBinding <KeyBinding Key="U"
Key="U"
Command="{Binding SelectPrevPageCommand}" Command="{Binding SelectPrevPageCommand}"
Modifiers="Ctrl" /> Modifiers="Ctrl" />
<KeyBinding <KeyBinding Key="Home"
Key="Home"
Command="{Binding SelectFirstResultCommand}" Command="{Binding SelectFirstResultCommand}"
Modifiers="Alt" /> Modifiers="Alt" />
<KeyBinding <KeyBinding Key="O"
Key="O"
Command="{Binding LoadContextMenuCommand}" Command="{Binding LoadContextMenuCommand}"
Modifiers="Ctrl" /> Modifiers="Ctrl" />
<KeyBinding Key="Right"
Command="{Binding LoadContextMenuCommand}" />
<KeyBinding Key="Left"
Command="{Binding EscCommand}" />
<KeyBinding
Key="H"
Command="{Binding LoadHistoryCommand}"
Modifiers="Ctrl" />
<KeyBinding Key="Right" Command="{Binding LoadContextMenuCommand}" /> <KeyBinding Key="Right" Command="{Binding LoadContextMenuCommand}" />
<KeyBinding Key="Left" Command="{Binding EscCommand}" /> <KeyBinding Key="Left" Command="{Binding EscCommand}" />
<KeyBinding <KeyBinding
Key="OemCloseBrackets" Key="OemCloseBrackets"
Modifiers="Control" Command="{Binding IncreaseWidthCommand}"
Command="{Binding IncreaseWidthCommand}"/> Modifiers="Control" />
<KeyBinding <KeyBinding
Key="OemOpenBrackets" Key="OemOpenBrackets"
Modifiers="Control" Command="{Binding DecreaseWidthCommand}"
Command="{Binding DecreaseWidthCommand}"/> Modifiers="Control" />
<KeyBinding <KeyBinding
Key="OemPlus" Key="OemPlus"
Modifiers="Control" Command="{Binding IncreaseMaxResultCommand}"
Command="{Binding IncreaseMaxResultCommand}"/> Modifiers="Control" />
<KeyBinding <KeyBinding
Key="OemMinus" Key="OemMinus"
Modifiers="Control" Command="{Binding DecreaseMaxResultCommand}"
Command="{Binding DecreaseMaxResultCommand}"/> Modifiers="Control" />
<KeyBinding <KeyBinding
Key="H" Key="H"
Command="{Binding LoadHistoryCommand}" Command="{Binding LoadHistoryCommand}"
Modifiers="Ctrl" /> Modifiers="Ctrl" />
<KeyBinding <KeyBinding Key="Enter"
Key="Enter"
Command="{Binding OpenResultCommand}" Command="{Binding OpenResultCommand}"
Modifiers="Ctrl+Shift" /> Modifiers="Ctrl+Shift" />
<KeyBinding <KeyBinding Key="Enter"
Key="Enter"
Command="{Binding LoadContextMenuCommand}" Command="{Binding LoadContextMenuCommand}"
Modifiers="Shift" /> Modifiers="Shift" />
<KeyBinding Key="Enter" Command="{Binding OpenResultCommand}" /> <KeyBinding Key="Enter"
<KeyBinding Command="{Binding OpenResultCommand}" />
Key="Enter" <KeyBinding Key="Enter"
Command="{Binding OpenResultCommand}" Command="{Binding OpenResultCommand}"
Modifiers="Ctrl" /> Modifiers="Ctrl" />
<KeyBinding <KeyBinding Key="Enter"
Key="Enter"
Command="{Binding OpenResultCommand}" Command="{Binding OpenResultCommand}"
Modifiers="Alt" /> Modifiers="Alt" />
<KeyBinding <KeyBinding Key="D1"
Key="D1"
Command="{Binding OpenResultCommand}" Command="{Binding OpenResultCommand}"
CommandParameter="0" CommandParameter="0"
Modifiers="{Binding OpenResultCommandModifiers}" /> Modifiers="{Binding OpenResultCommandModifiers}" />
<KeyBinding <KeyBinding Key="D2"
Key="D2"
Command="{Binding OpenResultCommand}" Command="{Binding OpenResultCommand}"
CommandParameter="1" CommandParameter="1"
Modifiers="{Binding OpenResultCommandModifiers}" /> Modifiers="{Binding OpenResultCommandModifiers}" />
<KeyBinding <KeyBinding Key="D3"
Key="D3"
Command="{Binding OpenResultCommand}" Command="{Binding OpenResultCommand}"
CommandParameter="2" CommandParameter="2"
Modifiers="{Binding OpenResultCommandModifiers}" /> Modifiers="{Binding OpenResultCommandModifiers}" />
<KeyBinding <KeyBinding Key="D4"
Key="D4"
Command="{Binding OpenResultCommand}" Command="{Binding OpenResultCommand}"
CommandParameter="3" CommandParameter="3"
Modifiers="{Binding OpenResultCommandModifiers}" /> Modifiers="{Binding OpenResultCommandModifiers}" />
<KeyBinding <KeyBinding Key="D5"
Key="D5"
Command="{Binding OpenResultCommand}" Command="{Binding OpenResultCommand}"
CommandParameter="4" CommandParameter="4"
Modifiers="{Binding OpenResultCommandModifiers}" /> Modifiers="{Binding OpenResultCommandModifiers}" />
<KeyBinding <KeyBinding Key="D6"
Key="D6"
Command="{Binding OpenResultCommand}" Command="{Binding OpenResultCommand}"
CommandParameter="5" CommandParameter="5"
Modifiers="{Binding OpenResultCommandModifiers}" /> Modifiers="{Binding OpenResultCommandModifiers}" />
<KeyBinding <KeyBinding Key="D7"
Key="D7"
Command="{Binding OpenResultCommand}" Command="{Binding OpenResultCommand}"
CommandParameter="6" CommandParameter="6"
Modifiers="{Binding OpenResultCommandModifiers}" /> Modifiers="{Binding OpenResultCommandModifiers}" />
<KeyBinding <KeyBinding Key="D8"
Key="D8"
Command="{Binding OpenResultCommand}" Command="{Binding OpenResultCommand}"
CommandParameter="7" CommandParameter="7"
Modifiers="{Binding OpenResultCommandModifiers}" /> Modifiers="{Binding OpenResultCommandModifiers}" />
<KeyBinding <KeyBinding Key="D9"
Key="D9"
Command="{Binding OpenResultCommand}" Command="{Binding OpenResultCommand}"
CommandParameter="8" CommandParameter="8"
Modifiers="{Binding OpenResultCommandModifiers}" /> Modifiers="{Binding OpenResultCommandModifiers}" />
<KeyBinding <KeyBinding Key="D0"
Key="D0"
Command="{Binding OpenResultCommand}" Command="{Binding OpenResultCommand}"
CommandParameter="9" CommandParameter="9"
Modifiers="{Binding OpenResultCommandModifiers}" /> Modifiers="{Binding OpenResultCommandModifiers}" />
</Window.InputBindings> </Window.InputBindings>
<Grid> <Grid>
<Border MouseDown="OnMouseDown" Style="{DynamicResource WindowBorderStyle}"> <Border MouseDown="OnMouseDown"
Style="{DynamicResource WindowBorderStyle}">
<StackPanel Orientation="Vertical"> <StackPanel Orientation="Vertical">
<Grid> <Grid>
<TextBox <TextBox x:Name="QueryTextSuggestionBox"
x:Name="QueryTextSuggestionBox"
IsEnabled="False" IsEnabled="False"
Style="{DynamicResource QuerySuggestionBoxStyle}"> Style="{DynamicResource QuerySuggestionBoxStyle}">
<TextBox.Text> <TextBox.Text>
<MultiBinding Converter="{StaticResource QuerySuggestionBoxConverter}"> <MultiBinding Converter="{StaticResource QuerySuggestionBoxConverter}">
<Binding ElementName="QueryTextBox" Mode="OneTime" /> <Binding ElementName="QueryTextBox"
<Binding ElementName="ResultListBox" Path="SelectedItem" /> Mode="OneTime" />
<Binding ElementName="QueryTextBox" Path="Text" /> <Binding ElementName="ResultListBox"
Path="SelectedItem" />
<Binding ElementName="QueryTextBox"
Path="Text" />
</MultiBinding> </MultiBinding>
</TextBox.Text> </TextBox.Text>
</TextBox> </TextBox>
<TextBox <TextBox x:Name="QueryTextBox"
x:Name="QueryTextBox"
AllowDrop="True" AllowDrop="True"
Background="Transparent" Background="Transparent"
PreviewDragOver="OnPreviewDragOver" PreviewDragOver="OnPreviewDragOver"
PreviewKeyUp="QueryTextBox_KeyUp"
Style="{DynamicResource QueryBoxStyle}" Style="{DynamicResource QueryBoxStyle}"
Text="{Binding QueryText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Text="{Binding QueryText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
PreviewKeyUp="QueryTextBox_KeyUp"
Visibility="Visible"> Visibility="Visible">
<TextBox.CommandBindings> <TextBox.CommandBindings>
<CommandBinding Command="ApplicationCommands.Copy" Executed="OnCopy" /> <CommandBinding Command="ApplicationCommands.Copy"
Executed="OnCopy" />
</TextBox.CommandBindings> </TextBox.CommandBindings>
<TextBox.ContextMenu> <TextBox.ContextMenu>
<ContextMenu> <ContextMenu>
<MenuItem Command="ApplicationCommands.Cut" Header="{DynamicResource cut}" /> <MenuItem Command="ApplicationCommands.Cut"
<MenuItem Command="ApplicationCommands.Copy" Header="{DynamicResource copy}" /> Header="{DynamicResource cut}" />
<MenuItem Command="ApplicationCommands.Paste" Header="{DynamicResource paste}" /> <MenuItem Command="ApplicationCommands.Copy"
<Separator Header="{DynamicResource copy}" />
Margin="0" <MenuItem Command="ApplicationCommands.Paste"
Header="{DynamicResource paste}" />
<Separator Margin="0"
Padding="0,4,0,4" Padding="0,4,0,4"
Background="{DynamicResource ContextSeparator}" /> Background="{DynamicResource ContextSeparator}" />
<MenuItem Click="OnContextMenusForSettingsClick" Header="{DynamicResource flowlauncher_settings}" /> <MenuItem Click="OnContextMenusForSettingsClick"
<MenuItem Command="{Binding EscCommand}" Header="{DynamicResource closeWindow}" /> Header="{DynamicResource flowlauncher_settings}" />
<MenuItem Command="{Binding EscCommand}"
Header="{DynamicResource closeWindow}" />
</ContextMenu> </ContextMenu>
</TextBox.ContextMenu> </TextBox.ContextMenu>
</TextBox> </TextBox>
<StackPanel x:Name="ClockPanel"
Style="{DynamicResource ClockPanel}"
IsHitTestVisible="False">
<TextBlock
Visibility="{Binding Settings.UseDate, Converter={StaticResource BooleanToVisibilityConverter}}"
Style="{DynamicResource DateBox}"
Text="{Binding DateText}" />
<TextBlock Style="{DynamicResource ClockBox}"
Visibility="{Binding Settings.UseClock, Converter={StaticResource BooleanToVisibilityConverter}}"
Text="{Binding ClockText}"/>
</StackPanel>
<Canvas Style="{DynamicResource SearchIconPosition}"> <Canvas Style="{DynamicResource SearchIconPosition}">
<Image <Image x:Name="PluginActivationIcon"
x:Name="PluginActivationIcon"
Width="32" Width="32"
Height="32" Height="32"
Margin="0,0,0,0" Margin="0,0,0,0"
@ -229,8 +235,7 @@
Source="{Binding PluginIconPath}" Source="{Binding PluginIconPath}"
Stretch="Uniform" Stretch="Uniform"
Style="{DynamicResource PluginActivationIcon}" /> Style="{DynamicResource PluginActivationIcon}" />
<Path <Path Name="SearchIcon"
Name="SearchIcon"
Margin="0" Margin="0"
Data="{DynamicResource SearchIconImg}" Data="{DynamicResource SearchIconImg}"
Stretch="Fill" Stretch="Fill"
@ -243,27 +248,32 @@
<ContentControl> <ContentControl>
<ContentControl.Style> <ContentControl.Style>
<Style TargetType="ContentControl"> <Style TargetType="ContentControl">
<Setter Property="Visibility" Value="Collapsed" /> <Setter Property="Visibility"
Value="Collapsed" />
<Style.Triggers> <Style.Triggers>
<DataTrigger Binding="{Binding ElementName=ResultListBox, Path=Visibility}" Value="Visible"> <DataTrigger Binding="{Binding ElementName=ResultListBox, Path=Visibility}"
<Setter Property="Visibility" Value="Visible" /> Value="Visible">
<Setter Property="Visibility"
Value="Visible" />
</DataTrigger> </DataTrigger>
<DataTrigger Binding="{Binding ElementName=ContextMenu, Path=Visibility}" Value="Visible"> <DataTrigger Binding="{Binding ElementName=ContextMenu, Path=Visibility}"
<Setter Property="Visibility" Value="Visible" /> Value="Visible">
<Setter Property="Visibility"
Value="Visible" />
</DataTrigger> </DataTrigger>
<DataTrigger Binding="{Binding ElementName=History, Path=Visibility}" Value="Visible"> <DataTrigger Binding="{Binding ElementName=History, Path=Visibility}"
<Setter Property="Visibility" Value="Visible" /> Value="Visible">
<Setter Property="Visibility"
Value="Visible" />
</DataTrigger> </DataTrigger>
</Style.Triggers> </Style.Triggers>
</Style> </Style>
</ContentControl.Style> </ContentControl.Style>
<Rectangle <Rectangle Width="Auto"
Width="Auto"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
Style="{DynamicResource SeparatorStyle}" /> Style="{DynamicResource SeparatorStyle}" />
</ContentControl> </ContentControl>
<Line <Line x:Name="ProgressBar"
x:Name="ProgressBar"
Width="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Grid}}, Path=ActualWidth}" Width="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Grid}}, Path=ActualWidth}"
Height="2" Height="2"
HorizontalAlignment="Right" HorizontalAlignment="Right"
@ -279,14 +289,16 @@
<Border Style="{DynamicResource WindowRadius}"> <Border Style="{DynamicResource WindowRadius}">
<Border.Clip> <Border.Clip>
<MultiBinding Converter="{StaticResource BorderClipConverter}"> <MultiBinding Converter="{StaticResource BorderClipConverter}">
<Binding Path="ActualWidth" RelativeSource="{RelativeSource Self}" /> <Binding Path="ActualWidth"
<Binding Path="ActualHeight" RelativeSource="{RelativeSource Self}" /> RelativeSource="{RelativeSource Self}" />
<Binding Path="CornerRadius" RelativeSource="{RelativeSource Self}" /> <Binding Path="ActualHeight"
RelativeSource="{RelativeSource Self}" />
<Binding Path="CornerRadius"
RelativeSource="{RelativeSource Self}" />
</MultiBinding> </MultiBinding>
</Border.Clip> </Border.Clip>
<ContentControl> <ContentControl>
<flowlauncher:ResultListBox <flowlauncher:ResultListBox x:Name="ResultListBox"
x:Name="ResultListBox"
DataContext="{Binding Results}" DataContext="{Binding Results}"
PreviewMouseDown="OnPreviewMouseButtonDown" /> PreviewMouseDown="OnPreviewMouseButtonDown" />
</ContentControl> </ContentControl>
@ -294,14 +306,16 @@
<Border Style="{DynamicResource WindowRadius}"> <Border Style="{DynamicResource WindowRadius}">
<Border.Clip> <Border.Clip>
<MultiBinding Converter="{StaticResource BorderClipConverter}"> <MultiBinding Converter="{StaticResource BorderClipConverter}">
<Binding Path="ActualWidth" RelativeSource="{RelativeSource Self}" /> <Binding Path="ActualWidth"
<Binding Path="ActualHeight" RelativeSource="{RelativeSource Self}" /> RelativeSource="{RelativeSource Self}" />
<Binding Path="CornerRadius" RelativeSource="{RelativeSource Self}" /> <Binding Path="ActualHeight"
RelativeSource="{RelativeSource Self}" />
<Binding Path="CornerRadius"
RelativeSource="{RelativeSource Self}" />
</MultiBinding> </MultiBinding>
</Border.Clip> </Border.Clip>
<ContentControl> <ContentControl>
<flowlauncher:ResultListBox <flowlauncher:ResultListBox x:Name="ContextMenu"
x:Name="ContextMenu"
DataContext="{Binding ContextMenu}" DataContext="{Binding ContextMenu}"
PreviewMouseDown="OnPreviewMouseButtonDown" /> PreviewMouseDown="OnPreviewMouseButtonDown" />
</ContentControl> </ContentControl>
@ -309,14 +323,16 @@
<Border Style="{DynamicResource WindowRadius}"> <Border Style="{DynamicResource WindowRadius}">
<Border.Clip> <Border.Clip>
<MultiBinding Converter="{StaticResource BorderClipConverter}"> <MultiBinding Converter="{StaticResource BorderClipConverter}">
<Binding Path="ActualWidth" RelativeSource="{RelativeSource Self}" /> <Binding Path="ActualWidth"
<Binding Path="ActualHeight" RelativeSource="{RelativeSource Self}" /> RelativeSource="{RelativeSource Self}" />
<Binding Path="CornerRadius" RelativeSource="{RelativeSource Self}" /> <Binding Path="ActualHeight"
RelativeSource="{RelativeSource Self}" />
<Binding Path="CornerRadius"
RelativeSource="{RelativeSource Self}" />
</MultiBinding> </MultiBinding>
</Border.Clip> </Border.Clip>
<ContentControl> <ContentControl>
<flowlauncher:ResultListBox <flowlauncher:ResultListBox x:Name="History"
x:Name="History"
DataContext="{Binding History}" DataContext="{Binding History}"
PreviewMouseDown="OnPreviewMouseButtonDown" /> PreviewMouseDown="OnPreviewMouseButtonDown" />
</ContentControl> </ContentControl>

View file

@ -20,8 +20,8 @@ using Flow.Launcher.Infrastructure;
using System.Windows.Media; using System.Windows.Media;
using Flow.Launcher.Infrastructure.Hotkey; using Flow.Launcher.Infrastructure.Hotkey;
using Flow.Launcher.Plugin.SharedCommands; using Flow.Launcher.Plugin.SharedCommands;
using System.Windows.Threading;
using System.Windows.Data; using System.Windows.Data;
using System.Diagnostics;
namespace Flow.Launcher namespace Flow.Launcher
{ {
@ -45,7 +45,9 @@ namespace Flow.Launcher
DataContext = mainVM; DataContext = mainVM;
_viewModel = mainVM; _viewModel = mainVM;
_settings = settings; _settings = settings;
InitializeComponent(); InitializeComponent();
InitializePosition();
animationSound.Open(new Uri(AppDomain.CurrentDomain.BaseDirectory + "Resources\\open.wav")); animationSound.Open(new Uri(AppDomain.CurrentDomain.BaseDirectory + "Resources\\open.wav"));
} }
@ -53,6 +55,7 @@ namespace Flow.Launcher
{ {
InitializeComponent(); InitializeComponent();
} }
private void OnCopy(object sender, ExecutedRoutedEventArgs e) private void OnCopy(object sender, ExecutedRoutedEventArgs e)
{ {
if (QueryTextBox.SelectionLength == 0) if (QueryTextBox.SelectionLength == 0)
@ -108,7 +111,6 @@ namespace Flow.Launcher
animationSound.Position = TimeSpan.Zero; animationSound.Position = TimeSpan.Zero;
animationSound.Play(); animationSound.Play();
} }
UpdatePosition(); UpdatePosition();
Activate(); Activate();
QueryTextBox.Focus(); QueryTextBox.Focus();
@ -161,6 +163,7 @@ namespace Flow.Launcher
_viewModel.QueryTextCursorMovedToEnd = false; _viewModel.QueryTextCursorMovedToEnd = false;
} }
break; break;
} }
}; };
_settings.PropertyChanged += (o, e) => _settings.PropertyChanged += (o, e) =>
@ -176,17 +179,51 @@ namespace Flow.Launcher
case nameof(Settings.Hotkey): case nameof(Settings.Hotkey):
UpdateNotifyIconText(); UpdateNotifyIconText();
break; break;
case nameof(Settings.WindowLeft):
Left = _settings.WindowLeft;
break;
case nameof(Settings.WindowTop):
Top = _settings.WindowTop;
break;
} }
}; };
} }
private void InitializePosition()
{
switch (_settings.SearchWindowPosition)
{
case SearchWindowPositions.RememberLastLaunchLocation:
Top = _settings.WindowTop;
Left = _settings.WindowLeft;
break;
case SearchWindowPositions.MouseScreenCenter:
Left = HorizonCenter();
Top = VerticalCenter();
break;
case SearchWindowPositions.MouseScreenCenterTop:
Left = HorizonCenter();
Top = 10;
break;
case SearchWindowPositions.MouseScreenLeftTop:
Left = 10;
Top = 10;
break;
case SearchWindowPositions.MouseScreenRightTop:
Left = HorizonRight();
Top = 10;
break;
}
}
private void UpdateNotifyIconText() private void UpdateNotifyIconText()
{ {
var menu = contextMenu; var menu = contextMenu;
((MenuItem)menu.Items[1]).Header = InternationalizationManager.Instance.GetTranslation("iconTrayOpen") + " (" + _settings.Hotkey + ")"; ((MenuItem)menu.Items[1]).Header = InternationalizationManager.Instance.GetTranslation("iconTrayOpen") + " (" + _settings.Hotkey + ")";
((MenuItem)menu.Items[2]).Header = InternationalizationManager.Instance.GetTranslation("GameMode"); ((MenuItem)menu.Items[2]).Header = InternationalizationManager.Instance.GetTranslation("GameMode");
((MenuItem)menu.Items[3]).Header = InternationalizationManager.Instance.GetTranslation("iconTraySettings"); ((MenuItem)menu.Items[3]).Header = InternationalizationManager.Instance.GetTranslation("PositionReset");
((MenuItem)menu.Items[4]).Header = InternationalizationManager.Instance.GetTranslation("iconTrayExit"); ((MenuItem)menu.Items[4]).Header = InternationalizationManager.Instance.GetTranslation("iconTraySettings");
((MenuItem)menu.Items[5]).Header = InternationalizationManager.Instance.GetTranslation("iconTrayExit");
} }
private void InitializeNotifyIcon() private void InitializeNotifyIcon()
@ -212,6 +249,10 @@ namespace Flow.Launcher
{ {
Header = InternationalizationManager.Instance.GetTranslation("GameMode") Header = InternationalizationManager.Instance.GetTranslation("GameMode")
}; };
var positionreset = new MenuItem
{
Header = InternationalizationManager.Instance.GetTranslation("PositionReset")
};
var settings = new MenuItem var settings = new MenuItem
{ {
Header = InternationalizationManager.Instance.GetTranslation("iconTraySettings") Header = InternationalizationManager.Instance.GetTranslation("iconTraySettings")
@ -223,12 +264,15 @@ namespace Flow.Launcher
open.Click += (o, e) => _viewModel.ToggleFlowLauncher(); open.Click += (o, e) => _viewModel.ToggleFlowLauncher();
gamemode.Click += (o, e) => ToggleGameMode(); gamemode.Click += (o, e) => ToggleGameMode();
positionreset.Click += (o, e) => PositionReset();
settings.Click += (o, e) => App.API.OpenSettingDialog(); settings.Click += (o, e) => App.API.OpenSettingDialog();
exit.Click += (o, e) => Close(); exit.Click += (o, e) => Close();
contextMenu.Items.Add(header); contextMenu.Items.Add(header);
contextMenu.Items.Add(open); contextMenu.Items.Add(open);
gamemode.ToolTip = InternationalizationManager.Instance.GetTranslation("GameModeToolTip"); gamemode.ToolTip = InternationalizationManager.Instance.GetTranslation("GameModeToolTip");
positionreset.ToolTip = InternationalizationManager.Instance.GetTranslation("PositionResetToolTip");
contextMenu.Items.Add(gamemode); contextMenu.Items.Add(gamemode);
contextMenu.Items.Add(positionreset);
contextMenu.Items.Add(settings); contextMenu.Items.Add(settings);
contextMenu.Items.Add(exit); contextMenu.Items.Add(exit);
@ -275,10 +319,17 @@ namespace Flow.Launcher
_viewModel.GameModeStatus = true; _viewModel.GameModeStatus = true;
} }
} }
private async void PositionReset()
{
_viewModel.Show();
await Task.Delay(300); // If don't give a time, Positioning will be weird.
Left = HorizonCenter();
Top = VerticalCenter();
}
private void InitProgressbarAnimation() private void InitProgressbarAnimation()
{ {
var da = new DoubleAnimation(ProgressBar.X2, ActualWidth + 150, var da = new DoubleAnimation(ProgressBar.X2, ActualWidth + 150,
new Duration(new TimeSpan(0, 0, 0, 0, 1600))); 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))); 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(da, new PropertyPath("(Line.X2)"));
Storyboard.SetTargetProperty(da1, new PropertyPath("(Line.X1)")); Storyboard.SetTargetProperty(da1, new PropertyPath("(Line.X1)"));
@ -382,6 +433,8 @@ namespace Flow.Launcher
private async void OnDeactivated(object sender, EventArgs e) private async void OnDeactivated(object sender, EventArgs e)
{ {
_settings.WindowLeft = Left;
_settings.WindowTop = Top;
//This condition stops extra hide call when animator is on, //This condition stops extra hide call when animator is on,
// which causes the toggling to occasional hide instead of show. // which causes the toggling to occasional hide instead of show.
if (_viewModel.MainWindowVisibilityStatus) if (_viewModel.MainWindowVisibilityStatus)
@ -403,24 +456,14 @@ namespace Flow.Launcher
{ {
if (_animating) if (_animating)
return; return;
InitializePosition();
if (_settings.RememberLastLaunchLocation)
{
Left = _settings.WindowLeft;
Top = _settings.WindowTop;
}
else
{
Left = WindowLeft();
Top = WindowTop();
}
} }
private void OnLocationChanged(object sender, EventArgs e) private void OnLocationChanged(object sender, EventArgs e)
{ {
if (_animating) if (_animating)
return; return;
if (_settings.RememberLastLaunchLocation) if (_settings.SearchWindowPosition == SearchWindowPositions.RememberLastLaunchLocation)
{ {
_settings.WindowLeft = Left; _settings.WindowLeft = Left;
_settings.WindowTop = Top; _settings.WindowTop = Top;
@ -440,16 +483,7 @@ namespace Flow.Launcher
} }
} }
private void InitializePosition() public double HorizonCenter()
{
if (!_settings.RememberLastLaunchLocation)
{
Left = WindowLeft();
Top = WindowTop();
}
}
public double WindowLeft()
{ {
var screen = Screen.FromPoint(System.Windows.Forms.Cursor.Position); var screen = Screen.FromPoint(System.Windows.Forms.Cursor.Position);
var dip1 = WindowsInteropHelper.TransformPixelsToDIP(this, screen.WorkingArea.X, 0); var dip1 = WindowsInteropHelper.TransformPixelsToDIP(this, screen.WorkingArea.X, 0);
@ -458,7 +492,7 @@ namespace Flow.Launcher
return left; return left;
} }
public double WindowTop() public double VerticalCenter()
{ {
var screen = Screen.FromPoint(System.Windows.Forms.Cursor.Position); var screen = Screen.FromPoint(System.Windows.Forms.Cursor.Position);
var dip1 = WindowsInteropHelper.TransformPixelsToDIP(this, 0, screen.WorkingArea.Y); var dip1 = WindowsInteropHelper.TransformPixelsToDIP(this, 0, screen.WorkingArea.Y);
@ -467,6 +501,15 @@ namespace Flow.Launcher
return top; return top;
} }
public double HorizonRight()
{
var screen = Screen.FromPoint(System.Windows.Forms.Cursor.Position);
var dip1 = WindowsInteropHelper.TransformPixelsToDIP(this, screen.WorkingArea.X, 0);
var dip2 = WindowsInteropHelper.TransformPixelsToDIP(this, screen.WorkingArea.Width, 0);
var left = (dip2.X - ActualWidth) - 10;
return left;
}
/// <summary> /// <summary>
/// Register up and down key /// Register up and down key
/// todo: any way to put this in xaml ? /// todo: any way to put this in xaml ?

View file

@ -7,7 +7,6 @@
xmlns:flowlauncher="clr-namespace:Flow.Launcher" xmlns:flowlauncher="clr-namespace:Flow.Launcher"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:scm="clr-namespace:System.ComponentModel;assembly=WindowsBase" xmlns:scm="clr-namespace:System.ComponentModel;assembly=WindowsBase"
xmlns:svgc="http://sharpvectors.codeplex.com/svgc/"
xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:ui="http://schemas.modernwpf.com/2019" xmlns:ui="http://schemas.modernwpf.com/2019"
xmlns:userSettings="clr-namespace:Flow.Launcher.Infrastructure.UserSettings;assembly=Flow.Launcher.Infrastructure" xmlns:userSettings="clr-namespace:Flow.Launcher.Infrastructure.UserSettings;assembly=Flow.Launcher.Infrastructure"
@ -40,6 +39,8 @@
<Window.Resources> <Window.Resources>
<converters:BorderClipConverter x:Key="BorderClipConverter" /> <converters:BorderClipConverter x:Key="BorderClipConverter" />
<converters:BoolToVisibilityConverter x:Key="BoolToVisibilityConverter" />
<converters:TextConverter x:Key="TextConverter" />
<CollectionViewSource x:Key="SortedFonts" Source="{Binding Source={x:Static Fonts.SystemFontFamilies}}"> <CollectionViewSource x:Key="SortedFonts" Source="{Binding Source={x:Static Fonts.SystemFontFamilies}}">
<CollectionViewSource.SortDescriptions> <CollectionViewSource.SortDescriptions>
<scm:SortDescription PropertyName="Source" /> <scm:SortDescription PropertyName="Source" />
@ -685,12 +686,25 @@
</ItemsControl> </ItemsControl>
</Border> </Border>
<Border Style="{DynamicResource SettingGroupBox}"> <Border Margin="0,30,0,0" Style="{DynamicResource SettingGroupBox}">
<ItemsControl Style="{StaticResource SettingGrid}"> <ItemsControl Style="{StaticResource SettingGrid}">
<StackPanel Style="{StaticResource TextPanel}"> <StackPanel Style="{StaticResource TextPanel}">
<TextBlock Style="{DynamicResource SettingTitleLabel}" Text="{DynamicResource rememberLastLocation}" /> <TextBlock Style="{DynamicResource SettingTitleLabel}" Text="{DynamicResource SearchWindowPosition}" />
</StackPanel> </StackPanel>
<CheckBox IsChecked="{Binding Settings.RememberLastLaunchLocation}" Style="{DynamicResource SideControlCheckBox}" /> <ComboBox
x:Name="SearchWindowPosition"
Grid.Column="2"
MinWidth="220"
Margin="0,0,18,0"
VerticalAlignment="Center"
DisplayMemberPath="Display"
FontSize="14"
ItemsSource="{Binding SearchWindowPositions}"
SelectedValue="{Binding Settings.SearchWindowPosition}"
SelectedValuePath="Value" />
<TextBlock Style="{StaticResource Glyph}">
&#xe7f4;
</TextBlock>
</ItemsControl> </ItemsControl>
</Border> </Border>
@ -1317,7 +1331,7 @@
FontSize="11" FontSize="11"
Foreground="{DynamicResource PluginInfoColor}" Foreground="{DynamicResource PluginInfoColor}"
MouseUp="OnExternalPluginUninstallClick" MouseUp="OnExternalPluginUninstallClick"
Text="{DynamicResource plugin_uninstall}" Text="{DynamicResource uninstallbtn}"
TextDecorations="Underline" /> TextDecorations="Underline" />
<TextBlock <TextBlock
@ -1464,6 +1478,32 @@
ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.HorizontalScrollBarVisibility="Disabled"
SelectionMode="Single" SelectionMode="Single"
Style="{DynamicResource StoreListStyle}"> Style="{DynamicResource StoreListStyle}">
<ListBox.GroupStyle>
<GroupStyle>
<GroupStyle.ContainerStyle>
<Style TargetType="{x:Type GroupItem}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate>
<Grid>
<StackPanel Orientation="Vertical">
<TextBlock
Margin="0,0,0,10"
VerticalAlignment="Top"
FontSize="16"
FontWeight="Bold"
Text="{Binding Name, Converter={StaticResource TextConverter}}" />
<ItemsPresenter />
</StackPanel>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</GroupStyle.ContainerStyle>
</GroupStyle>
</ListBox.GroupStyle>
<ListBox.ItemsPanel> <ListBox.ItemsPanel>
<ItemsPanelTemplate> <ItemsPanelTemplate>
<UniformGrid <UniformGrid
@ -1520,33 +1560,16 @@
HorizontalAlignment="Right" HorizontalAlignment="Right"
Orientation="Horizontal"> Orientation="Horizontal">
<Border <Border
x:Name="LabelNew" x:Name="LabelUpdate"
Height="12"
Margin="0,10,8,0" Margin="0,10,8,0"
Padding="6,2,6,2" Padding="6,2,6,2"
HorizontalAlignment="Right" HorizontalAlignment="Right"
VerticalAlignment="Top" VerticalAlignment="Top"
Background="#f14551" Background="#45BD59"
CornerRadius="4" CornerRadius="36"
Visibility="Collapsed"> ToolTip="{DynamicResource LabelUpdateToolTip}"
<TextBlock Visibility="{Binding LabelUpdate, Converter={StaticResource BoolToVisibilityConverter}}" />
FontSize="11"
Foreground="White"
Text="New" />
</Border>
<Border
x:Name="Labelinstalled"
Margin="0,10,8,0"
Padding="6,2,6,2"
HorizontalAlignment="Right"
VerticalAlignment="Top"
Background="{DynamicResource ToggleSwitchFillOn}"
CornerRadius="4"
Visibility="Collapsed">
<TextBlock
FontSize="11"
Foreground="White"
Text="Installed" />
</Border>
</StackPanel> </StackPanel>
<StackPanel <StackPanel
@ -1605,7 +1628,7 @@
<Run <Run
FontSize="12" FontSize="12"
Foreground="{DynamicResource Color04B}" Foreground="{DynamicResource Color04B}"
Text="{Binding Description}" /> Text="{Binding Description, Mode=OneWay}" />
</TextBlock> </TextBlock>
</StackPanel> </StackPanel>
@ -1667,25 +1690,45 @@
Foreground="{DynamicResource Color04B}" Foreground="{DynamicResource Color04B}"
NavigateUri="{Binding Website}" NavigateUri="{Binding Website}"
RequestNavigate="OnRequestNavigate"> RequestNavigate="OnRequestNavigate">
<Run FontSize="12" Text="{Binding Author}" /> <Run FontSize="12" Text="{Binding Author, Mode=OneWay}" />
</Hyperlink> </Hyperlink>
</TextBlock> </TextBlock>
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
<Border <Grid Grid.Row="0" Grid.Column="1">
Grid.Row="0" <StackPanel
Grid.Column="1"
Padding="0,0,0,0">
<Button
Name="ShortCutButtonPrev"
MinHeight="40"
Margin="0,70,20,0" Margin="0,70,20,0"
Padding="15,5,15,5"
HorizontalAlignment="Right" HorizontalAlignment="Right"
VerticalAlignment="Center" Orientation="Horizontal">
Click="OnExternalPluginInstallClick" <Button
Content="{DynamicResource install}" /> MinHeight="40"
</Border> Padding="15,5,15,5"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Click="OnExternalPluginInstallClick"
Content="{DynamicResource installbtn}"
Visibility="{Binding LabelInstalled, Converter={StaticResource BoolToVisibilityConverter}, ConverterParameter='!'}" />
<Button
MinHeight="40"
Margin="5,0,0,0"
Padding="15,5,15,5"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Click="OnExternalPluginUninstallClick"
Content="{DynamicResource uninstallbtn}"
Visibility="{Binding LabelInstalled, Converter={StaticResource BoolToVisibilityConverter}}" />
<Button
MinHeight="40"
Margin="5,0,0,0"
Padding="15,5,15,5"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Click="OnExternalPluginUpdateClick"
Content="{DynamicResource updatebtn}"
Visibility="{Binding LabelUpdate, Converter={StaticResource BoolToVisibilityConverter}}" />
<!-- Hide Install Button when installed Item -->
</StackPanel>
</Grid>
</Grid> </Grid>
</StackPanel> </StackPanel>
</Grid> </Grid>
@ -1766,8 +1809,11 @@
IsReadOnly="True" IsReadOnly="True"
Style="{DynamicResource QueryBoxStyle}" Style="{DynamicResource QueryBoxStyle}"
Text="{DynamicResource hiThere}" /> Text="{DynamicResource hiThere}" />
</Border> </Border>
<StackPanel x:Name="ClockPanel" Style="{DynamicResource ClockPanel}">
<TextBlock x:Name="DateBox" Style="{DynamicResource DateBox}" />
<TextBlock x:Name="ClockBox" Style="{DynamicResource ClockBox}" />
</StackPanel>
<Canvas Style="{DynamicResource SearchIconPosition}"> <Canvas Style="{DynamicResource SearchIconPosition}">
<Path <Path
Margin="0" Margin="0"
@ -2090,7 +2136,88 @@
<StackPanel> <StackPanel>
<Border <Border
Margin="0,30,0,0" Margin="0,24,0,12"
Padding="0"
CornerRadius="5"
Style="{DynamicResource SettingGroupBox}">
<StackPanel Orientation="Vertical">
<Border
Margin="0"
BorderThickness="0"
Style="{DynamicResource SettingGroupBox}">
<ItemsControl Style="{StaticResource SettingGrid}">
<StackPanel Style="{StaticResource TextPanel}">
<TextBlock Style="{DynamicResource SettingTitleLabel}" Text="{DynamicResource Clock}" />
</StackPanel>
<StackPanel
Grid.Row="0"
Grid.Column="2"
Orientation="Horizontal">
<ComboBox
x:Name="TimeFormat"
Grid.Column="2"
MinWidth="180"
Margin="0,0,18,0"
VerticalAlignment="Center"
FontSize="14"
ItemsSource="{Binding TimeFormatList}"
SelectedValue="{Binding Settings.TimeFormat}"
SelectionChanged="PreviewClockAndDate" />
<ui:ToggleSwitch
IsOn="{Binding UseClock, Mode=TwoWay}"
OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}"
Style="{DynamicResource SideToggleSwitch}"
Toggled="PreviewClockAndDate" />
</StackPanel>
<TextBlock Style="{StaticResource Glyph}">
&#xec92;
</TextBlock>
</ItemsControl>
</Border>
<Separator
Width="Auto"
BorderThickness="1"
Style="{StaticResource SettingSeparatorStyle}" />
<Border
Margin="0"
BorderThickness="0"
Style="{DynamicResource SettingGroupBox}">
<ItemsControl Style="{StaticResource SettingGrid}">
<StackPanel Style="{StaticResource TextPanel}">
<TextBlock Style="{DynamicResource SettingTitleLabel}" Text="{DynamicResource Date}" />
</StackPanel>
<StackPanel
Grid.Row="0"
Grid.Column="2"
Orientation="Horizontal">
<ComboBox
x:Name="DateFormat"
Grid.Column="2"
MinWidth="180"
Margin="0,0,18,0"
VerticalAlignment="Center"
FontSize="14"
ItemsSource="{Binding DateFormatList}"
SelectedValue="{Binding Settings.DateFormat}"
SelectionChanged="PreviewClockAndDate" />
<ui:ToggleSwitch
IsOn="{Binding UseDate, Mode=TwoWay}"
OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}"
Style="{DynamicResource SideToggleSwitch}"
Toggled="PreviewClockAndDate" />
</StackPanel>
<TextBlock Style="{StaticResource Glyph}">
&#xe787;
</TextBlock>
</ItemsControl>
</Border>
</StackPanel>
</Border>
<Border
Margin="0,12,0,12"
Padding="0" Padding="0"
CornerRadius="5" CornerRadius="5"
Style="{DynamicResource SettingGroupBox}"> Style="{DynamicResource SettingGroupBox}">

View file

@ -1,31 +1,23 @@
using Droplex; using Flow.Launcher.Core.Plugin;
using Flow.Launcher.Core.ExternalPlugins;
using Flow.Launcher.Core.Plugin;
using Flow.Launcher.Core.Resource; using Flow.Launcher.Core.Resource;
using Flow.Launcher.Helper; using Flow.Launcher.Helper;
using Flow.Launcher.Infrastructure; using Flow.Launcher.Infrastructure;
using Flow.Launcher.Infrastructure.Hotkey; using Flow.Launcher.Infrastructure.Hotkey;
using Flow.Launcher.Infrastructure.Logger;
using Flow.Launcher.Infrastructure.UserSettings; using Flow.Launcher.Infrastructure.UserSettings;
using Flow.Launcher.Plugin; using Flow.Launcher.Plugin;
using Flow.Launcher.Plugin.SharedCommands; using Flow.Launcher.Plugin.SharedCommands;
using Flow.Launcher.ViewModel; using Flow.Launcher.ViewModel;
using Microsoft.Win32;
using ModernWpf; using ModernWpf;
using System; using System;
using System.IO; using System.IO;
using System.Linq;
using System.Windows; using System.Windows;
using System.Windows.Controls;
using System.Windows.Data; using System.Windows.Data;
using System.Windows.Forms; using System.Windows.Forms;
using System.Windows.Input; using System.Windows.Input;
using System.Windows.Interop; using System.Windows.Interop;
using System.Windows.Media;
using System.Windows.Navigation; using System.Windows.Navigation;
using Button = System.Windows.Controls.Button; using Button = System.Windows.Controls.Button;
using Control = System.Windows.Controls.Control; using Control = System.Windows.Controls.Control;
using ListViewItem = System.Windows.Controls.ListViewItem;
using KeyEventArgs = System.Windows.Input.KeyEventArgs; using KeyEventArgs = System.Windows.Input.KeyEventArgs;
using MessageBox = System.Windows.MessageBox; using MessageBox = System.Windows.MessageBox;
using TextBox = System.Windows.Controls.TextBox; using TextBox = System.Windows.Controls.TextBox;
@ -47,6 +39,10 @@ namespace Flow.Launcher
API = api; API = api;
InitializePosition(); InitializePosition();
InitializeComponent(); InitializeComponent();
CollectionView view = (CollectionView)CollectionViewSource.GetDefaultView(StoreListBox.ItemsSource);
PropertyGroupDescription groupDescription = new PropertyGroupDescription("Category");
view.GroupDescriptions.Add(groupDescription);
} }
#region General #region General
@ -67,6 +63,7 @@ namespace Flow.Launcher
pluginStoreView.Filter = PluginStoreFilter; pluginStoreView.Filter = PluginStoreFilter;
InitializePosition(); InitializePosition();
ClockDisplay();
} }
private void OnSelectPythonDirectoryClick(object sender, RoutedEventArgs e) private void OnSelectPythonDirectoryClick(object sender, RoutedEventArgs e)
@ -306,15 +303,34 @@ namespace Flow.Launcher
private void OnExternalPluginInstallClick(object sender, RoutedEventArgs e) private void OnExternalPluginInstallClick(object sender, RoutedEventArgs e)
{ {
if (sender is Button { DataContext: UserPlugin plugin }) if (sender is Button { DataContext: PluginStoreItemViewModel plugin })
{ {
var pluginsManagerPlugin = PluginManager.GetPluginForId("9f8f9b14-2518-4907-b211-35ab6290dee7"); viewModel.DisplayPluginQuery($"install {plugin.Name}", PluginManager.GetPluginForId("9f8f9b14-2518-4907-b211-35ab6290dee7"));
var actionKeyword = pluginsManagerPlugin.Metadata.ActionKeywords.Count == 0 ? "" : pluginsManagerPlugin.Metadata.ActionKeywords[0];
API.ChangeQuery($"{actionKeyword} install {plugin.Name}");
API.ShowMainWindow();
} }
} }
private void OnExternalPluginUninstallClick(object sender, MouseButtonEventArgs e)
{
if (e.ChangedButton == MouseButton.Left)
{
var name = viewModel.SelectedPlugin.PluginPair.Metadata.Name;
viewModel.DisplayPluginQuery($"uninstall {name}", PluginManager.GetPluginForId("9f8f9b14-2518-4907-b211-35ab6290dee7"));
}
}
private void OnExternalPluginUninstallClick(object sender, RoutedEventArgs e)
{
if (sender is Button { DataContext: PluginStoreItemViewModel plugin })
viewModel.DisplayPluginQuery($"uninstall {plugin.Name}", PluginManager.GetPluginForId("9f8f9b14-2518-4907-b211-35ab6290dee7"));
}
private void OnExternalPluginUpdateClick(object sender, RoutedEventArgs e)
{
if (sender is Button { DataContext: PluginStoreItemViewModel plugin })
viewModel.DisplayPluginQuery($"update {plugin.Name}", PluginManager.GetPluginForId("9f8f9b14-2518-4907-b211-35ab6290dee7"));
}
private void window_MouseDown(object sender, MouseButtonEventArgs e) /* for close hotkey popup */ private void window_MouseDown(object sender, MouseButtonEventArgs e) /* for close hotkey popup */
{ {
if (Keyboard.FocusedElement is not TextBox textBox) if (Keyboard.FocusedElement is not TextBox textBox)
@ -388,7 +404,7 @@ namespace Flow.Launcher
{ {
if (string.IsNullOrEmpty(pluginStoreFilterTxb.Text)) if (string.IsNullOrEmpty(pluginStoreFilterTxb.Text))
return true; return true;
if (item is UserPlugin model) if (item is PluginStoreItemViewModel model)
{ {
return StringMatcher.FuzzySearch(pluginStoreFilterTxb.Text, model.Name).IsSearchPrecisionScoreMet() return StringMatcher.FuzzySearch(pluginStoreFilterTxb.Text, model.Name).IsSearchPrecisionScoreMet()
|| StringMatcher.FuzzySearch(pluginStoreFilterTxb.Text, model.Description).IsSearchPrecisionScoreMet(); || StringMatcher.FuzzySearch(pluginStoreFilterTxb.Text, model.Description).IsSearchPrecisionScoreMet();
@ -443,6 +459,33 @@ namespace Flow.Launcher
} }
} }
private void PreviewClockAndDate(object sender, RoutedEventArgs e)
{
ClockDisplay();
}
public void ClockDisplay()
{
if (settings.UseClock)
{
ClockBox.Visibility = Visibility.Visible;
ClockBox.Text = DateTime.Now.ToString(settings.TimeFormat);
}
else
{
ClockBox.Visibility = Visibility.Collapsed;
}
if (settings.UseDate)
{
DateBox.Visibility = Visibility.Visible;
DateBox.Text = DateTime.Now.ToString(settings.DateFormat);
}
else
{
DateBox.Visibility = Visibility.Collapsed;
}
}
public void InitializePosition() public void InitializePosition()
{ {
if (settings.SettingWindowTop >= 0 && settings.SettingWindowLeft >= 0) if (settings.SettingWindowTop >= 0 && settings.SettingWindowLeft >= 0)
@ -473,17 +516,6 @@ namespace Flow.Launcher
var top = (dip2.Y - this.ActualHeight) / 2 + dip1.Y - 20; var top = (dip2.Y - this.ActualHeight) / 2 + dip1.Y - 20;
return top; return top;
} }
private void OnExternalPluginUninstallClick(object sender, MouseButtonEventArgs e)
{
if (e.ChangedButton == MouseButton.Left)
{
var id = viewModel.SelectedPlugin.PluginPair.Metadata.Name;
var pluginsManagerPlugin = PluginManager.GetPluginForId("9f8f9b14-2518-4907-b211-35ab6290dee7");
var actionKeyword = pluginsManagerPlugin.Metadata.ActionKeywords.Count == 0 ? "" : pluginsManagerPlugin.Metadata.ActionKeywords[0];
API.ChangeQuery($"{actionKeyword} uninstall {id}");
API.ShowMainWindow();
}
}
} }
} }

View file

@ -1,64 +1,100 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" <ResourceDictionary
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:system="clr-namespace:System;assembly=mscorlib"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:system="clr-namespace:System;assembly=mscorlib">
<ResourceDictionary.MergedDictionaries> <ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/Themes/Base.xaml" /> <ResourceDictionary Source="pack://application:,,,/Themes/Base.xaml" />
</ResourceDictionary.MergedDictionaries> </ResourceDictionary.MergedDictionaries>
<Style x:Key="ItemGlyph" BasedOn="{StaticResource BaseGlyphStyle}" TargetType="{x:Type TextBlock}"> <Style
x:Key="ItemGlyph"
BasedOn="{StaticResource BaseGlyphStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#9fb2bf" /> <Setter Property="Foreground" Value="#9fb2bf" />
</Style> </Style>
<Style x:Key="QueryBoxStyle" BasedOn="{StaticResource BaseQueryBoxStyle}" TargetType="{x:Type TextBox}"> <Style
<Setter Property="SelectionBrush" Value="#515a6b"/> x:Key="QueryBoxStyle"
BasedOn="{StaticResource BaseQueryBoxStyle}"
TargetType="{x:Type TextBox}">
<Setter Property="SelectionBrush" Value="#515a6b" />
<Setter Property="FontSize" Value="24" /> <Setter Property="FontSize" Value="24" />
<Setter Property="Background" Value="#282c34" /> <Setter Property="Background" Value="#282c34" />
<Setter Property="Foreground" Value="#61afef" /> <Setter Property="Foreground" Value="#61afef" />
<Setter Property="CaretBrush" Value="#ffb86c" /> <Setter Property="CaretBrush" Value="#ffb86c" />
<Setter Property="FontSize" Value="26" /> <Setter Property="FontSize" Value="26" />
<Setter Property="Padding" Value="0 4 66 0" /> <Setter Property="Padding" Value="0,4,66,0" />
<Setter Property="Height" Value="42" /> <Setter Property="Height" Value="42" />
</Style> </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="Background" Value="#282c34" /> <Setter Property="Background" Value="#282c34" />
<Setter Property="Foreground" Value="#454e61" /> <Setter Property="Foreground" Value="#454e61" />
<Setter Property="FontSize" Value="26" /> <Setter Property="FontSize" Value="26" />
<Setter Property="Padding" Value="0 4 66 0" /> <Setter Property="Padding" Value="0,4,66,0" />
<Setter Property="Height" Value="42" /> <Setter Property="Height" Value="42" />
</Style> </Style>
<Style x:Key="WindowBorderStyle" BasedOn="{StaticResource BaseWindowBorderStyle}" TargetType="{x:Type Border}"> <Style
x:Key="WindowBorderStyle"
BasedOn="{StaticResource BaseWindowBorderStyle}"
TargetType="{x:Type Border}">
<Setter Property="BorderThickness" Value="2" /> <Setter Property="BorderThickness" Value="2" />
<Setter Property="BorderBrush" Value="#44475a" /> <Setter Property="BorderBrush" Value="#44475a" />
<Setter Property="CornerRadius" Value="5" /> <Setter Property="CornerRadius" Value="5" />
<Setter Property="Background" Value="#282c34" /> <Setter Property="Background" Value="#282c34" />
</Style> </Style>
<Style x:Key="WindowStyle" BasedOn="{StaticResource BaseWindowStyle}" TargetType="{x:Type Window}"> <Style
x:Key="WindowStyle"
BasedOn="{StaticResource BaseWindowStyle}"
TargetType="{x:Type Window}">
<Setter Property="Width" Value="576" /> <Setter Property="Width" Value="576" />
<Setter Property="RenderOptions.ClearTypeHint" Value="Enabled"/> <Setter Property="RenderOptions.ClearTypeHint" Value="Enabled" />
</Style> </Style>
<Style x:Key="PendingLineStyle" BasedOn="{StaticResource BasePendingLineStyle}" TargetType="{x:Type Line}"> <Style
</Style> x:Key="PendingLineStyle"
BasedOn="{StaticResource BasePendingLineStyle}"
TargetType="{x:Type Line}" />
<!-- Item Style --> <!-- Item Style -->
<Style x:Key="ItemTitleStyle" BasedOn="{StaticResource BaseItemTitleStyle}" TargetType="{x:Type TextBlock}"> <Style
x:Key="ItemTitleStyle"
BasedOn="{StaticResource BaseItemTitleStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#9fb2bf" /> <Setter Property="Foreground" Value="#9fb2bf" />
</Style> </Style>
<Style x:Key="ItemSubTitleStyle" BasedOn="{StaticResource BaseItemSubTitleStyle}" TargetType="{x:Type TextBlock}" > <Style
x:Key="ItemSubTitleStyle"
BasedOn="{StaticResource BaseItemSubTitleStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#6272a4 " /> <Setter Property="Foreground" Value="#6272a4 " />
<Setter Property="FontSize" Value="13" /> <Setter Property="FontSize" Value="13" />
</Style> </Style>
<Style x:Key="ItemNumberStyle" BasedOn="{StaticResource BaseItemNumberStyle}" TargetType="{x:Type TextBlock}"> <Style
x:Key="ItemNumberStyle"
BasedOn="{StaticResource BaseItemNumberStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#6272a4" /> <Setter Property="Foreground" Value="#6272a4" />
</Style> </Style>
<Style x:Key="ItemTitleSelectedStyle" BasedOn="{StaticResource BaseItemTitleSelectedStyle}" TargetType="{x:Type TextBlock}" > <Style
x:Key="ItemTitleSelectedStyle"
BasedOn="{StaticResource BaseItemTitleSelectedStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Cursor" Value="Arrow" /> <Setter Property="Cursor" Value="Arrow" />
<Setter Property="Foreground" Value="#e5c07b" /> <Setter Property="Foreground" Value="#e5c07b" />
</Style> </Style>
<Style x:Key="ItemSubTitleSelectedStyle" BasedOn="{StaticResource BaseItemSubTitleSelectedStyle}" TargetType="{x:Type TextBlock}" > <Style
x:Key="ItemSubTitleSelectedStyle"
BasedOn="{StaticResource BaseItemSubTitleSelectedStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Cursor" Value="Arrow" /> <Setter Property="Cursor" Value="Arrow" />
<Setter Property="Foreground" Value="#c678dd" /> <Setter Property="Foreground" Value="#c678dd" />
</Style> </Style>
<SolidColorBrush x:Key="ItemSelectedBackgroundColor">#2c313c</SolidColorBrush> <SolidColorBrush x:Key="ItemSelectedBackgroundColor">#2c313c</SolidColorBrush>
<Style x:Key="ItemImageSelectedStyle" BasedOn="{StaticResource BaseItemImageSelectedStyle}" TargetType="{x:Type Image}" > <Style
x:Key="ItemImageSelectedStyle"
BasedOn="{StaticResource BaseItemImageSelectedStyle}"
TargetType="{x:Type Image}">
<Setter Property="Cursor" Value="Arrow" /> <Setter Property="Cursor" Value="Arrow" />
</Style> </Style>
<Style x:Key="HighlightStyle"> <Style x:Key="HighlightStyle">
@ -68,36 +104,67 @@
<Setter Property="FontSize" Value="13" /> <Setter Property="FontSize" Value="13" />
<Setter Property="Foreground" Value="#6272a4" /> <Setter Property="Foreground" Value="#6272a4" />
</Style> </Style>
<Style x:Key="ItemHotkeySelectedStyle" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource BaseItemHotkeySelecetedStyle}"> <Style
x:Key="ItemHotkeySelectedStyle"
BasedOn="{StaticResource BaseItemHotkeySelecetedStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="FontSize" Value="13" /> <Setter Property="FontSize" Value="13" />
<Setter Property="Foreground" Value="#56b6c2" /> <Setter Property="Foreground" Value="#56b6c2" />
</Style> </Style>
<!-- button style in the middle of the scrollbar --> <!-- button style in the middle of the scrollbar -->
<Style x:Key="ThumbStyle" BasedOn="{StaticResource BaseThumbStyle}" TargetType="{x:Type Thumb}"> <Style
<Setter Property="SnapsToDevicePixels" Value="True"/> x:Key="ThumbStyle"
<Setter Property="OverridesDefaultStyle" Value="true"/> BasedOn="{StaticResource BaseThumbStyle}"
<Setter Property="IsTabStop" Value="false"/> TargetType="{x:Type Thumb}">
<Setter Property="Width" Value="2"/> <Setter Property="SnapsToDevicePixels" Value="True" />
<Setter Property="Focusable" Value="false"/> <Setter Property="OverridesDefaultStyle" Value="true" />
<Setter Property="IsTabStop" Value="false" />
<Setter Property="Width" Value="2" />
<Setter Property="Focusable" Value="false" />
<Setter Property="Template"> <Setter Property="Template">
<Setter.Value> <Setter.Value>
<ControlTemplate TargetType="{x:Type Thumb}"> <ControlTemplate TargetType="{x:Type Thumb}">
<Border CornerRadius="2" DockPanel.Dock="Right" Background="#b4b5b7" BorderBrush="Transparent" BorderThickness="0" /> <Border
Background="#b4b5b7"
BorderBrush="Transparent"
BorderThickness="0"
CornerRadius="2"
DockPanel.Dock="Right" />
</ControlTemplate> </ControlTemplate>
</Setter.Value> </Setter.Value>
</Setter> </Setter>
</Style> </Style>
<Style x:Key="ScrollBarStyle" BasedOn="{StaticResource BaseScrollBarStyle}" TargetType="{x:Type ScrollBar}"> <Style
x:Key="ScrollBarStyle"
BasedOn="{StaticResource BaseScrollBarStyle}"
TargetType="{x:Type ScrollBar}" />
<Style
x:Key="SeparatorStyle"
BasedOn="{StaticResource BaseSeparatorStyle}"
TargetType="{x:Type Rectangle}">
<Setter Property="Fill" Value="#495162" />
<Setter Property="Height" Value="1" />
<Setter Property="Margin" Value="12,0,12,8" />
</Style> </Style>
<Style x:Key="SeparatorStyle" BasedOn="{StaticResource BaseSeparatorStyle}" TargetType="{x:Type Rectangle}"> <Style
<Setter Property="Fill" Value="#495162"/> x:Key="SearchIconStyle"
<Setter Property="Height" Value="1"/> BasedOn="{StaticResource BaseSearchIconStyle}"
<Setter Property="Margin" Value="12 0 12 8"/> TargetType="{x:Type Path}">
</Style>
<Style x:Key="SearchIconStyle" TargetType="{x:Type Path}" BasedOn="{StaticResource BaseSearchIconStyle}">
<Setter Property="Fill" Value="#495162" /> <Setter Property="Fill" Value="#495162" />
<Setter Property="Width" Value="32" /> <Setter Property="Width" Value="32" />
<Setter Property="Height" Value="32" /> <Setter Property="Height" Value="32" />
<Setter Property="Opacity" Value="0.8" /> <Setter Property="Opacity" Value="0.8" />
</Style> </Style>
<Style
x:Key="ClockBox"
BasedOn="{StaticResource BaseClockBox}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#495162" />
</Style>
<Style
x:Key="DateBox"
BasedOn="{StaticResource BaseDateBox}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#495162" />
</Style>
</ResourceDictionary> </ResourceDictionary>

View file

@ -79,6 +79,83 @@
<Setter Property="Stroke" Value="Blue" /> <Setter Property="Stroke" Value="Blue" />
</Style> </Style>
<Style x:Key="BaseClockPosition" TargetType="{x:Type Canvas}" />
<Style x:Key="BaseClockPanel" TargetType="{x:Type StackPanel}">
<Setter Property="Orientation" Value="Horizontal" />
<Setter Property="HorizontalAlignment" Value="Right" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="Height" Value="Auto" />
<Setter Property="Margin" Value="0,0,14,0" />
<Setter Property="Visibility" Value="Collapsed" />
</Style>
<Style x:Key="BaseClockBox" TargetType="{x:Type TextBlock}">
<Setter Property="FontSize" Value="22" />
<Setter Property="Foreground" Value="#8f8f8f" />
<Setter Property="HorizontalAlignment" Value="Right" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="Margin" Value="0,0,2,0" />
</Style>
<Style x:Key="BaseDateBox" TargetType="{x:Type TextBlock}">
<Setter Property="FontSize" Value="16" />
<Setter Property="Foreground" Value="#8f8f8f" />
<Setter Property="HorizontalAlignment" Value="Right" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="Margin" Value="0,0,10,0" />
</Style>
<Style
x:Key="ClockBox"
BasedOn="{StaticResource BaseClockBox}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#C6C6C6" />
</Style>
<Style
x:Key="DateBox"
BasedOn="{StaticResource BaseDateBox}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#C6C6C6" />
</Style>
<Style
x:Key="ClockPanel"
BasedOn="{StaticResource BaseClockPanel}"
TargetType="{x:Type StackPanel}">
<Setter Property="Margin" Value="0,0,66,0" />
<Setter Property="Visibility" Value="Visible" />
<Style.Triggers>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding ElementName=QueryTextBox, UpdateSourceTrigger=PropertyChanged, Path=Text.Length}" Value="0" />
<Condition Binding="{Binding ElementName=ContextMenu, Path=Visibility}" Value="Collapsed" />
<Condition Binding="{Binding ElementName=History, Path=Visibility}" Value="Collapsed" />
</MultiDataTrigger.Conditions>
<MultiDataTrigger.EnterActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation
Storyboard.TargetProperty="Opacity"
From="0.0"
To="1.0"
Duration="0:0:0.2" />
</Storyboard>
</BeginStoryboard>
</MultiDataTrigger.EnterActions>
<MultiDataTrigger.ExitActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation
Storyboard.TargetProperty="Opacity"
To="0.0"
Duration="0:0:0.2" />
</Storyboard>
</BeginStoryboard>
</MultiDataTrigger.ExitActions>
</MultiDataTrigger>
</Style.Triggers>
</Style>
<!-- Item Style --> <!-- Item Style -->
<Style x:Key="ProgressBarResult" TargetType="{x:Type ProgressBar}"> <Style x:Key="ProgressBarResult" TargetType="{x:Type ProgressBar}">

View file

@ -7,6 +7,7 @@
</ResourceDictionary.MergedDictionaries> </ResourceDictionary.MergedDictionaries>
<system:Boolean x:Key="ThemeBlurEnabled">True</system:Boolean> <system:Boolean x:Key="ThemeBlurEnabled">True</system:Boolean>
<Style x:Key="WindowRadius" TargetType="{x:Type Border}"> <Style x:Key="WindowRadius" TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="0" /> <Setter Property="CornerRadius" Value="0" />
</Style> </Style>
@ -36,6 +37,7 @@
x:Key="WindowBorderStyle" x:Key="WindowBorderStyle"
BasedOn="{StaticResource BaseWindowBorderStyle}" BasedOn="{StaticResource BaseWindowBorderStyle}"
TargetType="{x:Type Border}"> TargetType="{x:Type Border}">
<Setter Property="BorderThickness" Value="1" /> <Setter Property="BorderThickness" Value="1" />
<Setter Property="BorderBrush" Value="#444444" /> <Setter Property="BorderBrush" Value="#444444" />
<Setter Property="CornerRadius" Value="0" /> <Setter Property="CornerRadius" Value="0" />
@ -140,4 +142,18 @@
<Setter Property="Foreground" Value="#ffffff" /> <Setter Property="Foreground" Value="#ffffff" />
<Setter Property="Opacity" Value="0.2" /> <Setter Property="Opacity" Value="0.2" />
</Style> </Style>
<Style
x:Key="ClockBox"
BasedOn="{StaticResource BaseClockBox}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#ffffff" />
<Setter Property="Opacity" Value="0.2" />
</Style>
<Style
x:Key="DateBox"
BasedOn="{StaticResource BaseDateBox}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#ffffff" />
<Setter Property="Opacity" Value="0.2" />
</Style>
</ResourceDictionary> </ResourceDictionary>

View file

@ -50,7 +50,7 @@
TargetType="{x:Type Window}"> TargetType="{x:Type Window}">
<Setter Property="Background"> <Setter Property="Background">
<Setter.Value> <Setter.Value>
<SolidColorBrush Opacity="0.5" /> <SolidColorBrush Opacity="0.5" Color="White" />
</Setter.Value> </Setter.Value>
</Setter> </Setter>
</Style> </Style>
@ -143,4 +143,18 @@
<Setter Property="Foreground" Value="#000000" /> <Setter Property="Foreground" Value="#000000" />
<Setter Property="Opacity" Value="0.2" /> <Setter Property="Opacity" Value="0.2" />
</Style> </Style>
<Style
x:Key="ClockBox"
BasedOn="{StaticResource BaseClockBox}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#000000" />
<Setter Property="Opacity" Value="0.2" />
</Style>
<Style
x:Key="DateBox"
BasedOn="{StaticResource BaseDateBox}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#000000" />
<Setter Property="Opacity" Value="0.2" />
</Style>
</ResourceDictionary> </ResourceDictionary>

View file

@ -1,84 +1,131 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" <ResourceDictionary
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:system="clr-namespace:System;assembly=mscorlib"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:system="clr-namespace:System;assembly=mscorlib">
<ResourceDictionary.MergedDictionaries> <ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/Themes/Base.xaml" /> <ResourceDictionary Source="pack://application:,,,/Themes/Base.xaml" />
</ResourceDictionary.MergedDictionaries> </ResourceDictionary.MergedDictionaries>
<Style x:Key="ItemGlyph" BasedOn="{StaticResource BaseGlyphStyle}" TargetType="{x:Type TextBlock}"> <Style
x:Key="ItemGlyph"
BasedOn="{StaticResource BaseGlyphStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#ebebeb" /> <Setter Property="Foreground" Value="#ebebeb" />
</Style> </Style>
<Style x:Key="QueryBoxStyle" BasedOn="{StaticResource BaseQueryBoxStyle}" TargetType="{x:Type TextBox}"> <Style
x:Key="QueryBoxStyle"
BasedOn="{StaticResource BaseQueryBoxStyle}"
TargetType="{x:Type TextBox}">
<Setter Property="Foreground" Value="#ebebeb" /> <Setter Property="Foreground" Value="#ebebeb" />
<Setter Property="Background" Value="Transparent" /> <Setter Property="Background" Value="Transparent" />
</Style> </Style>
<Style x:Key="QuerySuggestionBoxStyle" BasedOn="{StaticResource BaseQuerySuggestionBoxStyle}" TargetType="{x:Type TextBox}"> <Style
<Setter Property="Foreground" Value="Transparent" /> x:Key="QuerySuggestionBoxStyle"
BasedOn="{StaticResource BaseQuerySuggestionBoxStyle}"
TargetType="{x:Type TextBox}">
<Setter Property="Foreground" Value="Transparent" />
</Style> </Style>
<Style x:Key="WindowBorderStyle" BasedOn="{StaticResource BaseWindowBorderStyle}" TargetType="{x:Type Border}"> <Style
<Setter Property="CornerRadius" Value="5" /> x:Key="WindowBorderStyle"
<Setter Property="BorderThickness" Value="1 1 0 0" /> BasedOn="{StaticResource BaseWindowBorderStyle}"
TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="5" />
<Setter Property="BorderThickness" Value="1,1,0,0" />
<Setter Property="BorderBrush" Value="#666666" /> <Setter Property="BorderBrush" Value="#666666" />
<Setter Property="Background"> <Setter Property="Background">
<Setter.Value> <Setter.Value>
<SolidColorBrush Color="#333333" Opacity="0.95"/> <SolidColorBrush Opacity="0.95" Color="#333333" />
</Setter.Value> </Setter.Value>
</Setter> </Setter>
</Style> </Style>
<Style x:Key="WindowStyle" BasedOn="{StaticResource BaseWindowStyle}" TargetType="{x:Type Window}"> <Style
x:Key="WindowStyle"
BasedOn="{StaticResource BaseWindowStyle}"
TargetType="{x:Type Window}">
<Setter Property="Background"> <Setter Property="Background">
<Setter.Value> <Setter.Value>
<SolidColorBrush Color="White" Opacity="0.5"/> <SolidColorBrush Opacity="0.5" Color="White" />
</Setter.Value> </Setter.Value>
</Setter> </Setter>
</Style> </Style>
<Style x:Key="PendingLineStyle" BasedOn="{StaticResource BasePendingLineStyle}" TargetType="{x:Type Line}"> <Style
</Style> x:Key="PendingLineStyle"
BasedOn="{StaticResource BasePendingLineStyle}"
TargetType="{x:Type Line}" />
<!-- Item Style --> <!-- Item Style -->
<Style x:Key="ItemTitleStyle" BasedOn="{StaticResource BaseItemTitleStyle}" TargetType="{x:Type TextBlock}"> <Style
<Setter Property="Margin" Value="0, -10"/> x:Key="ItemTitleStyle"
<Setter Property="Foreground" Value="#ebebeb"/> BasedOn="{StaticResource BaseItemTitleStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Margin" Value="0,-10" />
<Setter Property="Foreground" Value="#ebebeb" />
</Style> </Style>
<Style x:Key="ItemSubTitleStyle" BasedOn="{StaticResource BaseItemSubTitleStyle}" TargetType="{x:Type TextBlock}" > <Style
<Setter Property="Foreground" Value="#787878"/> x:Key="ItemSubTitleStyle"
BasedOn="{StaticResource BaseItemSubTitleStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#787878" />
</Style> </Style>
<Style x:Key="ItemTitleSelectedStyle" BasedOn="{StaticResource BaseItemTitleSelectedStyle}" TargetType="{x:Type TextBlock}" > <Style
<Setter Property="Margin" Value="0, -10"/> x:Key="ItemTitleSelectedStyle"
<Setter Property="Foreground" Value="#ffffff"/> BasedOn="{StaticResource BaseItemTitleSelectedStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Margin" Value="0,-10" />
<Setter Property="Foreground" Value="#ffffff" />
</Style> </Style>
<Style x:Key="ItemSubTitleSelectedStyle" BasedOn="{StaticResource BaseItemSubTitleSelectedStyle}" TargetType="{x:Type TextBlock}" > <Style
<Setter Property="Foreground" Value="#949494"/> x:Key="ItemSubTitleSelectedStyle"
BasedOn="{StaticResource BaseItemSubTitleSelectedStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#949494" />
</Style> </Style>
<SolidColorBrush x:Key="ItemSelectedBackgroundColor">#545454</SolidColorBrush> <SolidColorBrush x:Key="ItemSelectedBackgroundColor">#545454</SolidColorBrush>
<!-- button style in the middle of the scrollbar --> <!-- button style in the middle of the scrollbar -->
<Style x:Key="ThumbStyle" BasedOn="{StaticResource BaseThumbStyle}" TargetType="{x:Type Thumb}"> <Style
x:Key="ThumbStyle"
BasedOn="{StaticResource BaseThumbStyle}"
TargetType="{x:Type Thumb}">
<Setter Property="Template"> <Setter Property="Template">
<Setter.Value> <Setter.Value>
<ControlTemplate TargetType="{x:Type Thumb}"> <ControlTemplate TargetType="{x:Type Thumb}">
<Border CornerRadius="2" DockPanel.Dock="Right" Background="#525252" BorderBrush="Transparent" BorderThickness="0" /> <Border
Background="#525252"
BorderBrush="Transparent"
BorderThickness="0"
CornerRadius="2"
DockPanel.Dock="Right" />
</ControlTemplate> </ControlTemplate>
</Setter.Value> </Setter.Value>
</Setter> </Setter>
</Style> </Style>
<Style x:Key="ScrollBarStyle" BasedOn="{StaticResource BaseScrollBarStyle}" TargetType="{x:Type ScrollBar}"> <Style
<Setter Property="Background" Value="#a0a0a0"/> x:Key="ScrollBarStyle"
BasedOn="{StaticResource BaseScrollBarStyle}"
TargetType="{x:Type ScrollBar}">
<Setter Property="Background" Value="#a0a0a0" />
</Style> </Style>
<Style x:Key="SearchIconStyle" TargetType="{x:Type Path}" BasedOn="{StaticResource BaseSearchIconStyle}"> <Style
x:Key="SearchIconStyle"
BasedOn="{StaticResource BaseSearchIconStyle}"
TargetType="{x:Type Path}">
<Setter Property="Fill" Value="#FFFFFF" /> <Setter Property="Fill" Value="#FFFFFF" />
<Setter Property="Width" Value="32" /> <Setter Property="Width" Value="32" />
<Setter Property="Height" Value="32" /> <Setter Property="Height" Value="32" />
<Setter Property="Opacity" Value="0.2" /> <Setter Property="Opacity" Value="0.2" />
</Style> </Style>
<Style x:Key="SeparatorStyle" BasedOn="{StaticResource BaseSeparatorStyle}" TargetType="{x:Type Rectangle}"> <Style
<Setter Property="Fill" Value="#787878"/> x:Key="SeparatorStyle"
<Setter Property="Height" Value="1"/> BasedOn="{StaticResource BaseSeparatorStyle}"
<Setter Property="Margin" Value="0 0 0 8"/> TargetType="{x:Type Rectangle}">
<Setter Property="Fill" Value="#787878" />
<Setter Property="Height" Value="1" />
<Setter Property="Margin" Value="0,0,0,8" />
<Setter Property="Opacity" Value="0.3" /> <Setter Property="Opacity" Value="0.3" />
</Style> </Style>
<Style x:Key="ItemHotkeyStyle" TargetType="{x:Type TextBlock}"> <Style x:Key="ItemHotkeyStyle" TargetType="{x:Type TextBlock}">
@ -91,5 +138,16 @@
<Setter Property="Foreground" Value="#787878" /> <Setter Property="Foreground" Value="#787878" />
<Setter Property="Opacity" Value="0.1" /> <Setter Property="Opacity" Value="0.1" />
</Style> </Style>
<Style
x:Key="ClockBox"
BasedOn="{StaticResource BaseClockBox}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#787878" />
</Style>
<Style
x:Key="DateBox"
BasedOn="{StaticResource BaseDateBox}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#787878" />
</Style>
</ResourceDictionary> </ResourceDictionary>

View file

@ -1,51 +1,97 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" <ResourceDictionary
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:system="clr-namespace:System;assembly=mscorlib"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:system="clr-namespace:System;assembly=mscorlib">
<ResourceDictionary.MergedDictionaries> <ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/Themes/Base.xaml" /> <ResourceDictionary Source="pack://application:,,,/Themes/Base.xaml" />
</ResourceDictionary.MergedDictionaries> </ResourceDictionary.MergedDictionaries>
<Style x:Key="ItemGlyph" BasedOn="{StaticResource BaseGlyphStyle}" TargetType="{x:Type TextBlock}"> <Style
x:Key="ItemGlyph"
BasedOn="{StaticResource BaseGlyphStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#ffffff" /> <Setter Property="Foreground" Value="#ffffff" />
</Style> </Style>
<Style x:Key="QueryBoxStyle" BasedOn="{StaticResource BaseQueryBoxStyle}" TargetType="{x:Type TextBox}"> <Style
<Setter Property="SelectionBrush" Value="#6e6e6e"/> x:Key="QueryBoxStyle"
<Setter Property="SelectionBrush" Value="#4D4D4D"/> BasedOn="{StaticResource BaseQueryBoxStyle}"
TargetType="{x:Type TextBox}">
<Setter Property="SelectionBrush" Value="#6e6e6e" />
<Setter Property="SelectionBrush" Value="#4D4D4D" />
</Style> </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" /> <Setter Property="Foreground" Value="#8f8f8f" />
</Style> </Style>
<Style x:Key="WindowBorderStyle" BasedOn="{StaticResource BaseWindowBorderStyle}" TargetType="{x:Type Border}"> <Style
</Style> x:Key="WindowBorderStyle"
BasedOn="{StaticResource BaseWindowBorderStyle}"
TargetType="{x:Type Border}" />
<Style x:Key="WindowStyle" BasedOn="{StaticResource BaseWindowStyle}" TargetType="{x:Type Window}"> <Style
</Style> x:Key="WindowStyle"
BasedOn="{StaticResource BaseWindowStyle}"
TargetType="{x:Type Window}" />
<Style x:Key="PendingLineStyle" BasedOn="{StaticResource BasePendingLineStyle}" TargetType="{x:Type Line}"> <Style
</Style> x:Key="PendingLineStyle"
BasedOn="{StaticResource BasePendingLineStyle}"
TargetType="{x:Type Line}" />
<!-- Item Style --> <!-- Item Style -->
<Style x:Key="ItemTitleStyle" BasedOn="{StaticResource BaseItemTitleStyle}" TargetType="{x:Type TextBlock}"> <Style
</Style> x:Key="ItemTitleStyle"
<Style x:Key="ItemSubTitleStyle" BasedOn="{StaticResource BaseItemSubTitleStyle}" TargetType="{x:Type TextBlock}" > BasedOn="{StaticResource BaseItemTitleStyle}"
TargetType="{x:Type TextBlock}" />
<Style
x:Key="ItemSubTitleStyle"
BasedOn="{StaticResource BaseItemSubTitleStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#8f8f8f" /> <Setter Property="Foreground" Value="#8f8f8f" />
</Style> </Style>
<Style x:Key="ItemTitleSelectedStyle" BasedOn="{StaticResource BaseItemTitleSelectedStyle}" TargetType="{x:Type TextBlock}" > <Style
x:Key="ItemTitleSelectedStyle"
BasedOn="{StaticResource BaseItemTitleSelectedStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Cursor" Value="Arrow" /> <Setter Property="Cursor" Value="Arrow" />
</Style> </Style>
<Style x:Key="ItemSubTitleSelectedStyle" BasedOn="{StaticResource BaseItemSubTitleSelectedStyle}" TargetType="{x:Type TextBlock}" > <Style
x:Key="ItemSubTitleSelectedStyle"
BasedOn="{StaticResource BaseItemSubTitleSelectedStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#8f8f8f" /> <Setter Property="Foreground" Value="#8f8f8f" />
<Setter Property="Cursor" Value="Arrow" /> <Setter Property="Cursor" Value="Arrow" />
</Style> </Style>
<SolidColorBrush x:Key="ItemSelectedBackgroundColor">#4d4d4d</SolidColorBrush> <SolidColorBrush x:Key="ItemSelectedBackgroundColor">#4d4d4d</SolidColorBrush>
<Style x:Key="ItemImageSelectedStyle" BasedOn="{StaticResource BaseItemImageSelectedStyle}" TargetType="{x:Type Image}" > <Style
x:Key="ItemImageSelectedStyle"
BasedOn="{StaticResource BaseItemImageSelectedStyle}"
TargetType="{x:Type Image}">
<Setter Property="Cursor" Value="Arrow" /> <Setter Property="Cursor" Value="Arrow" />
</Style> </Style>
<!-- button style in the middle of the scrollbar --> <!-- button style in the middle of the scrollbar -->
<Style x:Key="ThumbStyle" BasedOn="{StaticResource BaseThumbStyle}" TargetType="{x:Type Thumb}"> <Style
</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="ScrollBarStyle"
BasedOn="{StaticResource BaseScrollBarStyle}"
TargetType="{x:Type ScrollBar}" />
<Style
x:Key="ClockBox"
BasedOn="{StaticResource BaseClockBox}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#6e6e6e" />
</Style>
<Style
x:Key="DateBox"
BasedOn="{StaticResource BaseDateBox}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#6e6e6e" />
</Style> </Style>
</ResourceDictionary> </ResourceDictionary>

View file

@ -1,64 +1,101 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" <ResourceDictionary
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:system="clr-namespace:System;assembly=mscorlib"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:system="clr-namespace:System;assembly=mscorlib">
<ResourceDictionary.MergedDictionaries> <ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/Themes/Base.xaml" /> <ResourceDictionary Source="pack://application:,,,/Themes/Base.xaml" />
</ResourceDictionary.MergedDictionaries> </ResourceDictionary.MergedDictionaries>
<Style x:Key="ItemGlyph" BasedOn="{StaticResource BaseGlyphStyle}" TargetType="{x:Type TextBlock}"> <Style
x:Key="ItemGlyph"
BasedOn="{StaticResource BaseGlyphStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#ffffff" /> <Setter Property="Foreground" Value="#ffffff" />
</Style> </Style>
<Style x:Key="QueryBoxStyle" BasedOn="{StaticResource BaseQueryBoxStyle}" TargetType="{x:Type TextBox}"> <Style
x:Key="QueryBoxStyle"
BasedOn="{StaticResource BaseQueryBoxStyle}"
TargetType="{x:Type TextBox}">
<Setter Property="Foreground" Value="#dcddde" /> <Setter Property="Foreground" Value="#dcddde" />
<Setter Property="Background" Value="#36393f" /> <Setter Property="Background" Value="#36393f" />
<Setter Property="CaretBrush" Value="#ffffff" /> <Setter Property="CaretBrush" Value="#ffffff" />
<Setter Property="SelectionBrush" Value="#0a68d8"/> <Setter Property="SelectionBrush" Value="#0a68d8" />
<Setter Property="Height" Value="42" /> <Setter Property="Height" Value="42" />
<Setter Property="FontSize" Value="24" /> <Setter Property="FontSize" Value="24" />
<Setter Property="Padding" Value="0 0 66 0" /> <Setter Property="Padding" Value="0,0,66,0" />
</Style> </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="#72767d" /> <Setter Property="Foreground" Value="#72767d" />
<Setter Property="Background" Value="#36393f" /> <Setter Property="Background" Value="#36393f" />
<Setter Property="Height" Value="42" /> <Setter Property="Height" Value="42" />
<Setter Property="FontSize" Value="24" /> <Setter Property="FontSize" Value="24" />
<Setter Property="Padding" Value="0 0 66 0" /> <Setter Property="Padding" Value="0,0,66,0" />
</Style> </Style>
<Style x:Key="WindowBorderStyle" BasedOn="{StaticResource BaseWindowBorderStyle}" TargetType="{x:Type Border}"> <Style
x:Key="WindowBorderStyle"
BasedOn="{StaticResource BaseWindowBorderStyle}"
TargetType="{x:Type Border}">
<Setter Property="BorderThickness" Value="2" /> <Setter Property="BorderThickness" Value="2" />
<Setter Property="BorderBrush" Value="#2f3136" /> <Setter Property="BorderBrush" Value="#2f3136" />
<Setter Property="CornerRadius" Value="4" /> <Setter Property="CornerRadius" Value="4" />
<Setter Property="Background" Value="#36393f" /> <Setter Property="Background" Value="#36393f" />
</Style> </Style>
<Style x:Key="WindowStyle" BasedOn="{StaticResource BaseWindowStyle}" TargetType="{x:Type Window}"> <Style
x:Key="WindowStyle"
BasedOn="{StaticResource BaseWindowStyle}"
TargetType="{x:Type Window}">
<Setter Property="Width" Value="576" /> <Setter Property="Width" Value="576" />
<Setter Property="RenderOptions.ClearTypeHint" Value="Enabled"/> <Setter Property="RenderOptions.ClearTypeHint" Value="Enabled" />
</Style> </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="#ffffff" /> <Setter Property="Stroke" Value="#ffffff" />
<Setter Property="Opacity" Value="0.6" /> <Setter Property="Opacity" Value="0.6" />
</Style> </Style>
<!-- Item Style --> <!-- Item Style -->
<Style x:Key="ItemTitleStyle" BasedOn="{StaticResource BaseItemTitleStyle}" TargetType="{x:Type TextBlock}"> <Style
x:Key="ItemTitleStyle"
BasedOn="{StaticResource BaseItemTitleStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#dcddde" /> <Setter Property="Foreground" Value="#dcddde" />
</Style> </Style>
<Style x:Key="ItemSubTitleStyle" BasedOn="{StaticResource BaseItemSubTitleStyle}" TargetType="{x:Type TextBlock}" > <Style
x:Key="ItemSubTitleStyle"
BasedOn="{StaticResource BaseItemSubTitleStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#72767d" /> <Setter Property="Foreground" Value="#72767d" />
<Setter Property="FontSize" Value="13" /> <Setter Property="FontSize" Value="13" />
</Style> </Style>
<Style x:Key="ItemNumberStyle" BasedOn="{StaticResource BaseItemNumberStyle}" TargetType="{x:Type TextBlock}"> <Style
x:Key="ItemNumberStyle"
BasedOn="{StaticResource BaseItemNumberStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#A6A6A6" /> <Setter Property="Foreground" Value="#A6A6A6" />
</Style> </Style>
<Style x:Key="ItemTitleSelectedStyle" BasedOn="{StaticResource BaseItemTitleSelectedStyle}" TargetType="{x:Type TextBlock}" > <Style
x:Key="ItemTitleSelectedStyle"
BasedOn="{StaticResource BaseItemTitleSelectedStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Cursor" Value="Arrow" /> <Setter Property="Cursor" Value="Arrow" />
<Setter Property="Foreground" Value="#32bd6a" /> <Setter Property="Foreground" Value="#32bd6a" />
</Style> </Style>
<Style x:Key="ItemSubTitleSelectedStyle" BasedOn="{StaticResource BaseItemSubTitleSelectedStyle}" TargetType="{x:Type TextBlock}" > <Style
x:Key="ItemSubTitleSelectedStyle"
BasedOn="{StaticResource BaseItemSubTitleSelectedStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Cursor" Value="Arrow" /> <Setter Property="Cursor" Value="Arrow" />
<Setter Property="Foreground" Value="#72767d" /> <Setter Property="Foreground" Value="#72767d" />
</Style> </Style>
<SolidColorBrush x:Key="ItemSelectedBackgroundColor">#49443c</SolidColorBrush> <SolidColorBrush x:Key="ItemSelectedBackgroundColor">#49443c</SolidColorBrush>
<Style x:Key="ItemImageSelectedStyle" BasedOn="{StaticResource BaseItemImageSelectedStyle}" TargetType="{x:Type Image}" > <Style
x:Key="ItemImageSelectedStyle"
BasedOn="{StaticResource BaseItemImageSelectedStyle}"
TargetType="{x:Type Image}">
<Setter Property="Cursor" Value="Arrow" /> <Setter Property="Cursor" Value="Arrow" />
</Style> </Style>
<Style x:Key="HighlightStyle"> <Style x:Key="HighlightStyle">
@ -74,30 +111,58 @@
<Setter Property="Foreground" Value="#72767d" /> <Setter Property="Foreground" Value="#72767d" />
<Setter Property="Opacity" Value="0.8" /> <Setter Property="Opacity" Value="0.8" />
</Style> </Style>
<!-- button style in the middle of the scrollbar --> <!-- button style in the middle of the scrollbar -->
<Style x:Key="ThumbStyle" BasedOn="{StaticResource BaseThumbStyle}" TargetType="{x:Type Thumb}"> <Style
<Setter Property="SnapsToDevicePixels" Value="True"/> x:Key="ThumbStyle"
<Setter Property="OverridesDefaultStyle" Value="true"/> BasedOn="{StaticResource BaseThumbStyle}"
<Setter Property="IsTabStop" Value="false"/> TargetType="{x:Type Thumb}">
<Setter Property="Focusable" Value="false"/> <Setter Property="SnapsToDevicePixels" Value="True" />
<Setter Property="OverridesDefaultStyle" Value="true" />
<Setter Property="IsTabStop" Value="false" />
<Setter Property="Focusable" Value="false" />
<Setter Property="Template"> <Setter Property="Template">
<Setter.Value> <Setter.Value>
<ControlTemplate TargetType="{x:Type Thumb}"> <ControlTemplate TargetType="{x:Type Thumb}">
<Border CornerRadius="2" DockPanel.Dock="Right" Background="#202225" BorderBrush="Transparent" BorderThickness="0" /> <Border
Background="#202225"
BorderBrush="Transparent"
BorderThickness="0"
CornerRadius="2"
DockPanel.Dock="Right" />
</ControlTemplate> </ControlTemplate>
</Setter.Value> </Setter.Value>
</Setter> </Setter>
</Style> </Style>
<Style x:Key="ScrollBarStyle" BasedOn="{StaticResource BaseScrollBarStyle}" TargetType="{x:Type ScrollBar}"> <Style
x:Key="ScrollBarStyle"
BasedOn="{StaticResource BaseScrollBarStyle}"
TargetType="{x:Type ScrollBar}" />
<Style
x:Key="SeparatorStyle"
BasedOn="{StaticResource BaseSeparatorStyle}"
TargetType="{x:Type Rectangle}">
<Setter Property="Fill" Value="#42454a" />
<Setter Property="Height" Value="1" />
<Setter Property="Margin" Value="12,0,12,8" />
</Style> </Style>
<Style x:Key="SeparatorStyle" BasedOn="{StaticResource BaseSeparatorStyle}" TargetType="{x:Type Rectangle}"> <Style
<Setter Property="Fill" Value="#42454a"/> x:Key="SearchIconStyle"
<Setter Property="Height" Value="1"/> BasedOn="{StaticResource BaseSearchIconStyle}"
<Setter Property="Margin" Value="12 0 12 8"/> TargetType="{x:Type Path}">
</Style>
<Style x:Key="SearchIconStyle" TargetType="{x:Type Path}" BasedOn="{StaticResource BaseSearchIconStyle}">
<Setter Property="Fill" Value="#42454a" /> <Setter Property="Fill" Value="#42454a" />
<Setter Property="Width" Value="32" /> <Setter Property="Width" Value="32" />
<Setter Property="Height" Value="32" /> <Setter Property="Height" Value="32" />
</Style> </Style>
<Style
x:Key="ClockBox"
BasedOn="{StaticResource BaseClockBox}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#72767d" />
</Style>
<Style
x:Key="DateBox"
BasedOn="{StaticResource BaseDateBox}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#72767d" />
</Style>
</ResourceDictionary> </ResourceDictionary>

View file

@ -1,64 +1,100 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" <ResourceDictionary
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:system="clr-namespace:System;assembly=mscorlib"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:system="clr-namespace:System;assembly=mscorlib">
<ResourceDictionary.MergedDictionaries> <ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/Themes/Base.xaml" /> <ResourceDictionary Source="pack://application:,,,/Themes/Base.xaml" />
</ResourceDictionary.MergedDictionaries> </ResourceDictionary.MergedDictionaries>
<Style x:Key="ItemGlyph" BasedOn="{StaticResource BaseGlyphStyle}" TargetType="{x:Type TextBlock}"> <Style
x:Key="ItemGlyph"
BasedOn="{StaticResource BaseGlyphStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#f8f8f2" /> <Setter Property="Foreground" Value="#f8f8f2" />
</Style> </Style>
<Style x:Key="QueryBoxStyle" BasedOn="{StaticResource BaseQueryBoxStyle}" TargetType="{x:Type TextBox}"> <Style
<Setter Property="SelectionBrush" Value="#ff79c6"/> x:Key="QueryBoxStyle"
BasedOn="{StaticResource BaseQueryBoxStyle}"
TargetType="{x:Type TextBox}">
<Setter Property="SelectionBrush" Value="#ff79c6" />
<Setter Property="FontSize" Value="24" /> <Setter Property="FontSize" Value="24" />
<Setter Property="Background" Value="#282a36" /> <Setter Property="Background" Value="#282a36" />
<Setter Property="Foreground" Value="#f8f8f2" /> <Setter Property="Foreground" Value="#f8f8f2" />
<Setter Property="CaretBrush" Value="#ffb86c" /> <Setter Property="CaretBrush" Value="#ffb86c" />
<Setter Property="FontSize" Value="26" /> <Setter Property="FontSize" Value="26" />
<Setter Property="Padding" Value="0 4 66 0" /> <Setter Property="Padding" Value="0,4,66,0" />
<Setter Property="Height" Value="42" /> <Setter Property="Height" Value="42" />
</Style> </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="Background" Value="#282a36" /> <Setter Property="Background" Value="#282a36" />
<Setter Property="Foreground" Value="#6272a4" /> <Setter Property="Foreground" Value="#6272a4" />
<Setter Property="FontSize" Value="26" /> <Setter Property="FontSize" Value="26" />
<Setter Property="Padding" Value="0 4 66 0" /> <Setter Property="Padding" Value="0,4,66,0" />
<Setter Property="Height" Value="42" /> <Setter Property="Height" Value="42" />
</Style> </Style>
<Style x:Key="WindowBorderStyle" BasedOn="{StaticResource BaseWindowBorderStyle}" TargetType="{x:Type Border}"> <Style
x:Key="WindowBorderStyle"
BasedOn="{StaticResource BaseWindowBorderStyle}"
TargetType="{x:Type Border}">
<Setter Property="BorderThickness" Value="2" /> <Setter Property="BorderThickness" Value="2" />
<Setter Property="BorderBrush" Value="#44475a" /> <Setter Property="BorderBrush" Value="#44475a" />
<Setter Property="CornerRadius" Value="5" /> <Setter Property="CornerRadius" Value="5" />
<Setter Property="Background" Value="#282a36" /> <Setter Property="Background" Value="#282a36" />
</Style> </Style>
<Style x:Key="WindowStyle" BasedOn="{StaticResource BaseWindowStyle}" TargetType="{x:Type Window}"> <Style
x:Key="WindowStyle"
BasedOn="{StaticResource BaseWindowStyle}"
TargetType="{x:Type Window}">
<Setter Property="Width" Value="576" /> <Setter Property="Width" Value="576" />
<Setter Property="RenderOptions.ClearTypeHint" Value="Enabled"/> <Setter Property="RenderOptions.ClearTypeHint" Value="Enabled" />
</Style> </Style>
<Style x:Key="PendingLineStyle" BasedOn="{StaticResource BasePendingLineStyle}" TargetType="{x:Type Line}"> <Style
</Style> x:Key="PendingLineStyle"
BasedOn="{StaticResource BasePendingLineStyle}"
TargetType="{x:Type Line}" />
<!-- Item Style --> <!-- Item Style -->
<Style x:Key="ItemTitleStyle" BasedOn="{StaticResource BaseItemTitleStyle}" TargetType="{x:Type TextBlock}"> <Style
x:Key="ItemTitleStyle"
BasedOn="{StaticResource BaseItemTitleStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#f8f8f2" /> <Setter Property="Foreground" Value="#f8f8f2" />
</Style> </Style>
<Style x:Key="ItemSubTitleStyle" BasedOn="{StaticResource BaseItemSubTitleStyle}" TargetType="{x:Type TextBlock}" > <Style
x:Key="ItemSubTitleStyle"
BasedOn="{StaticResource BaseItemSubTitleStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#6272a4" /> <Setter Property="Foreground" Value="#6272a4" />
<Setter Property="FontSize" Value="13" /> <Setter Property="FontSize" Value="13" />
</Style> </Style>
<Style x:Key="ItemNumberStyle" BasedOn="{StaticResource BaseItemNumberStyle}" TargetType="{x:Type TextBlock}"> <Style
x:Key="ItemNumberStyle"
BasedOn="{StaticResource BaseItemNumberStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#6272a4" /> <Setter Property="Foreground" Value="#6272a4" />
</Style> </Style>
<Style x:Key="ItemTitleSelectedStyle" BasedOn="{StaticResource BaseItemTitleSelectedStyle}" TargetType="{x:Type TextBlock}" > <Style
x:Key="ItemTitleSelectedStyle"
BasedOn="{StaticResource BaseItemTitleSelectedStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Cursor" Value="Arrow" /> <Setter Property="Cursor" Value="Arrow" />
<Setter Property="Foreground" Value="#ff79c6" /> <Setter Property="Foreground" Value="#ff79c6" />
</Style> </Style>
<Style x:Key="ItemSubTitleSelectedStyle" BasedOn="{StaticResource BaseItemSubTitleSelectedStyle}" TargetType="{x:Type TextBlock}" > <Style
x:Key="ItemSubTitleSelectedStyle"
BasedOn="{StaticResource BaseItemSubTitleSelectedStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Cursor" Value="Arrow" /> <Setter Property="Cursor" Value="Arrow" />
<Setter Property="Foreground" Value="#6272a4" /> <Setter Property="Foreground" Value="#6272a4" />
</Style> </Style>
<SolidColorBrush x:Key="ItemSelectedBackgroundColor">#44475a</SolidColorBrush> <SolidColorBrush x:Key="ItemSelectedBackgroundColor">#44475a</SolidColorBrush>
<Style x:Key="ItemImageSelectedStyle" BasedOn="{StaticResource BaseItemImageSelectedStyle}" TargetType="{x:Type Image}" > <Style
x:Key="ItemImageSelectedStyle"
BasedOn="{StaticResource BaseItemImageSelectedStyle}"
TargetType="{x:Type Image}">
<Setter Property="Cursor" Value="Arrow" /> <Setter Property="Cursor" Value="Arrow" />
</Style> </Style>
<Style x:Key="HighlightStyle"> <Style x:Key="HighlightStyle">
@ -68,36 +104,67 @@
<Setter Property="FontSize" Value="13" /> <Setter Property="FontSize" Value="13" />
<Setter Property="Foreground" Value="#6272a4" /> <Setter Property="Foreground" Value="#6272a4" />
</Style> </Style>
<Style x:Key="ItemHotkeySelectedStyle" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource BaseItemHotkeySelecetedStyle}"> <Style
x:Key="ItemHotkeySelectedStyle"
BasedOn="{StaticResource BaseItemHotkeySelecetedStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="FontSize" Value="13" /> <Setter Property="FontSize" Value="13" />
<Setter Property="Foreground" Value="#ff79c6" /> <Setter Property="Foreground" Value="#ff79c6" />
</Style> </Style>
<!-- button style in the middle of the scrollbar --> <!-- button style in the middle of the scrollbar -->
<Style x:Key="ThumbStyle" BasedOn="{StaticResource BaseThumbStyle}" TargetType="{x:Type Thumb}"> <Style
<Setter Property="SnapsToDevicePixels" Value="True"/> x:Key="ThumbStyle"
<Setter Property="OverridesDefaultStyle" Value="true"/> BasedOn="{StaticResource BaseThumbStyle}"
<Setter Property="IsTabStop" Value="false"/> TargetType="{x:Type Thumb}">
<Setter Property="Width" Value="2"/> <Setter Property="SnapsToDevicePixels" Value="True" />
<Setter Property="Focusable" Value="false"/> <Setter Property="OverridesDefaultStyle" Value="true" />
<Setter Property="IsTabStop" Value="false" />
<Setter Property="Width" Value="2" />
<Setter Property="Focusable" Value="false" />
<Setter Property="Template"> <Setter Property="Template">
<Setter.Value> <Setter.Value>
<ControlTemplate TargetType="{x:Type Thumb}"> <ControlTemplate TargetType="{x:Type Thumb}">
<Border CornerRadius="2" DockPanel.Dock="Right" Background="#44475a" BorderBrush="Transparent" BorderThickness="0" /> <Border
Background="#44475a"
BorderBrush="Transparent"
BorderThickness="0"
CornerRadius="2"
DockPanel.Dock="Right" />
</ControlTemplate> </ControlTemplate>
</Setter.Value> </Setter.Value>
</Setter> </Setter>
</Style> </Style>
<Style x:Key="ScrollBarStyle" BasedOn="{StaticResource BaseScrollBarStyle}" TargetType="{x:Type ScrollBar}"> <Style
x:Key="ScrollBarStyle"
BasedOn="{StaticResource BaseScrollBarStyle}"
TargetType="{x:Type ScrollBar}" />
<Style
x:Key="SeparatorStyle"
BasedOn="{StaticResource BaseSeparatorStyle}"
TargetType="{x:Type Rectangle}">
<Setter Property="Fill" Value="#44475a" />
<Setter Property="Height" Value="1" />
<Setter Property="Margin" Value="12,0,12,8" />
</Style> </Style>
<Style x:Key="SeparatorStyle" BasedOn="{StaticResource BaseSeparatorStyle}" TargetType="{x:Type Rectangle}"> <Style
<Setter Property="Fill" Value="#44475a"/> x:Key="SearchIconStyle"
<Setter Property="Height" Value="1"/> BasedOn="{StaticResource BaseSearchIconStyle}"
<Setter Property="Margin" Value="12 0 12 8"/> TargetType="{x:Type Path}">
</Style>
<Style x:Key="SearchIconStyle" TargetType="{x:Type Path}" BasedOn="{StaticResource BaseSearchIconStyle}">
<Setter Property="Fill" Value="#6272a4" /> <Setter Property="Fill" Value="#6272a4" />
<Setter Property="Width" Value="32" /> <Setter Property="Width" Value="32" />
<Setter Property="Height" Value="32" /> <Setter Property="Height" Value="32" />
<Setter Property="Opacity" Value="0.8" /> <Setter Property="Opacity" Value="0.8" />
</Style> </Style>
<Style
x:Key="ClockBox"
BasedOn="{StaticResource BaseClockBox}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#6272a4" />
</Style>
<Style
x:Key="DateBox"
BasedOn="{StaticResource BaseDateBox}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#6272a4" />
</Style>
</ResourceDictionary> </ResourceDictionary>

View file

@ -1,61 +1,107 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8" ?>
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ResourceDictionary.MergedDictionaries> <ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/Themes/Base.xaml" /> <ResourceDictionary Source="pack://application:,,,/Themes/Base.xaml" />
</ResourceDictionary.MergedDictionaries> </ResourceDictionary.MergedDictionaries>
<Style x:Key="QueryBoxStyle" BasedOn="{StaticResource BaseQueryBoxStyle}" TargetType="{x:Type TextBox}"> <Style
x:Key="QueryBoxStyle"
BasedOn="{StaticResource BaseQueryBoxStyle}"
TargetType="{x:Type TextBox}">
<Setter Property="Background" Value="LightGray" /> <Setter Property="Background" Value="LightGray" />
<Setter Property="Foreground" Value="#222222" /> <Setter Property="Foreground" Value="#222222" />
</Style> </Style>
<Style x:Key="ItemGlyph" BasedOn="{StaticResource BaseGlyphStyle}" TargetType="{x:Type TextBlock}"> <Style
x:Key="ItemGlyph"
BasedOn="{StaticResource BaseGlyphStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#000000" /> <Setter Property="Foreground" Value="#000000" />
</Style> </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="Background" Value="LightGray" /> <Setter Property="Background" Value="LightGray" />
<Setter Property="Foreground" Value="#b8b8b8" /> <Setter Property="Foreground" Value="#b8b8b8" />
</Style> </Style>
<Style x:Key="WindowBorderStyle" BasedOn="{StaticResource BaseWindowBorderStyle}" TargetType="{x:Type Border}"> <Style
x:Key="WindowBorderStyle"
BasedOn="{StaticResource BaseWindowBorderStyle}"
TargetType="{x:Type Border}">
<Setter Property="BorderBrush" Value="LightGray" /> <Setter Property="BorderBrush" Value="LightGray" />
<Setter Property="BorderThickness" Value="2" /> <Setter Property="BorderThickness" Value="2" />
<Setter Property="Background" Value="LightGray"></Setter> <Setter Property="Background" Value="LightGray" />
</Style> </Style>
<Style x:Key="WindowStyle" TargetType="{x:Type Window}" BasedOn="{StaticResource BaseWindowStyle}" > <Style
</Style> x:Key="WindowStyle"
<Style x:Key="PendingLineStyle" BasedOn="{StaticResource BasePendingLineStyle}" TargetType="{x:Type Line}" /> BasedOn="{StaticResource BaseWindowStyle}"
<Style x:Key="ItemTitleStyle" BasedOn="{StaticResource BaseItemTitleStyle}" TargetType="{x:Type TextBlock}"> TargetType="{x:Type Window}" />
<Style
x:Key="PendingLineStyle"
BasedOn="{StaticResource BasePendingLineStyle}"
TargetType="{x:Type Line}" />
<Style
x:Key="ItemTitleStyle"
BasedOn="{StaticResource BaseItemTitleStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#333333" /> <Setter Property="Foreground" Value="#333333" />
<Setter Property="FontWeight" Value="Bold" /> <Setter Property="FontWeight" Value="Bold" />
</Style> </Style>
<Style x:Key="ItemNumberStyle" BasedOn="{StaticResource BaseItemNumberStyle}" TargetType="{x:Type TextBlock}"> <Style
x:Key="ItemNumberStyle"
BasedOn="{StaticResource BaseItemNumberStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#A6A6A6" /> <Setter Property="Foreground" Value="#A6A6A6" />
</Style> </Style>
<Style x:Key="ItemSubTitleStyle" BasedOn="{StaticResource BaseItemSubTitleStyle}" TargetType="{x:Type TextBlock}"> <Style
x:Key="ItemSubTitleStyle"
BasedOn="{StaticResource BaseItemSubTitleStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#818181" /> <Setter Property="Foreground" Value="#818181" />
<Setter Property="FontSize" Value="13" /> <Setter Property="FontSize" Value="13" />
</Style> </Style>
<Style x:Key="ItemTitleSelectedStyle" BasedOn="{StaticResource BaseItemTitleSelectedStyle}" TargetType="{x:Type TextBlock}"> <Style
x:Key="ItemTitleSelectedStyle"
BasedOn="{StaticResource BaseItemTitleSelectedStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="White" /> <Setter Property="Foreground" Value="White" />
</Style> </Style>
<Style x:Key="ItemSubTitleSelectedStyle" BasedOn="{StaticResource BaseItemSubTitleSelectedStyle}" TargetType="{x:Type TextBlock}"> <Style
x:Key="ItemSubTitleSelectedStyle"
BasedOn="{StaticResource BaseItemSubTitleSelectedStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="Silver" /> <Setter Property="Foreground" Value="Silver" />
<Setter Property="FontSize" Value="13" /> <Setter Property="FontSize" Value="13" />
</Style> </Style>
<SolidColorBrush x:Key="ItemSelectedBackgroundColor">#787878</SolidColorBrush> <SolidColorBrush x:Key="ItemSelectedBackgroundColor">#787878</SolidColorBrush>
<Style x:Key="ThumbStyle" BasedOn="{StaticResource BaseThumbStyle}" TargetType="{x:Type Thumb}"> <Style
x:Key="ThumbStyle"
BasedOn="{StaticResource BaseThumbStyle}"
TargetType="{x:Type Thumb}">
<Setter Property="Template"> <Setter Property="Template">
<Setter.Value> <Setter.Value>
<ControlTemplate TargetType="{x:Type Thumb}"> <ControlTemplate TargetType="{x:Type Thumb}">
<Border CornerRadius="2" DockPanel.Dock="Right" Background="#eeeeee" BorderBrush="Transparent" BorderThickness="0" /> <Border
Background="#eeeeee"
BorderBrush="Transparent"
BorderThickness="0"
CornerRadius="2"
DockPanel.Dock="Right" />
</ControlTemplate> </ControlTemplate>
</Setter.Value> </Setter.Value>
</Setter> </Setter>
</Style> </Style>
<Style x:Key="ScrollBarStyle" BasedOn="{StaticResource BaseScrollBarStyle}" TargetType="{x:Type ScrollBar}" > <Style
<Setter Property="Width" Value="3"/> x:Key="ScrollBarStyle"
BasedOn="{StaticResource BaseScrollBarStyle}"
TargetType="{x:Type ScrollBar}">
<Setter Property="Width" Value="3" />
</Style> </Style>
<Style x:Key="SearchIconStyle" TargetType="{x:Type Path}" BasedOn="{StaticResource BaseSearchIconStyle}"> <Style
x:Key="SearchIconStyle"
BasedOn="{StaticResource BaseSearchIconStyle}"
TargetType="{x:Type Path}">
<Setter Property="Fill" Value="#a4a4a4" /> <Setter Property="Fill" Value="#a4a4a4" />
<Setter Property="Width" Value="32" /> <Setter Property="Width" Value="32" />
<Setter Property="Height" Value="32" /> <Setter Property="Height" Value="32" />
@ -68,4 +114,16 @@
<Setter Property="FontSize" Value="15" /> <Setter Property="FontSize" Value="15" />
<Setter Property="Foreground" Value="#a3a3a3" /> <Setter Property="Foreground" Value="#a3a3a3" />
</Style> </Style>
<Style
x:Key="ClockBox"
BasedOn="{StaticResource BaseClockBox}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#818181" />
</Style>
<Style
x:Key="DateBox"
BasedOn="{StaticResource BaseDateBox}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#818181" />
</Style>
</ResourceDictionary> </ResourceDictionary>

View file

@ -118,5 +118,16 @@
<Setter Property="Width" Value="32" /> <Setter Property="Width" Value="32" />
<Setter Property="Height" Value="32" /> <Setter Property="Height" Value="32" />
</Style> </Style>
<Style
x:Key="ClockBox"
BasedOn="{StaticResource BaseClockBox}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#4bb44b" />
</Style>
<Style
x:Key="DateBox"
BasedOn="{StaticResource BaseDateBox}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#4bb44b" />
</Style>
</ResourceDictionary> </ResourceDictionary>

View file

@ -1,48 +1,83 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ResourceDictionary.MergedDictionaries> <ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/Themes/Base.xaml"></ResourceDictionary> <ResourceDictionary Source="pack://application:,,,/Themes/Base.xaml" />
</ResourceDictionary.MergedDictionaries> </ResourceDictionary.MergedDictionaries>
<Style x:Key="ItemGlyph" BasedOn="{StaticResource BaseGlyphStyle}" TargetType="{x:Type TextBlock}"> <Style
x:Key="ItemGlyph"
BasedOn="{StaticResource BaseGlyphStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#ffffff" /> <Setter Property="Foreground" Value="#ffffff" />
</Style> </Style>
<Style x:Key="QueryBoxStyle" BasedOn="{StaticResource BaseQueryBoxStyle}" TargetType="{x:Type TextBox}"> <Style
x:Key="QueryBoxStyle"
BasedOn="{StaticResource BaseQueryBoxStyle}"
TargetType="{x:Type TextBox}">
<Setter Property="Foreground" Value="#FFFFFF" /> <Setter Property="Foreground" Value="#FFFFFF" />
<Setter Property="Background" Value="#001e4e"/> <Setter Property="Background" Value="#001e4e" />
<Setter Property="Padding" Value="0 0 18 0" /> <Setter Property="Padding" Value="0,0,18,0" />
</Style> </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="#344c71" /> <Setter Property="Foreground" Value="#344c71" />
<Setter Property="Background" Value="#001e4e" /> <Setter Property="Background" Value="#001e4e" />
<Setter Property="Padding" Value="0 0 18 0" /> <Setter Property="Padding" Value="0,0,18,0" />
</Style> </Style>
<Style x:Key="WindowBorderStyle" BasedOn="{StaticResource BaseWindowBorderStyle}" TargetType="{x:Type Border}"> <Style
<Setter Property="Background" Value="#001e4e"></Setter> x:Key="WindowBorderStyle"
BasedOn="{StaticResource BaseWindowBorderStyle}"
TargetType="{x:Type Border}">
<Setter Property="Background" Value="#001e4e" />
</Style> </Style>
<Style x:Key="WindowStyle" TargetType="{x:Type Window}" BasedOn="{StaticResource BaseWindowStyle}" > <Style
</Style> x:Key="WindowStyle"
<Style x:Key="PendingLineStyle" BasedOn="{StaticResource BasePendingLineStyle}" TargetType="{x:Type Line}" > BasedOn="{StaticResource BaseWindowStyle}"
</Style> TargetType="{x:Type Window}" />
<Style x:Key="ItemTitleStyle" BasedOn="{StaticResource BaseItemTitleStyle}" TargetType="{x:Type TextBlock}" > <Style
<Setter Property="Foreground" Value="#f5f5f5"></Setter> x:Key="PendingLineStyle"
</Style> BasedOn="{StaticResource BasePendingLineStyle}"
<Style x:Key="ItemSubTitleStyle" BasedOn="{StaticResource BaseItemSubTitleStyle}" TargetType="{x:Type TextBlock}" > TargetType="{x:Type Line}" />
<Setter Property="Foreground" Value="#A5A5A5"></Setter> <Style
<Setter Property="FontSize" Value="13" /> x:Key="ItemTitleStyle"
</Style> BasedOn="{StaticResource BaseItemTitleStyle}"
<Style x:Key="ItemTitleSelectedStyle" BasedOn="{StaticResource BaseItemTitleSelectedStyle}" TargetType="{x:Type TextBlock}"> TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#f5f5f5" /> <Setter Property="Foreground" Value="#f5f5f5" />
</Style> </Style>
<Style x:Key="ItemSubTitleSelectedStyle" BasedOn="{StaticResource BaseItemSubTitleSelectedStyle}" TargetType="{x:Type TextBlock}"> <Style
<Setter Property="Foreground" Value="#A5A5A5"></Setter> x:Key="ItemSubTitleStyle"
BasedOn="{StaticResource BaseItemSubTitleStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#A5A5A5" />
<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 Property="FontSize" Value="13" /> <Setter Property="FontSize" Value="13" />
</Style> </Style>
<SolidColorBrush x:Key="ItemSelectedBackgroundColor">#04152E</SolidColorBrush> <SolidColorBrush x:Key="ItemSelectedBackgroundColor">#04152E</SolidColorBrush>
<Style x:Key="ThumbStyle" BasedOn="{StaticResource BaseThumbStyle}" TargetType="{x:Type Thumb}"> <Style
</Style> x:Key="ThumbStyle"
<Style x:Key="ScrollBarStyle" BasedOn="{StaticResource BaseScrollBarStyle}" TargetType="{x:Type ScrollBar}"> BasedOn="{StaticResource BaseThumbStyle}"
</Style> TargetType="{x:Type Thumb}" />
<Style x:Key="SearchIconStyle" TargetType="{x:Type Path}" BasedOn="{StaticResource BaseSearchIconStyle}"> <Style
x:Key="ScrollBarStyle"
BasedOn="{StaticResource BaseScrollBarStyle}"
TargetType="{x:Type ScrollBar}" />
<Style
x:Key="SearchIconStyle"
BasedOn="{StaticResource BaseSearchIconStyle}"
TargetType="{x:Type Path}">
<Setter Property="Fill" Value="#1d427d" /> <Setter Property="Fill" Value="#1d427d" />
<Setter Property="Width" Value="32" /> <Setter Property="Width" Value="32" />
<Setter Property="Height" Value="32" /> <Setter Property="Height" Value="32" />
@ -56,4 +91,23 @@
<Setter Property="FontSize" Value="15" /> <Setter Property="FontSize" Value="15" />
<Setter Property="Foreground" Value="#2C5595" /> <Setter Property="Foreground" Value="#2C5595" />
</Style> </Style>
<Style
x:Key="ClockBox"
BasedOn="{StaticResource BaseClockBox}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#2C5595" />
</Style>
<Style
x:Key="DateBox"
BasedOn="{StaticResource BaseDateBox}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#2C5595" />
</Style>
<Style
x:Key="ClockPanel"
BasedOn="{StaticResource BaseClockPanel}"
TargetType="{x:Type StackPanel}">
<Setter Property="Margin" Value="0,0,22,0" />
<Setter Property="Visibility" Value="Visible" />
</Style>
</ResourceDictionary> </ResourceDictionary>

View file

@ -1,64 +1,110 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8" ?>
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ResourceDictionary.MergedDictionaries> <ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/Themes/Base.xaml" /> <ResourceDictionary Source="pack://application:,,,/Themes/Base.xaml" />
</ResourceDictionary.MergedDictionaries> </ResourceDictionary.MergedDictionaries>
<Style x:Key="ItemGlyph" BasedOn="{StaticResource BaseGlyphStyle}" TargetType="{x:Type TextBlock}"> <Style
x:Key="ItemGlyph"
BasedOn="{StaticResource BaseGlyphStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#ffffff" /> <Setter Property="Foreground" Value="#ffffff" />
</Style> </Style>
<Style x:Key="QueryBoxStyle" BasedOn="{StaticResource BaseQueryBoxStyle}" TargetType="{x:Type TextBox}"> <Style
x:Key="QueryBoxStyle"
BasedOn="{StaticResource BaseQueryBoxStyle}"
TargetType="{x:Type TextBox}">
<Setter Property="Background" Value="#2e3440" /> <Setter Property="Background" Value="#2e3440" />
<Setter Property="Foreground" Value="#eceff4" /> <Setter Property="Foreground" Value="#eceff4" />
<Setter Property="FontSize" Value="30" /> <Setter Property="FontSize" Value="30" />
</Style> </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="Background" Value="#2e3440" /> <Setter Property="Background" Value="#2e3440" />
<Setter Property="Foreground" Value="#50596b" /> <Setter Property="Foreground" Value="#50596b" />
<Setter Property="FontSize" Value="30" /> <Setter Property="FontSize" Value="30" />
</Style> </Style>
<Style x:Key="WindowBorderStyle" BasedOn="{StaticResource BaseWindowBorderStyle}" TargetType="{x:Type Border}"> <Style
x:Key="WindowBorderStyle"
BasedOn="{StaticResource BaseWindowBorderStyle}"
TargetType="{x:Type Border}">
<Setter Property="BorderBrush" Value="#4c566a" /> <Setter Property="BorderBrush" Value="#4c566a" />
<Setter Property="BorderThickness" Value="1" /> <Setter Property="BorderThickness" Value="1" />
<Setter Property="Background" Value="#2e3440"></Setter> <Setter Property="Background" Value="#2e3440" />
</Style> </Style>
<Style x:Key="WindowStyle" TargetType="{x:Type Window}" BasedOn="{StaticResource BaseWindowStyle}" > <Style
</Style> x:Key="WindowStyle"
<Style x:Key="PendingLineStyle" BasedOn="{StaticResource BasePendingLineStyle}" TargetType="{x:Type Line}"> BasedOn="{StaticResource BaseWindowStyle}"
TargetType="{x:Type Window}" />
<Style
x:Key="PendingLineStyle"
BasedOn="{StaticResource BasePendingLineStyle}"
TargetType="{x:Type Line}">
<Setter Property="Stroke" Value="White" /> <Setter Property="Stroke" Value="White" />
</Style> </Style>
<Style x:Key="ItemTitleStyle" BasedOn="{StaticResource BaseItemTitleStyle}" TargetType="{x:Type TextBlock}"> <Style
x:Key="ItemTitleStyle"
BasedOn="{StaticResource BaseItemTitleStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#e5e9f0" /> <Setter Property="Foreground" Value="#e5e9f0" />
<Setter Property="FontWeight" Value="Bold" /> <Setter Property="FontWeight" Value="Bold" />
</Style> </Style>
<Style x:Key="ItemNumberStyle" BasedOn="{StaticResource BaseItemNumberStyle}" TargetType="{x:Type TextBlock}"> <Style
x:Key="ItemNumberStyle"
BasedOn="{StaticResource BaseItemNumberStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#6F7C95" /> <Setter Property="Foreground" Value="#6F7C95" />
</Style> </Style>
<Style x:Key="ItemSubTitleStyle" BasedOn="{StaticResource BaseItemSubTitleStyle}" TargetType="{x:Type TextBlock}"> <Style
x:Key="ItemSubTitleStyle"
BasedOn="{StaticResource BaseItemSubTitleStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#606c83" /> <Setter Property="Foreground" Value="#606c83" />
</Style> </Style>
<Style x:Key="ItemTitleSelectedStyle" BasedOn="{StaticResource BaseItemTitleSelectedStyle}" TargetType="{x:Type TextBlock}"> <Style
x:Key="ItemTitleSelectedStyle"
BasedOn="{StaticResource BaseItemTitleSelectedStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#e5e9f0" /> <Setter Property="Foreground" Value="#e5e9f0" />
</Style> </Style>
<Style x:Key="ItemSubTitleSelectedStyle" BasedOn="{StaticResource BaseItemSubTitleSelectedStyle}" TargetType="{x:Type TextBlock}"> <Style
x:Key="ItemSubTitleSelectedStyle"
BasedOn="{StaticResource BaseItemSubTitleSelectedStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#8391AB" /> <Setter Property="Foreground" Value="#8391AB" />
</Style> </Style>
<SolidColorBrush x:Key="ItemSelectedBackgroundColor">#4e586b</SolidColorBrush> <SolidColorBrush x:Key="ItemSelectedBackgroundColor">#4e586b</SolidColorBrush>
<Style x:Key="ThumbStyle" BasedOn="{StaticResource BaseThumbStyle}" TargetType="{x:Type Thumb}"> <Style
x:Key="ThumbStyle"
BasedOn="{StaticResource BaseThumbStyle}"
TargetType="{x:Type Thumb}">
<Setter Property="Template"> <Setter Property="Template">
<Setter.Value> <Setter.Value>
<ControlTemplate TargetType="{x:Type Thumb}"> <ControlTemplate TargetType="{x:Type Thumb}">
<Border CornerRadius="2" DockPanel.Dock="Right" Background="#B2B6BE" BorderBrush="Transparent" BorderThickness="0" /> <Border
Background="#B2B6BE"
BorderBrush="Transparent"
BorderThickness="0"
CornerRadius="2"
DockPanel.Dock="Right" />
</ControlTemplate> </ControlTemplate>
</Setter.Value> </Setter.Value>
</Setter> </Setter>
</Style> </Style>
<Style x:Key="ScrollBarStyle" BasedOn="{StaticResource BaseScrollBarStyle}" TargetType="{x:Type ScrollBar}" > <Style
<Setter Property="Width" Value="3"/> x:Key="ScrollBarStyle"
BasedOn="{StaticResource BaseScrollBarStyle}"
TargetType="{x:Type ScrollBar}">
<Setter Property="Width" Value="3" />
</Style> </Style>
<Style x:Key="SearchIconStyle" TargetType="{x:Type Path}" BasedOn="{StaticResource BaseSearchIconStyle}"> <Style
x:Key="SearchIconStyle"
BasedOn="{StaticResource BaseSearchIconStyle}"
TargetType="{x:Type Path}">
<Setter Property="Fill" Value="#50596b" /> <Setter Property="Fill" Value="#50596b" />
<Setter Property="Width" Value="32" /> <Setter Property="Width" Value="32" />
<Setter Property="Height" Value="32" /> <Setter Property="Height" Value="32" />
@ -71,4 +117,16 @@
<Setter Property="FontSize" Value="15" /> <Setter Property="FontSize" Value="15" />
<Setter Property="Foreground" Value="#8391AB" /> <Setter Property="Foreground" Value="#8391AB" />
</Style> </Style>
<Style
x:Key="ClockBox"
BasedOn="{StaticResource BaseClockBox}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#6F7C95" />
</Style>
<Style
x:Key="DateBox"
BasedOn="{StaticResource BaseDateBox}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#6F7C95" />
</Style>
</ResourceDictionary> </ResourceDictionary>

View file

@ -1,63 +1,109 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8" ?>
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ResourceDictionary.MergedDictionaries> <ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/Themes/Base.xaml" /> <ResourceDictionary Source="pack://application:,,,/Themes/Base.xaml" />
</ResourceDictionary.MergedDictionaries> </ResourceDictionary.MergedDictionaries>
<Style x:Key="ItemGlyph" BasedOn="{StaticResource BaseGlyphStyle}" TargetType="{x:Type TextBlock}"> <Style
x:Key="ItemGlyph"
BasedOn="{StaticResource BaseGlyphStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#ffffff" /> <Setter Property="Foreground" Value="#ffffff" />
</Style> </Style>
<Style x:Key="QueryBoxStyle" BasedOn="{StaticResource BaseQueryBoxStyle}" TargetType="{x:Type TextBox}"> <Style
x:Key="QueryBoxStyle"
BasedOn="{StaticResource BaseQueryBoxStyle}"
TargetType="{x:Type TextBox}">
<Setter Property="Background" Value="#4c566a" /> <Setter Property="Background" Value="#4c566a" />
<Setter Property="Foreground" Value="#eceff4" /> <Setter Property="Foreground" Value="#eceff4" />
<Setter Property="FontSize" Value="25" /> <Setter Property="FontSize" Value="25" />
</Style> </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="Background" Value="#4c566a" /> <Setter Property="Background" Value="#4c566a" />
<Setter Property="Foreground" Value="#eceff4" /> <Setter Property="Foreground" Value="#eceff4" />
<Setter Property="FontSize" Value="25" /> <Setter Property="FontSize" Value="25" />
</Style> </Style>
<Style x:Key="WindowBorderStyle" BasedOn="{StaticResource BaseWindowBorderStyle}" TargetType="{x:Type Border}"> <Style
x:Key="WindowBorderStyle"
BasedOn="{StaticResource BaseWindowBorderStyle}"
TargetType="{x:Type Border}">
<Setter Property="BorderBrush" Value="#2e3440" /> <Setter Property="BorderBrush" Value="#2e3440" />
<Setter Property="BorderThickness" Value="1" /> <Setter Property="BorderThickness" Value="1" />
<Setter Property="Background" Value="#4c566a"></Setter> <Setter Property="Background" Value="#4c566a" />
</Style> </Style>
<Style x:Key="WindowStyle" TargetType="{x:Type Window}" BasedOn="{StaticResource BaseWindowStyle}" > <Style
</Style> x:Key="WindowStyle"
<Style x:Key="PendingLineStyle" BasedOn="{StaticResource BasePendingLineStyle}" TargetType="{x:Type Line}"> BasedOn="{StaticResource BaseWindowStyle}"
TargetType="{x:Type Window}" />
<Style
x:Key="PendingLineStyle"
BasedOn="{StaticResource BasePendingLineStyle}"
TargetType="{x:Type Line}">
<Setter Property="Stroke" Value="White" /> <Setter Property="Stroke" Value="White" />
</Style> </Style>
<Style x:Key="ItemTitleStyle" BasedOn="{StaticResource BaseItemTitleStyle}" TargetType="{x:Type TextBlock}"> <Style
x:Key="ItemTitleStyle"
BasedOn="{StaticResource BaseItemTitleStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#e5e9f0" /> <Setter Property="Foreground" Value="#e5e9f0" />
<Setter Property="FontWeight" Value="Bold" /> <Setter Property="FontWeight" Value="Bold" />
</Style> </Style>
<Style x:Key="ItemNumberStyle" BasedOn="{StaticResource BaseItemNumberStyle}" TargetType="{x:Type TextBlock}"> <Style
x:Key="ItemNumberStyle"
BasedOn="{StaticResource BaseItemNumberStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#798090" /> <Setter Property="Foreground" Value="#798090" />
</Style> </Style>
<Style x:Key="ItemSubTitleStyle" BasedOn="{StaticResource BaseItemSubTitleStyle}" TargetType="{x:Type TextBlock}"> <Style
x:Key="ItemSubTitleStyle"
BasedOn="{StaticResource BaseItemSubTitleStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#798090" /> <Setter Property="Foreground" Value="#798090" />
</Style> </Style>
<Style x:Key="ItemTitleSelectedStyle" BasedOn="{StaticResource BaseItemTitleSelectedStyle}" TargetType="{x:Type TextBlock}"> <Style
x:Key="ItemTitleSelectedStyle"
BasedOn="{StaticResource BaseItemTitleSelectedStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#FFFFFF" /> <Setter Property="Foreground" Value="#FFFFFF" />
</Style> </Style>
<Style x:Key="ItemSubTitleSelectedStyle" BasedOn="{StaticResource BaseItemSubTitleSelectedStyle}" TargetType="{x:Type TextBlock}"> <Style
x:Key="ItemSubTitleSelectedStyle"
BasedOn="{StaticResource BaseItemSubTitleSelectedStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#9498A0" /> <Setter Property="Foreground" Value="#9498A0" />
</Style> </Style>
<SolidColorBrush x:Key="ItemSelectedBackgroundColor">#596479</SolidColorBrush> <SolidColorBrush x:Key="ItemSelectedBackgroundColor">#596479</SolidColorBrush>
<Style x:Key="ThumbStyle" BasedOn="{StaticResource BaseThumbStyle}" TargetType="{x:Type Thumb}"> <Style
x:Key="ThumbStyle"
BasedOn="{StaticResource BaseThumbStyle}"
TargetType="{x:Type Thumb}">
<Setter Property="Template"> <Setter Property="Template">
<Setter.Value> <Setter.Value>
<ControlTemplate TargetType="{x:Type Thumb}"> <ControlTemplate TargetType="{x:Type Thumb}">
<Border CornerRadius="2" DockPanel.Dock="Right" Background="#2e3440" BorderBrush="Transparent" BorderThickness="0" /> <Border
Background="#2e3440"
BorderBrush="Transparent"
BorderThickness="0"
CornerRadius="2"
DockPanel.Dock="Right" />
</ControlTemplate> </ControlTemplate>
</Setter.Value> </Setter.Value>
</Setter> </Setter>
</Style> </Style>
<Style x:Key="ScrollBarStyle" BasedOn="{StaticResource BaseScrollBarStyle}" TargetType="{x:Type ScrollBar}" > <Style
<Setter Property="Width" Value="3"/> x:Key="ScrollBarStyle"
BasedOn="{StaticResource BaseScrollBarStyle}"
TargetType="{x:Type ScrollBar}">
<Setter Property="Width" Value="3" />
</Style> </Style>
<Style x:Key="SearchIconStyle" TargetType="{x:Type Path}" BasedOn="{StaticResource BaseSearchIconStyle}"> <Style
x:Key="SearchIconStyle"
BasedOn="{StaticResource BaseSearchIconStyle}"
TargetType="{x:Type Path}">
<Setter Property="Fill" Value="#687693" /> <Setter Property="Fill" Value="#687693" />
<Setter Property="Width" Value="32" /> <Setter Property="Width" Value="32" />
<Setter Property="Height" Value="32" /> <Setter Property="Height" Value="32" />
@ -70,4 +116,16 @@
<Setter Property="FontSize" Value="14" /> <Setter Property="FontSize" Value="14" />
<Setter Property="Foreground" Value="#687693" /> <Setter Property="Foreground" Value="#687693" />
</Style> </Style>
<Style
x:Key="ClockBox"
BasedOn="{StaticResource BaseClockBox}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#8394B6" />
</Style>
<Style
x:Key="DateBox"
BasedOn="{StaticResource BaseDateBox}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#8394B6" />
</Style>
</ResourceDictionary> </ResourceDictionary>

View file

@ -1,63 +1,102 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ResourceDictionary.MergedDictionaries> <ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/Themes/Base.xaml"></ResourceDictionary> <ResourceDictionary Source="pack://application:,,,/Themes/Base.xaml" />
</ResourceDictionary.MergedDictionaries> </ResourceDictionary.MergedDictionaries>
<Style x:Key="ItemGlyph" BasedOn="{StaticResource BaseGlyphStyle}" TargetType="{x:Type TextBlock}"> <Style
x:Key="ItemGlyph"
BasedOn="{StaticResource BaseGlyphStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#ffffff" /> <Setter Property="Foreground" Value="#ffffff" />
</Style> </Style>
<Style x:Key="QueryBoxStyle" BasedOn="{StaticResource BaseQueryBoxStyle}" TargetType="{x:Type TextBox}"> <Style
<Setter Property="Background" Value="#1f1d1f"/> x:Key="QueryBoxStyle"
BasedOn="{StaticResource BaseQueryBoxStyle}"
TargetType="{x:Type TextBox}">
<Setter Property="Background" Value="#1f1d1f" />
<Setter Property="Foreground" Value="#cc1081" /> <Setter Property="Foreground" Value="#cc1081" />
<Setter Property="CaretBrush" Value="#cc1081" /> <Setter Property="CaretBrush" Value="#cc1081" />
<Setter Property="SelectionBrush" Value="#e564b1"/> <Setter Property="SelectionBrush" Value="#e564b1" />
</Style> </Style>
<Style x:Key="QuerySuggestionBoxStyle" BasedOn="{StaticResource BaseQuerySuggestionBoxStyle}" TargetType="{x:Type TextBox}"> <Style
<Setter Property="Background" Value="#1f1d1f"/> x:Key="QuerySuggestionBoxStyle"
BasedOn="{StaticResource BaseQuerySuggestionBoxStyle}"
TargetType="{x:Type TextBox}">
<Setter Property="Background" Value="#1f1d1f" />
<Setter Property="Foreground" Value="#71114b" /> <Setter Property="Foreground" Value="#71114b" />
</Style> </Style>
<Style x:Key="WindowBorderStyle" BasedOn="{StaticResource BaseWindowBorderStyle}" TargetType="{x:Type Border}"> <Style
<Setter Property="Background" Value="#1f1d1f"></Setter> x:Key="WindowBorderStyle"
<Setter Property="BorderThickness" Value="2"></Setter> BasedOn="{StaticResource BaseWindowBorderStyle}"
<Setter Property="BorderBrush" Value="#000000"></Setter> TargetType="{x:Type Border}">
<Setter Property="Background" Value="#1f1d1f" />
<Setter Property="BorderThickness" Value="2" />
<Setter Property="BorderBrush" Value="#000000" />
</Style> </Style>
<Style x:Key="WindowStyle" TargetType="{x:Type Window}" BasedOn="{StaticResource BaseWindowStyle}" > <Style
</Style> x:Key="WindowStyle"
<Style x:Key="PendingLineStyle" BasedOn="{StaticResource BasePendingLineStyle}" TargetType="{x:Type Line}"> BasedOn="{StaticResource BaseWindowStyle}"
TargetType="{x:Type Window}" />
<Style
x:Key="PendingLineStyle"
BasedOn="{StaticResource BasePendingLineStyle}"
TargetType="{x:Type Line}">
<Setter Property="Stroke" Value="#cc1081" /> <Setter Property="Stroke" Value="#cc1081" />
</Style> </Style>
<Style x:Key="ItemTitleStyle" BasedOn="{StaticResource BaseItemTitleStyle}" TargetType="{x:Type TextBlock}" > <Style
<Setter Property="Foreground" Value="#f5f5f5"></Setter> x:Key="ItemTitleStyle"
</Style> BasedOn="{StaticResource BaseItemTitleStyle}"
<Style x:Key="ItemSubTitleStyle" BasedOn="{StaticResource BaseItemSubTitleStyle}" TargetType="{x:Type TextBlock}" > 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" /> <Setter Property="Foreground" Value="#f5f5f5" />
</Style> </Style>
<Style x:Key="ItemSubTitleSelectedStyle" BasedOn="{StaticResource BaseItemSubTitleSelectedStyle}" TargetType="{x:Type TextBlock}"> <Style
x:Key="ItemSubTitleStyle"
BasedOn="{StaticResource BaseItemSubTitleStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#c2c2c2" />
<Setter Property="Opacity" Value="0.5" />
</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="#ed92c9" /> <Setter Property="Foreground" Value="#ed92c9" />
</Style> </Style>
<SolidColorBrush x:Key="ItemSelectedBackgroundColor">#cc1081</SolidColorBrush> <SolidColorBrush x:Key="ItemSelectedBackgroundColor">#cc1081</SolidColorBrush>
<Style x:Key="ThumbStyle" BasedOn="{StaticResource BaseThumbStyle}" TargetType="{x:Type Thumb}"> <Style
x:Key="ThumbStyle"
BasedOn="{StaticResource BaseThumbStyle}"
TargetType="{x:Type Thumb}">
<Setter Property="Template"> <Setter Property="Template">
<Setter.Value> <Setter.Value>
<ControlTemplate TargetType="{x:Type Thumb}"> <ControlTemplate TargetType="{x:Type Thumb}">
<Border CornerRadius="2" DockPanel.Dock="Right" Background="#e564b1" BorderBrush="Transparent" BorderThickness="0" /> <Border
Background="#e564b1"
BorderBrush="Transparent"
BorderThickness="0"
CornerRadius="2"
DockPanel.Dock="Right" />
</ControlTemplate> </ControlTemplate>
</Setter.Value> </Setter.Value>
</Setter> </Setter>
</Style> </Style>
<Style x:Key="ScrollBarStyle" BasedOn="{StaticResource BaseScrollBarStyle}" TargetType="{x:Type ScrollBar}"> <Style
</Style> x:Key="ScrollBarStyle"
BasedOn="{StaticResource BaseScrollBarStyle}"
TargetType="{x:Type ScrollBar}" />
<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> <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}"> <Style x:Key="SearchIconPosition" TargetType="{x:Type Canvas}">
<Setter Property="Width" Value="34" /> <Setter Property="Width" Value="34" />
<Setter Property="Height" Value="34" /> <Setter Property="Height" Value="34" />
<Setter Property="Margin" Value="0 6 14 0" /> <Setter Property="Margin" Value="0,6,14,0" />
<Setter Property="Background" Value="Transparent" /> <Setter Property="Background" Value="Transparent" />
<Setter Property="HorizontalAlignment" Value="Right" /> <Setter Property="HorizontalAlignment" Value="Right" />
</Style> </Style>
@ -74,4 +113,16 @@
<Setter Property="FontSize" Value="14" /> <Setter Property="FontSize" Value="14" />
<Setter Property="Foreground" Value="#ed92c9" /> <Setter Property="Foreground" Value="#ed92c9" />
</Style> </Style>
<Style
x:Key="ClockBox"
BasedOn="{StaticResource BaseClockBox}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#71114b" />
</Style>
<Style
x:Key="DateBox"
BasedOn="{StaticResource BaseDateBox}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#71114b" />
</Style>
</ResourceDictionary> </ResourceDictionary>

View file

@ -1,64 +1,101 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" <ResourceDictionary
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:system="clr-namespace:System;assembly=mscorlib"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:system="clr-namespace:System;assembly=mscorlib">
<ResourceDictionary.MergedDictionaries> <ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/Themes/Base.xaml" /> <ResourceDictionary Source="pack://application:,,,/Themes/Base.xaml" />
</ResourceDictionary.MergedDictionaries> </ResourceDictionary.MergedDictionaries>
<Style x:Key="ItemGlyph" BasedOn="{StaticResource BaseGlyphStyle}" TargetType="{x:Type TextBlock}"> <Style
x:Key="ItemGlyph"
BasedOn="{StaticResource BaseGlyphStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#5bafb0" /> <Setter Property="Foreground" Value="#5bafb0" />
</Style> </Style>
<Style x:Key="QueryBoxStyle" BasedOn="{StaticResource BaseQueryBoxStyle}" TargetType="{x:Type TextBox}"> <Style
x:Key="QueryBoxStyle"
BasedOn="{StaticResource BaseQueryBoxStyle}"
TargetType="{x:Type TextBox}">
<Setter Property="FontSize" Value="24" /> <Setter Property="FontSize" Value="24" />
<Setter Property="Background" Value="#303840" /> <Setter Property="Background" Value="#303840" />
<Setter Property="Foreground" Value="#d2d8e5" /> <Setter Property="Foreground" Value="#d2d8e5" />
<Setter Property="CaretBrush" Value="#FFAA47" /> <Setter Property="CaretBrush" Value="#FFAA47" />
<Setter Property="FontSize" Value="26" /> <Setter Property="FontSize" Value="26" />
<Setter Property="Height" Value="42" /> <Setter Property="Height" Value="42" />
<Setter Property="Padding" Value="0 4 66 0" /> <Setter Property="Padding" Value="0,4,66,0" />
</Style> </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="Background" Value="#303840" /> <Setter Property="Background" Value="#303840" />
<Setter Property="Foreground" Value="#798189" /> <Setter Property="Foreground" Value="#798189" />
<Setter Property="FontSize" Value="26" /> <Setter Property="FontSize" Value="26" />
<Setter Property="Height" Value="42" /> <Setter Property="Height" Value="42" />
<Setter Property="Padding" Value="0 4 66 0" /> <Setter Property="Padding" Value="0,4,66,0" />
</Style> </Style>
<Style x:Key="WindowBorderStyle" BasedOn="{StaticResource BaseWindowBorderStyle}" TargetType="{x:Type Border}"> <Style
x:Key="WindowBorderStyle"
BasedOn="{StaticResource BaseWindowBorderStyle}"
TargetType="{x:Type Border}">
<Setter Property="BorderThickness" Value="2" /> <Setter Property="BorderThickness" Value="2" />
<Setter Property="BorderBrush" Value="#6c7279" /> <Setter Property="BorderBrush" Value="#6c7279" />
<Setter Property="CornerRadius" Value="6" /> <Setter Property="CornerRadius" Value="6" />
<Setter Property="Background" Value="#303840" /> <Setter Property="Background" Value="#303840" />
</Style> </Style>
<Style x:Key="WindowStyle" BasedOn="{StaticResource BaseWindowStyle}" TargetType="{x:Type Window}"> <Style
x:Key="WindowStyle"
BasedOn="{StaticResource BaseWindowStyle}"
TargetType="{x:Type Window}">
<Setter Property="Width" Value="576" /> <Setter Property="Width" Value="576" />
<Setter Property="RenderOptions.ClearTypeHint" Value="Enabled"/> <Setter Property="RenderOptions.ClearTypeHint" Value="Enabled" />
</Style> </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="#FFAA47" /> <Setter Property="Stroke" Value="#FFAA47" />
</Style> </Style>
<!-- Item Style --> <!-- Item Style -->
<Style x:Key="ItemTitleStyle" BasedOn="{StaticResource BaseItemTitleStyle}" TargetType="{x:Type TextBlock}"> <Style
x:Key="ItemTitleStyle"
BasedOn="{StaticResource BaseItemTitleStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#5989b2" /> <Setter Property="Foreground" Value="#5989b2" />
</Style> </Style>
<Style x:Key="ItemSubTitleStyle" BasedOn="{StaticResource BaseItemSubTitleStyle}" TargetType="{x:Type TextBlock}" > <Style
x:Key="ItemSubTitleStyle"
BasedOn="{StaticResource BaseItemSubTitleStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#7b858f" /> <Setter Property="Foreground" Value="#7b858f" />
<Setter Property="FontSize" Value="13" /> <Setter Property="FontSize" Value="13" />
</Style> </Style>
<Style x:Key="ItemNumberStyle" BasedOn="{StaticResource BaseItemNumberStyle}" TargetType="{x:Type TextBlock}"> <Style
x:Key="ItemNumberStyle"
BasedOn="{StaticResource BaseItemNumberStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#7b858f" /> <Setter Property="Foreground" Value="#7b858f" />
</Style> </Style>
<Style x:Key="ItemTitleSelectedStyle" BasedOn="{StaticResource BaseItemTitleSelectedStyle}" TargetType="{x:Type TextBlock}" > <Style
x:Key="ItemTitleSelectedStyle"
BasedOn="{StaticResource BaseItemTitleSelectedStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Cursor" Value="Arrow" /> <Setter Property="Cursor" Value="Arrow" />
<Setter Property="Foreground" Value="#5bafb0" /> <Setter Property="Foreground" Value="#5bafb0" />
</Style> </Style>
<Style x:Key="ItemSubTitleSelectedStyle" BasedOn="{StaticResource BaseItemSubTitleSelectedStyle}" TargetType="{x:Type TextBlock}" > <Style
x:Key="ItemSubTitleSelectedStyle"
BasedOn="{StaticResource BaseItemSubTitleSelectedStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Cursor" Value="Arrow" /> <Setter Property="Cursor" Value="Arrow" />
<Setter Property="Foreground" Value="#cc8ec8" /> <Setter Property="Foreground" Value="#cc8ec8" />
</Style> </Style>
<SolidColorBrush x:Key="ItemSelectedBackgroundColor">#3c454e</SolidColorBrush> <SolidColorBrush x:Key="ItemSelectedBackgroundColor">#3c454e</SolidColorBrush>
<Style x:Key="ItemImageSelectedStyle" BasedOn="{StaticResource BaseItemImageSelectedStyle}" TargetType="{x:Type Image}" > <Style
x:Key="ItemImageSelectedStyle"
BasedOn="{StaticResource BaseItemImageSelectedStyle}"
TargetType="{x:Type Image}">
<Setter Property="Cursor" Value="Arrow" /> <Setter Property="Cursor" Value="Arrow" />
</Style> </Style>
<Style x:Key="HighlightStyle"> <Style x:Key="HighlightStyle">
@ -72,31 +109,59 @@
<Setter Property="FontSize" Value="13" /> <Setter Property="FontSize" Value="13" />
<Setter Property="Foreground" Value="#ea7354" /> <Setter Property="Foreground" Value="#ea7354" />
</Style> </Style>
<!-- button style in the middle of the scrollbar --> <!-- button style in the middle of the scrollbar -->
<Style x:Key="ThumbStyle" BasedOn="{StaticResource BaseThumbStyle}" TargetType="{x:Type Thumb}"> <Style
<Setter Property="SnapsToDevicePixels" Value="True"/> x:Key="ThumbStyle"
<Setter Property="OverridesDefaultStyle" Value="true"/> BasedOn="{StaticResource BaseThumbStyle}"
<Setter Property="IsTabStop" Value="false"/> TargetType="{x:Type Thumb}">
<Setter Property="Width" Value="2"/> <Setter Property="SnapsToDevicePixels" Value="True" />
<Setter Property="Focusable" Value="false"/> <Setter Property="OverridesDefaultStyle" Value="true" />
<Setter Property="IsTabStop" Value="false" />
<Setter Property="Width" Value="2" />
<Setter Property="Focusable" Value="false" />
<Setter Property="Template"> <Setter Property="Template">
<Setter.Value> <Setter.Value>
<ControlTemplate TargetType="{x:Type Thumb}"> <ControlTemplate TargetType="{x:Type Thumb}">
<Border CornerRadius="2" DockPanel.Dock="Right" Background="#6c7279" BorderBrush="Transparent" BorderThickness="0" /> <Border
Background="#6c7279"
BorderBrush="Transparent"
BorderThickness="0"
CornerRadius="2"
DockPanel.Dock="Right" />
</ControlTemplate> </ControlTemplate>
</Setter.Value> </Setter.Value>
</Setter> </Setter>
</Style> </Style>
<Style x:Key="ScrollBarStyle" BasedOn="{StaticResource BaseScrollBarStyle}" TargetType="{x:Type ScrollBar}"> <Style
x:Key="ScrollBarStyle"
BasedOn="{StaticResource BaseScrollBarStyle}"
TargetType="{x:Type ScrollBar}" />
<Style
x:Key="SeparatorStyle"
BasedOn="{StaticResource BaseSeparatorStyle}"
TargetType="{x:Type Rectangle}">
<Setter Property="Fill" Value="#3c454e" />
<Setter Property="Height" Value="1" />
<Setter Property="Margin" Value="0,0,0,8" />
</Style> </Style>
<Style x:Key="SeparatorStyle" BasedOn="{StaticResource BaseSeparatorStyle}" TargetType="{x:Type Rectangle}"> <Style
<Setter Property="Fill" Value="#3c454e"/> x:Key="SearchIconStyle"
<Setter Property="Height" Value="1"/> BasedOn="{StaticResource BaseSearchIconStyle}"
<Setter Property="Margin" Value="0 0 0 8"/> TargetType="{x:Type Path}">
</Style>
<Style x:Key="SearchIconStyle" TargetType="{x:Type Path}" BasedOn="{StaticResource BaseSearchIconStyle}">
<Setter Property="Fill" Value="#3c454e" /> <Setter Property="Fill" Value="#3c454e" />
<Setter Property="Width" Value="32" /> <Setter Property="Width" Value="32" />
<Setter Property="Height" Value="32" /> <Setter Property="Height" Value="32" />
</Style> </Style>
<Style
x:Key="ClockBox"
BasedOn="{StaticResource BaseClockBox}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#5bafb0" />
</Style>
<Style
x:Key="DateBox"
BasedOn="{StaticResource BaseDateBox}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#5bafb0" />
</Style>
</ResourceDictionary> </ResourceDictionary>

View file

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

View file

@ -156,4 +156,16 @@
<Setter Property="Width" Value="32" /> <Setter Property="Width" Value="32" />
<Setter Property="Height" Value="32" /> <Setter Property="Height" Value="32" />
</Style> </Style>
<Style
x:Key="ClockBox"
BasedOn="{StaticResource BaseClockBox}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#7b7b7b" />
</Style>
<Style
x:Key="DateBox"
BasedOn="{StaticResource BaseDateBox}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#7b7b7b" />
</Style>
</ResourceDictionary> </ResourceDictionary>

View file

@ -164,4 +164,16 @@
<Setter Property="Height" Value="32" /> <Setter Property="Height" Value="32" />
<Setter Property="Opacity" Value="0.2" /> <Setter Property="Opacity" Value="0.2" />
</Style> </Style>
<Style
x:Key="ClockBox"
BasedOn="{StaticResource BaseClockBox}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#acacac" />
</Style>
<Style
x:Key="DateBox"
BasedOn="{StaticResource BaseDateBox}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#acacac" />
</Style>
</ResourceDictionary> </ResourceDictionary>

View file

@ -156,4 +156,16 @@
<Setter Property="Height" Value="32" /> <Setter Property="Height" Value="32" />
<Setter Property="Opacity" Value="1" /> <Setter Property="Opacity" Value="1" />
</Style> </Style>
<Style
x:Key="ClockBox"
BasedOn="{StaticResource BaseClockBox}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="{DynamicResource HotkeyForeground}" />
</Style>
<Style
x:Key="DateBox"
BasedOn="{StaticResource BaseDateBox}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="{DynamicResource HotkeyForeground}" />
</Style>
</ResourceDictionary> </ResourceDictionary>

View file

@ -38,7 +38,6 @@ namespace Flow.Launcher.ViewModel
private readonly FlowLauncherJsonStorage<History> _historyItemsStorage; private readonly FlowLauncherJsonStorage<History> _historyItemsStorage;
private readonly FlowLauncherJsonStorage<UserSelectedRecord> _userSelectedRecordStorage; private readonly FlowLauncherJsonStorage<UserSelectedRecord> _userSelectedRecordStorage;
private readonly FlowLauncherJsonStorage<TopMostRecord> _topMostRecordStorage; private readonly FlowLauncherJsonStorage<TopMostRecord> _topMostRecordStorage;
internal readonly Settings _settings;
private readonly History _history; private readonly History _history;
private readonly UserSelectedRecord _userSelectedRecord; private readonly UserSelectedRecord _userSelectedRecord;
private readonly TopMostRecord _topMostRecord; private readonly TopMostRecord _topMostRecord;
@ -61,8 +60,8 @@ namespace Flow.Launcher.ViewModel
_queryText = ""; _queryText = "";
_lastQuery = new Query(); _lastQuery = new Query();
_settings = settings; Settings = settings;
_settings.PropertyChanged += (_, args) => Settings.PropertyChanged += (_, args) =>
{ {
if (args.PropertyName == nameof(Settings.WindowSize)) if (args.PropertyName == nameof(Settings.WindowSize))
{ {
@ -77,15 +76,16 @@ namespace Flow.Launcher.ViewModel
_userSelectedRecord = _userSelectedRecordStorage.Load(); _userSelectedRecord = _userSelectedRecordStorage.Load();
_topMostRecord = _topMostRecordStorage.Load(); _topMostRecord = _topMostRecordStorage.Load();
ContextMenu = new ResultsViewModel(_settings); ContextMenu = new ResultsViewModel(Settings);
Results = new ResultsViewModel(_settings); Results = new ResultsViewModel(Settings);
History = new ResultsViewModel(_settings); History = new ResultsViewModel(Settings);
_selectedResults = Results; _selectedResults = Results;
InitializeKeyCommands(); InitializeKeyCommands();
RegisterViewUpdate(); RegisterViewUpdate();
RegisterResultsUpdatedEvent(); RegisterResultsUpdatedEvent();
RegisterClockAndDateUpdateAsync();
SetOpenResultModifiers(); SetOpenResultModifiers();
} }
@ -321,6 +321,22 @@ namespace Flow.Launcher.ViewModel
#region ViewModel Properties #region ViewModel Properties
public Settings Settings { get; }
public object ClockText { get; private set; }
public string DateText { get; private set; }
private async Task RegisterClockAndDateUpdateAsync()
{
var timer = new PeriodicTimer(TimeSpan.FromSeconds(1));
// ReSharper disable once MethodSupportsCancellation
while (await timer.WaitForNextTickAsync().ConfigureAwait(false))
{
if (Settings.UseClock)
ClockText = DateTime.Now.ToString(Settings.TimeFormat);
if (Settings.UseDate)
DateText = DateTime.Now.ToString(Settings.DateFormat);
}
}
public ResultsViewModel Results { get; private set; } public ResultsViewModel Results { get; private set; }
public ResultsViewModel ContextMenu { get; private set; } public ResultsViewModel ContextMenu { get; private set; }
@ -341,36 +357,17 @@ namespace Flow.Launcher.ViewModel
} }
public double Top
{
get => _settings.WindowTop;
set
{
_settings.WindowTop = value;
OnPropertyChanged();
}
}
public double Left
{
get => _settings.WindowLeft;
set
{
_settings.WindowLeft = value;
OnPropertyChanged();
}
}
[RelayCommand] [RelayCommand]
private void IncreaseWidth() private void IncreaseWidth()
{ {
if (MainWindowWidth + 100 > 1920 || _settings.WindowSize == 1920) if (MainWindowWidth + 100 > 1920 || Settings.WindowSize == 1920)
{ {
_settings.WindowSize = 1920; Settings.WindowSize = 1920;
} }
else else
{ {
_settings.WindowSize += 100; Settings.WindowSize += 100;
Left -= 50; Settings.WindowLeft -= 50;
} }
OnPropertyChanged(); OnPropertyChanged();
} }
@ -378,14 +375,14 @@ namespace Flow.Launcher.ViewModel
[RelayCommand] [RelayCommand]
private void DecreaseWidth() private void DecreaseWidth()
{ {
if (MainWindowWidth - 100 < 400 || _settings.WindowSize == 400) if (MainWindowWidth - 100 < 400 || Settings.WindowSize == 400)
{ {
_settings.WindowSize = 400; Settings.WindowSize = 400;
} }
else else
{ {
Left += 50; Settings.WindowLeft += 50;
_settings.WindowSize -= 100; Settings.WindowSize -= 100;
} }
OnPropertyChanged(); OnPropertyChanged();
} }
@ -393,19 +390,19 @@ namespace Flow.Launcher.ViewModel
[RelayCommand] [RelayCommand]
private void IncreaseMaxResult() private void IncreaseMaxResult()
{ {
if (_settings.MaxResultsToShow == 17) if (Settings.MaxResultsToShow == 17)
return; return;
_settings.MaxResultsToShow += 1; Settings.MaxResultsToShow += 1;
} }
[RelayCommand] [RelayCommand]
private void DecreaseMaxResult() private void DecreaseMaxResult()
{ {
if (_settings.MaxResultsToShow == 2) if (Settings.MaxResultsToShow == 2)
return; return;
_settings.MaxResultsToShow -= 1; Settings.MaxResultsToShow -= 1;
} }
/// <summary> /// <summary>
@ -485,8 +482,8 @@ namespace Flow.Launcher.ViewModel
public double MainWindowWidth public double MainWindowWidth
{ {
get => _settings.WindowSize; get => Settings.WindowSize;
set => _settings.WindowSize = value; set => Settings.WindowSize = value;
} }
public string PluginIconPath { get; set; } = null; public string PluginIconPath { get; set; } = null;
@ -835,7 +832,7 @@ namespace Flow.Launcher.ViewModel
private void SetOpenResultModifiers() private void SetOpenResultModifiers()
{ {
OpenResultCommandModifiers = _settings.OpenResultModifiers ?? DefaultOpenResultModifiers; OpenResultCommandModifiers = Settings.OpenResultModifiers ?? DefaultOpenResultModifiers;
} }
public void ToggleFlowLauncher() public void ToggleFlowLauncher()
@ -864,24 +861,24 @@ namespace Flow.Launcher.ViewModel
// Trick for no delay // Trick for no delay
MainWindowOpacity = 0; MainWindowOpacity = 0;
switch (_settings.LastQueryMode) switch (Settings.LastQueryMode)
{ {
case LastQueryMode.Empty: case LastQueryMode.Empty:
ChangeQueryText(string.Empty); ChangeQueryText(string.Empty);
await Task.Delay(100); //Time for change to opacity await Task.Delay(100); //Time for change to opacity
break; break;
case LastQueryMode.Preserved: case LastQueryMode.Preserved:
if (_settings.UseAnimation) if (Settings.UseAnimation)
await Task.Delay(100); await Task.Delay(100);
LastQuerySelected = true; LastQuerySelected = true;
break; break;
case LastQueryMode.Selected: case LastQueryMode.Selected:
if (_settings.UseAnimation) if (Settings.UseAnimation)
await Task.Delay(100); await Task.Delay(100);
LastQuerySelected = false; LastQuerySelected = false;
break; break;
default: default:
throw new ArgumentException($"wrong LastQueryMode: <{_settings.LastQueryMode}>"); throw new ArgumentException($"wrong LastQueryMode: <{Settings.LastQueryMode}>");
} }
MainWindowVisibilityStatus = false; MainWindowVisibilityStatus = false;
@ -896,7 +893,7 @@ namespace Flow.Launcher.ViewModel
/// </summary> /// </summary>
public bool ShouldIgnoreHotkeys() public bool ShouldIgnoreHotkeys()
{ {
return _settings.IgnoreHotkeysOnFullscreen && WindowsInteropHelper.IsWindowFullscreen(); return Settings.IgnoreHotkeysOnFullscreen && WindowsInteropHelper.IsWindowFullscreen();
} }

View file

@ -0,0 +1,58 @@
using System;
using Flow.Launcher.Core.ExternalPlugins;
using Flow.Launcher.Core.Plugin;
using Flow.Launcher.Plugin;
namespace Flow.Launcher.ViewModel
{
public class PluginStoreItemViewModel : BaseModel
{
public PluginStoreItemViewModel(UserPlugin plugin)
{
_plugin = plugin;
}
private UserPlugin _plugin;
public string ID => _plugin.ID;
public string Name => _plugin.Name;
public string Description => _plugin.Description;
public string Author => _plugin.Author;
public string Version => _plugin.Version;
public string Language => _plugin.Language;
public string Website => _plugin.Website;
public string UrlDownload => _plugin.UrlDownload;
public string UrlSourceCode => _plugin.UrlSourceCode;
public string IcoPath => _plugin.IcoPath;
public bool LabelInstalled => PluginManager.GetPluginForId(_plugin.ID) != null;
public bool LabelUpdate => LabelInstalled && _plugin.Version != PluginManager.GetPluginForId(_plugin.ID).Metadata.Version;
internal const string None = "None";
internal const string RecentlyUpdated = "RecentlyUpdated";
internal const string NewRelease = "NewRelease";
internal const string Installed = "Installed";
public string Category
{
get
{
string category = None;
if (DateTime.Now - _plugin.LatestReleaseDate < TimeSpan.FromDays(7))
{
category = RecentlyUpdated;
}
if (DateTime.Now - _plugin.DateAdded < TimeSpan.FromDays(7))
{
category = NewRelease;
}
if (PluginManager.GetPluginForId(_plugin.ID) != null)
{
category = Installed;
}
return category;
}
}
}
}

View file

@ -163,15 +163,17 @@ namespace Flow.Launcher.ViewModel
} }
} }
var loadFullImage = (Path.GetExtension(imagePath) ?? "").Equals(".url", StringComparison.OrdinalIgnoreCase);
if (ImageLoader.CacheContainImage(imagePath)) if (ImageLoader.CacheContainImage(imagePath))
{ {
// will get here either when icoPath has value\icon delegate is null\when had exception in delegate // will get here either when icoPath has value\icon delegate is null\when had exception in delegate
image = ImageLoader.Load(imagePath); image = ImageLoader.Load(imagePath, loadFullImage);
return; return;
} }
// We need to modify the property not field here to trigger the OnPropertyChanged event // We need to modify the property not field here to trigger the OnPropertyChanged event
Image = await Task.Run(() => ImageLoader.Load(imagePath)).ConfigureAwait(false); Image = await Task.Run(() => ImageLoader.Load(imagePath, loadFullImage)).ConfigureAwait(false);
} }
public Result Result { get; } public Result Result { get; }

View file

@ -281,14 +281,24 @@ namespace Flow.Launcher.ViewModel
} }
} }
public IList<UserPlugin> ExternalPlugins public IList<PluginStoreItemViewModel> ExternalPlugins
{ {
get get
{ {
return PluginsManifest.UserPlugins; return LabelMaker(PluginsManifest.UserPlugins);
} }
} }
private IList<PluginStoreItemViewModel> LabelMaker(IList<UserPlugin> list)
{
return list.Select(p=>new PluginStoreItemViewModel(p))
.OrderByDescending(p => p.Category == PluginStoreItemViewModel.NewRelease)
.ThenByDescending(p=>p.Category == PluginStoreItemViewModel.RecentlyUpdated)
.ThenByDescending(p => p.Category == PluginStoreItemViewModel.None)
.ThenByDescending(p => p.Category == PluginStoreItemViewModel.Installed)
.ToList();
}
public Control SettingProvider public Control SettingProvider
{ {
get get
@ -314,6 +324,15 @@ namespace Flow.Launcher.ViewModel
OnPropertyChanged(nameof(ExternalPlugins)); OnPropertyChanged(nameof(ExternalPlugins));
} }
internal void DisplayPluginQuery(string queryToDisplay, PluginPair plugin, int actionKeywordPosition = 0)
{
var actionKeyword = plugin.Metadata.ActionKeywords.Count == 0
? string.Empty
: plugin.Metadata.ActionKeywords[actionKeywordPosition];
App.API.ChangeQuery($"{actionKeyword} {queryToDisplay}");
App.API.ShowMainWindow();
}
#endregion #endregion
@ -385,6 +404,50 @@ namespace Flow.Launcher.ViewModel
} }
} }
public class SearchWindowPosition
{
public string Display { get; set; }
public SearchWindowPositions Value { get; set; }
}
public List<SearchWindowPosition> SearchWindowPositions
{
get
{
List<SearchWindowPosition> modes = new List<SearchWindowPosition>();
var enums = (SearchWindowPositions[])Enum.GetValues(typeof(SearchWindowPositions));
foreach (var e in enums)
{
var key = $"SearchWindowPosition{e}";
var display = _translater.GetTranslation(key);
var m = new SearchWindowPosition { Display = display, Value = e, };
modes.Add(m);
}
return modes;
}
}
public List<string> TimeFormatList { get; set; } = new List<string>()
{
"hh:mm",
"HH:mm",
"tt hh:mm",
"hh:mm tt"
};
public List<string> DateFormatList { get; set; } = new List<string>()
{
"MM'/'dd dddd",
"MM'/'dd ddd",
"MM'/'dd",
"dd'/'MM",
"ddd MM'/'dd",
"dddd MM'/'dd",
"dddd"
};
public double WindowWidthSize public double WindowWidthSize
{ {
get => Settings.WindowSize; get => Settings.WindowSize;
@ -409,6 +472,18 @@ namespace Flow.Launcher.ViewModel
set => Settings.UseSound = value; set => Settings.UseSound = value;
} }
public bool UseClock
{
get => Settings.UseClock;
set => Settings.UseClock = value;
}
public bool UseDate
{
get => Settings.UseDate;
set => Settings.UseDate = value;
}
public double SettingWindowWidth public double SettingWindowWidth
{ {
get => Settings.SettingWindowWidth; get => Settings.SettingWindowWidth;

View file

@ -62,7 +62,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Mages" Version="2.0.0" /> <PackageReference Include="Mages" Version="2.0.1" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View file

@ -37,7 +37,7 @@ namespace Flow.Launcher.Plugin.PluginsManager
contextMenu = new ContextMenu(Context); contextMenu = new ContextMenu(Context);
pluginManager = new PluginsManager(Context, Settings); pluginManager = new PluginsManager(Context, Settings);
await pluginManager.UpdateManifestAsync(); _ = pluginManager.UpdateManifestAsync();
} }
public List<Result> LoadContextMenus(Result selectedResult) public List<Result> LoadContextMenus(Result selectedResult)

View file

@ -58,6 +58,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="ini-parser" Version="2.5.2" />
<PackageReference Include="System.Runtime" Version="4.3.1" /> <PackageReference Include="System.Runtime" Version="4.3.1" />
</ItemGroup> </ItemGroup>

View file

@ -4,6 +4,7 @@
xmlns:system="clr-namespace:System;assembly=mscorlib"> xmlns:system="clr-namespace:System;assembly=mscorlib">
<!-- Program setting --> <!-- Program setting -->
<system:String x:Key="flowlauncher_plugin_program_reset">Reset Default</system:String>
<system:String x:Key="flowlauncher_plugin_program_delete">Delete</system:String> <system:String x:Key="flowlauncher_plugin_program_delete">Delete</system:String>
<system:String x:Key="flowlauncher_plugin_program_edit">Edit</system:String> <system:String x:Key="flowlauncher_plugin_program_edit">Edit</system:String>
<system:String x:Key="flowlauncher_plugin_program_add">Add</system:String> <system:String x:Key="flowlauncher_plugin_program_add">Add</system:String>
@ -12,7 +13,7 @@
<system:String x:Key="flowlauncher_plugin_program_disable">Disable</system:String> <system:String x:Key="flowlauncher_plugin_program_disable">Disable</system:String>
<system:String x:Key="flowlauncher_plugin_program_location">Location</system:String> <system:String x:Key="flowlauncher_plugin_program_location">Location</system:String>
<system:String x:Key="flowlauncher_plugin_program_all_programs">All Programs</system:String> <system:String x:Key="flowlauncher_plugin_program_all_programs">All Programs</system:String>
<system:String x:Key="flowlauncher_plugin_program_suffixes">File Suffixes</system:String> <system:String x:Key="flowlauncher_plugin_program_suffixes">File Type</system:String>
<system:String x:Key="flowlauncher_plugin_program_reindex">Reindex</system:String> <system:String x:Key="flowlauncher_plugin_program_reindex">Reindex</system:String>
<system:String x:Key="flowlauncher_plugin_program_indexing">Indexing</system:String> <system:String x:Key="flowlauncher_plugin_program_indexing">Indexing</system:String>
<system:String x:Key="flowlauncher_plugin_program_index_start">Index Start Menu</system:String> <system:String x:Key="flowlauncher_plugin_program_index_start">Index Start Menu</system:String>
@ -35,9 +36,24 @@
<system:String x:Key="flowlauncher_plugin_program_delete_program_source">Are you sure you want to delete the selected program sources?</system:String> <system:String x:Key="flowlauncher_plugin_program_delete_program_source">Are you sure you want to delete the selected program sources?</system:String>
<system:String x:Key="flowlauncher_plugin_program_update">OK</system:String> <system:String x:Key="flowlauncher_plugin_program_update">OK</system:String>
<system:String x:Key="flowlauncher_plugin_program_only_index_tip">Flow Launcher will only index files that end with the following suffixes. (Each suffix should split by ';' )</system:String> <system:String x:Key="flowlauncher_plugin_program_only_index_tip">Program Plugin will only index files with selected suffixes and .url files with selected protocols.</system:String>
<system:String x:Key="flowlauncher_plugin_program_update_file_suffixes">Successfully updated file suffixes</system:String> <system:String x:Key="flowlauncher_plugin_program_update_file_suffixes">Successfully updated file suffixes</system:String>
<system:String x:Key="flowlauncher_plugin_program_suffixes_cannot_empty">File suffixes can't be empty</system:String> <system:String x:Key="flowlauncher_plugin_program_suffixes_cannot_empty">File suffixes can't be empty</system:String>
<system:String x:Key="flowlauncher_plugin_protocols_cannot_empty">Protocols can't be empty</system:String>
<system:String x:Key="flowlauncher_plugin_program_suffixes_excutable_types">File Suffixes</system:String>
<system:String x:Key="flowlauncher_plugin_program_suffixes_URL_types">URL Protocols</system:String>
<system:String x:Key="flowlauncher_plugin_program_suffixes_URL_steam">Steam Games</system:String>
<system:String x:Key="flowlauncher_plugin_program_suffixes_URL_epic">Epic Games</system:String>
<system:String x:Key="flowlauncher_plugin_program_suffixes_URL_http">Http/Https</system:String>
<system:String x:Key="flowlauncher_plugin_program_suffixes_custom_urls">Custom URL Protocols</system:String>
<system:String x:Key="flowlauncher_plugin_program_suffixes_custom_file_types">Custom File Suffixes</system:String>
<system:String x:Key="flowlauncher_plugin_program_suffixes_tooltip">
Insert file suffixes you want to index. Suffixes should be separated by ';'. (ex>bat;py)
</system:String>
<system:String x:Key="flowlauncher_plugin_program_protocol_tooltip">
Insert protocols of .url files you want to index. Protocols should be separated by ';'. (ex>ftp;netflix)
</system:String>
<system:String x:Key="flowlauncher_plugin_program_run_as_different_user">Run As Different User</system:String> <system:String x:Key="flowlauncher_plugin_program_run_as_different_user">Run As Different User</system:String>
<system:String x:Key="flowlauncher_plugin_program_run_as_administrator">Run As Administrator</system:String> <system:String x:Key="flowlauncher_plugin_program_run_as_administrator">Run As Administrator</system:String>

View file

@ -4,10 +4,12 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="http://schemas.modernwpf.com/2019"
Title="{DynamicResource flowlauncher_plugin_program_suffixes}" Title="{DynamicResource flowlauncher_plugin_program_suffixes}"
Width="400" Width="600"
Background="{DynamicResource PopuBGColor}" Background="{DynamicResource PopuBGColor}"
Foreground="{DynamicResource PopupTextColor}" Foreground="{DynamicResource PopupTextColor}"
DataContext="{Binding RelativeSource={RelativeSource Self}}"
ResizeMode="NoResize" ResizeMode="NoResize"
SizeToContent="Height" SizeToContent="Height"
WindowStartupLocation="CenterScreen" WindowStartupLocation="CenterScreen"
@ -15,9 +17,73 @@
<WindowChrome.WindowChrome> <WindowChrome.WindowChrome>
<WindowChrome CaptionHeight="32" ResizeBorderThickness="{x:Static SystemParameters.WindowResizeBorderThickness}" /> <WindowChrome CaptionHeight="32" ResizeBorderThickness="{x:Static SystemParameters.WindowResizeBorderThickness}" />
</WindowChrome.WindowChrome> </WindowChrome.WindowChrome>
<Grid> <Window.Resources>
<Style
x:Key="CustomFileTypeTextBox"
BasedOn="{StaticResource DefaultTextBoxStyle}"
TargetType="TextBox">
<Setter Property="Visibility" Value="Collapsed" />
<Style.Triggers>
<DataTrigger Binding="{Binding ElementName=CustomFiles, Path=IsChecked}" Value="True">
<Setter Property="Visibility" Value="Visible" />
</DataTrigger>
</Style.Triggers>
</Style>
<Style
x:Key="CustomURLTypeTextBox"
BasedOn="{StaticResource DefaultTextBoxStyle}"
TargetType="TextBox">
<Setter Property="Visibility" Value="Collapsed" />
<Style.Triggers>
<DataTrigger Binding="{Binding ElementName=CustomProtocol, Path=IsChecked}" Value="True">
<Setter Property="Visibility" Value="Visible" />
</DataTrigger>
</Style.Triggers>
</Style>
<Style x:Key="SettingGroupBoxSuffixToolTip" TargetType="Border">
<Setter Property="Background" Value="{DynamicResource Color00B}" />
<Setter Property="BorderBrush" Value="{DynamicResource Color03B}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="CornerRadius" Value="5" />
<Setter Property="Margin" Value="0,5,0,0" />
<Setter Property="Padding" Value="15,15,15,15" />
<Setter Property="SnapsToDevicePixels" Value="True" />
<Setter Property="Visibility" Value="Collapsed" />
<Style.Triggers>
<DataTrigger Binding="{Binding ElementName=tbSuffixes, Path=IsFocused}" Value="True">
<Setter Property="Visibility" Value="Visible" />
</DataTrigger>
<DataTrigger Binding="{Binding ElementName=tbSuffixes, Path=IsFocused}" Value="False">
<Setter Property="Visibility" Value="Collapsed" />
</DataTrigger>
</Style.Triggers>
</Style>
<Style x:Key="SettingGroupBoxURLToolTip" TargetType="Border">
<Setter Property="Background" Value="{DynamicResource Color00B}" />
<Setter Property="BorderBrush" Value="{DynamicResource Color03B}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="CornerRadius" Value="5" />
<Setter Property="Margin" Value="0,5,0,0" />
<Setter Property="Padding" Value="15,15,15,15" />
<Setter Property="SnapsToDevicePixels" Value="True" />
<Setter Property="Visibility" Value="Collapsed" />
<Style.Triggers>
<DataTrigger Binding="{Binding ElementName=tbProtocols, Path=IsFocused}" Value="True">
<Setter Property="Visibility" Value="Visible" />
</DataTrigger>
<DataTrigger Binding="{Binding ElementName=tbProtocols, Path=IsFocused}" Value="False">
<Setter Property="Visibility" Value="Collapsed" />
</DataTrigger>
</Style.Triggers>
</Style>
</Window.Resources>
<Grid x:Name="WindowArea">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition /> <RowDefinition Height="auto" />
<RowDefinition Height="80" /> <RowDefinition Height="80" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
@ -55,7 +121,9 @@
</Grid> </Grid>
</StackPanel> </StackPanel>
<StackPanel Margin="26,12,26,0"> <StackPanel Margin="26,12,26,0">
<StackPanel Margin="0,0,0,12"> <StackPanel Margin="0,0,0,12">
<TextBlock <TextBlock
Grid.Column="0" Grid.Column="0"
Margin="0,0,0,0" Margin="0,0,0,0"
@ -65,10 +133,77 @@
TextAlignment="Left" /> TextAlignment="Left" />
</StackPanel> </StackPanel>
<TextBlock <TextBlock
Margin="0,0,0,10"
FontSize="14" FontSize="14"
Text="{DynamicResource flowlauncher_plugin_program_only_index_tip}" Text="{DynamicResource flowlauncher_plugin_program_only_index_tip}"
TextWrapping="Wrap" /> TextWrapping="Wrap" />
<TextBox x:Name="tbSuffixes" Margin="0,20,0,20" /> <Border Style="{DynamicResource SettingGroupBoxURLToolTip}">
<TextBlock
FontSize="14"
Text="{DynamicResource flowlauncher_plugin_program_protocol_tooltip}"
TextWrapping="Wrap" />
</Border>
<Border Style="{DynamicResource SettingGroupBoxSuffixToolTip}">
<TextBlock
FontSize="14"
Text="{DynamicResource flowlauncher_plugin_program_suffixes_tooltip}"
TextWrapping="Wrap" />
</Border>
<Grid Margin="0,20,0,12">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="250" />
<ColumnDefinition Width="250" />
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0" Margin="0,0,0,0">
<TextBlock
Margin="0,0,0,8"
FontSize="16"
FontWeight="SemiBold"
Text="{DynamicResource flowlauncher_plugin_program_suffixes_excutable_types}" />
<CheckBox Name="apprefMS" Margin="10,0,0,0" IsChecked="{Binding SuffixesStatus[appref-ms]}">appref-ms</CheckBox>
<CheckBox Name="exe" Margin="10,0,0,0" IsChecked="{Binding SuffixesStatus[exe]}">exe</CheckBox>
<CheckBox Name="lnk" Margin="10,0,0,0" IsChecked="{Binding SuffixesStatus[lnk]}">lnk</CheckBox>
<CheckBox
Name="CustomFiles"
Margin="10,0,0,0"
IsChecked="{Binding UseCustomSuffixes}"
Content="{DynamicResource flowlauncher_plugin_program_suffixes_custom_file_types}" />
<TextBox
x:Name="tbSuffixes"
Margin="10,4,0,6"
Style="{StaticResource CustomFileTypeTextBox}" />
</StackPanel>
<Border
Grid.Column="1"
Margin="20,0,0,10"
Padding="20,0,0,0"
BorderBrush="{DynamicResource PopupButtonAreaBorderColor}"
BorderThickness="1,0,0,0">
<StackPanel>
<TextBlock
Margin="0,0,0,8"
FontSize="16"
FontWeight="SemiBold"
Text="{DynamicResource flowlauncher_plugin_program_suffixes_URL_types}" />
<CheckBox Name="steam" Margin="10,0,0,0" IsChecked="{Binding ProtocolsStatus[steam]}" Content="{DynamicResource flowlauncher_plugin_program_suffixes_URL_steam}"></CheckBox>
<CheckBox Name="epic" Margin="10,0,0,0" IsChecked="{Binding ProtocolsStatus[epic]}" Content="{DynamicResource flowlauncher_plugin_program_suffixes_URL_epic}"></CheckBox>
<CheckBox Name="http" Margin="10,0,0,0" IsChecked="{Binding ProtocolsStatus[http]}" Content="{DynamicResource flowlauncher_plugin_program_suffixes_URL_http}"></CheckBox>
<CheckBox
Name="CustomProtocol"
Margin="10,0,0,0"
IsChecked="{Binding UseCustomProtocols}"
Content="{DynamicResource flowlauncher_plugin_program_suffixes_custom_urls}" />
<TextBox
x:Name="tbProtocols"
Margin="10,4,0,6"
Style="{StaticResource CustomURLTypeTextBox}" />
</StackPanel>
</Border>
</Grid>
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
<Border <Border
@ -78,10 +213,17 @@
BorderThickness="0,1,0,0"> BorderThickness="0,1,0,0">
<StackPanel HorizontalAlignment="Center" Orientation="Horizontal"> <StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
<Button <Button
x:Name="btnCancel" x:Name="btnReset"
Height="30" Height="30"
MinWidth="140" MinWidth="140"
Margin="0,0,5,0" Margin="0,0,5,0"
Click="BtnReset_OnClick"
Content="{DynamicResource flowlauncher_plugin_program_reset}" />
<Button
x:Name="btnCancel"
Height="30"
MinWidth="140"
Margin="5,0,5,0"
Click="BtnCancel_OnClick" Click="BtnCancel_OnClick"
Content="{DynamicResource cancel}" /> Content="{DynamicResource cancel}" />
@ -90,7 +232,7 @@
MinWidth="140" MinWidth="140"
Margin="5,0,0,0" Margin="5,0,0,0"
HorizontalAlignment="Right" HorizontalAlignment="Right"
Click="ButtonBase_OnClick" Click="BtnAdd_OnClick"
Content="{DynamicResource flowlauncher_plugin_program_update}" Content="{DynamicResource flowlauncher_plugin_program_update}"
Style="{DynamicResource AccentButtonStyle}" /> Style="{DynamicResource AccentButtonStyle}" />
</StackPanel> </StackPanel>

View file

@ -1,44 +1,76 @@
using System; using System;
using System.Collections.Generic;
using System.Windows; using System.Windows;
namespace Flow.Launcher.Plugin.Program namespace Flow.Launcher.Plugin.Program
{ {
/// <summary>
/// ProgramSuffixes.xaml 的交互逻辑
/// </summary>
public partial class ProgramSuffixes public partial class ProgramSuffixes
{ {
private PluginInitContext context; private PluginInitContext context;
private Settings _settings; private Settings _settings;
public Dictionary<string, bool> SuffixesStatus { get; set; }
public Dictionary<string, bool> ProtocolsStatus { get; set; }
public bool UseCustomSuffixes { get; set; }
public bool UseCustomProtocols { get; set; }
public ProgramSuffixes(PluginInitContext context, Settings settings) public ProgramSuffixes(PluginInitContext context, Settings settings)
{ {
this.context = context; this.context = context;
InitializeComponent();
_settings = settings; _settings = settings;
tbSuffixes.Text = string.Join(Settings.SuffixSeperator.ToString(), _settings.ProgramSuffixes); SuffixesStatus = new Dictionary<string, bool>(_settings.BuiltinSuffixesStatus);
ProtocolsStatus = new Dictionary<string, bool>(_settings.BuiltinProtocolsStatus);
UseCustomSuffixes = _settings.UseCustomSuffixes;
UseCustomProtocols = _settings.UseCustomProtocols;
InitializeComponent();
tbSuffixes.Text = string.Join(Settings.SuffixSeparator, _settings.CustomSuffixes);
tbProtocols.Text = string.Join(Settings.SuffixSeparator, _settings.CustomProtocols);
} }
private void BtnCancel_OnClick(object sender, RoutedEventArgs e) private void BtnCancel_OnClick(object sender, RoutedEventArgs e)
{ {
Close(); Close();
} }
private void ButtonBase_OnClick(object sender, RoutedEventArgs e)
{
var suffixes = tbSuffixes.Text.Split(Settings.SuffixSeperator, StringSplitOptions.RemoveEmptyEntries);
if (suffixes.Length == 0) private void BtnAdd_OnClick(object sender, RoutedEventArgs e)
{
var suffixes = tbSuffixes.Text.Split(Settings.SuffixSeparator, StringSplitOptions.RemoveEmptyEntries);
var protocols = tbProtocols.Text.Split(Settings.SuffixSeparator, StringSplitOptions.RemoveEmptyEntries);
if (suffixes.Length == 0 && UseCustomSuffixes)
{ {
string warning = context.API.GetTranslation("flowlauncher_plugin_program_suffixes_cannot_empty"); string warning = context.API.GetTranslation("flowlauncher_plugin_program_suffixes_cannot_empty");
MessageBox.Show(warning); MessageBox.Show(warning);
return; return;
} }
_settings.ProgramSuffixes = suffixes; if (protocols.Length == 0 && UseCustomProtocols)
{
string warning = context.API.GetTranslation("flowlauncher_plugin_protocols_cannot_empty");
MessageBox.Show(warning);
return;
}
string msg = context.API.GetTranslation("flowlauncher_plugin_program_update_file_suffixes"); _settings.CustomSuffixes = suffixes;
MessageBox.Show(msg); _settings.CustomProtocols = protocols;
_settings.BuiltinSuffixesStatus = new Dictionary<string, bool>(SuffixesStatus);
_settings.BuiltinProtocolsStatus = new Dictionary<string, bool>(ProtocolsStatus);
_settings.UseCustomSuffixes = UseCustomSuffixes;
_settings.UseCustomProtocols = UseCustomProtocols;
DialogResult = true; DialogResult = true;
} }
private void BtnReset_OnClick(object sender, RoutedEventArgs e)
{
apprefMS.IsChecked = true;
exe.IsChecked = true;
lnk.IsChecked = true;
CustomFiles.IsChecked = false;
steam.IsChecked = true;
epic.IsChecked = true;
http.IsChecked = false;
CustomProtocol.IsChecked = false;
}
} }
} }

View file

@ -16,7 +16,10 @@ using System.Collections;
using System.Diagnostics; using System.Diagnostics;
using Stopwatch = Flow.Launcher.Infrastructure.Stopwatch; using Stopwatch = Flow.Launcher.Infrastructure.Stopwatch;
using System.Diagnostics.CodeAnalysis; using System.Diagnostics.CodeAnalysis;
using System.Text.RegularExpressions;
using System.Threading.Channels; using System.Threading.Channels;
using Flow.Launcher.Infrastructure.Image;
using IniParser;
namespace Flow.Launcher.Plugin.Program.Programs namespace Flow.Launcher.Plugin.Program.Programs
{ {
@ -36,6 +39,7 @@ namespace Flow.Launcher.Plugin.Program.Programs
public string Location => ParentDirectory; public string Location => ParentDirectory;
private const string ShortcutExtension = "lnk"; private const string ShortcutExtension = "lnk";
private const string UrlExtension = "url";
private const string ExeExtension = "exe"; private const string ExeExtension = "exe";
private static readonly Win32 Default = new Win32() private static readonly Win32 Default = new Win32()
@ -287,6 +291,45 @@ namespace Flow.Launcher.Plugin.Program.Programs
#endif #endif
} }
private static Win32 UrlProgram(string path)
{
var program = Win32Program(path);
program.Valid = false;
try
{
var parser = new FileIniDataParser();
var data = parser.ReadFile(path);
var urlSection = data["InternetShortcut"];
var url = urlSection?["URL"];
if (String.IsNullOrEmpty(url))
{
return program;
}
foreach(var protocol in Main._settings.GetProtocols())
{
if(url.StartsWith(protocol))
{
program.LnkResolvedPath = url;
program.Valid = true;
break;
}
}
var iconPath = urlSection?["IconFile"];
if (!String.IsNullOrEmpty(iconPath))
{
program.IcoPath = iconPath;
}
}
catch (Exception e)
{
// Many files do not have the required fields, so no logging is done.
}
return program;
}
private static Win32 ExeProgram(string path) private static Win32 ExeProgram(string path)
{ {
try try
@ -343,10 +386,10 @@ namespace Flow.Launcher.Plugin.Program.Programs
{ {
ExeExtension => ExeProgram(x), ExeExtension => ExeProgram(x),
ShortcutExtension => LnkProgram(x), ShortcutExtension => LnkProgram(x),
UrlExtension => UrlProgram(x),
_ => Win32Program(x) _ => Win32Program(x)
}); });
return programs; return programs;
} }
@ -365,8 +408,9 @@ namespace Flow.Launcher.Plugin.Program.Programs
.Select(x => Extension(x) switch .Select(x => Extension(x) switch
{ {
ShortcutExtension => LnkProgram(x), ShortcutExtension => LnkProgram(x),
UrlExtension => UrlProgram(x),
_ => Win32Program(x) _ => Win32Program(x)
}).Where(x => x.Valid); });
return programs; return programs;
} }
@ -504,7 +548,7 @@ namespace Flow.Launcher.Plugin.Program.Programs
{ {
var programs = Enumerable.Empty<Win32>(); var programs = Enumerable.Empty<Win32>();
var unregistered = UnregisteredPrograms(settings.ProgramSources, settings.ProgramSuffixes); var unregistered = UnregisteredPrograms(settings.ProgramSources, settings.GetSuffixes());
programs = programs.Concat(unregistered); programs = programs.Concat(unregistered);
@ -512,19 +556,19 @@ namespace Flow.Launcher.Plugin.Program.Programs
if (settings.EnableRegistrySource) if (settings.EnableRegistrySource)
{ {
var appPaths = AppPathsPrograms(settings.ProgramSuffixes); var appPaths = AppPathsPrograms(settings.GetSuffixes());
autoIndexPrograms = autoIndexPrograms.Concat(appPaths); autoIndexPrograms = autoIndexPrograms.Concat(appPaths);
} }
if (settings.EnableStartMenuSource) if (settings.EnableStartMenuSource)
{ {
var startMenu = StartMenuPrograms(settings.ProgramSuffixes); var startMenu = StartMenuPrograms(settings.GetSuffixes());
autoIndexPrograms = autoIndexPrograms.Concat(startMenu); autoIndexPrograms = autoIndexPrograms.Concat(startMenu);
} }
autoIndexPrograms = ProgramsHasher(autoIndexPrograms); autoIndexPrograms = ProgramsHasher(autoIndexPrograms);
return programs.Concat(autoIndexPrograms).Distinct().ToArray(); return programs.Concat(autoIndexPrograms).Where(x => x.Valid).Distinct().ToArray();
} }
#if DEBUG //This is to make developer aware of any unhandled exception and add in handling. #if DEBUG //This is to make developer aware of any unhandled exception and add in handling.
catch (Exception) catch (Exception)

View file

@ -1,6 +1,9 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using System.Linq;
using System.Text.Json.Serialization;
using Windows.Foundation.Metadata;
namespace Flow.Launcher.Plugin.Program namespace Flow.Launcher.Plugin.Program
{ {
@ -9,17 +12,109 @@ namespace Flow.Launcher.Plugin.Program
public DateTime LastIndexTime { get; set; } public DateTime LastIndexTime { get; set; }
public List<ProgramSource> ProgramSources { get; set; } = new List<ProgramSource>(); public List<ProgramSource> ProgramSources { get; set; } = new List<ProgramSource>();
public List<DisabledProgramSource> DisabledProgramSources { get; set; } = new List<DisabledProgramSource>(); public List<DisabledProgramSource> DisabledProgramSources { get; set; } = new List<DisabledProgramSource>();
public string[] ProgramSuffixes { get; set; } = {"appref-ms", "exe", "lnk"};
[Obsolete, JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string[] ProgramSuffixes { get; set; } = null;
public string[] CustomSuffixes { get; set; } = Array.Empty<string>(); // Custom suffixes only
public string[] CustomProtocols { get; set; } = Array.Empty<string>();
public Dictionary<string, bool> BuiltinSuffixesStatus { get; set; } = new Dictionary<string, bool>{
{ "exe", true }, { "appref-ms", true }, { "lnk", true }
};
public Dictionary<string, bool> BuiltinProtocolsStatus { get; set; } = new Dictionary<string, bool>{
{ "steam", true }, { "epic", true }, { "http", false }
};
[JsonIgnore]
public Dictionary<string, string> BuiltinProtocols { get; set; } = new Dictionary<string, string>{
{ "steam", $"steam://run/{SuffixSeparator}steam://rungameid/" }, { "epic", "com.epicgames.launcher://apps/" }, { "http", $"http://{SuffixSeparator}https://"}
};
public bool UseCustomSuffixes { get; set; } = false;
public bool UseCustomProtocols { get; set; } = false;
public string[] GetSuffixes()
{
RemoveRedundantSuffixes();
List<string> extensions = new List<string>();
foreach (var item in BuiltinSuffixesStatus)
{
if (item.Value)
{
extensions.Add(item.Key);
}
}
if (BuiltinProtocolsStatus.Values.Any(x => x == true) || UseCustomProtocols)
{
extensions.Add("url");
}
if (UseCustomSuffixes)
{
return extensions.Concat(CustomSuffixes).DistinctBy(x => x.ToLower()).ToArray();
}
else
{
return extensions.DistinctBy(x => x.ToLower()).ToArray();
}
}
public string[] GetProtocols()
{
List<string> protocols = new List<string>();
foreach (var item in BuiltinProtocolsStatus)
{
if (item.Value)
{
if (BuiltinProtocols.TryGetValue(item.Key, out string ps))
{
var tmp = ps.Split(SuffixSeparator, StringSplitOptions.RemoveEmptyEntries);
foreach (var protocol in tmp)
{
protocols.Add(protocol);
}
}
}
}
if (UseCustomProtocols)
{
return protocols.Concat(CustomProtocols).DistinctBy(x => x.ToLower()).ToArray();
}
else
{
return protocols.DistinctBy(x => x.ToLower()).ToArray();
}
}
private void RemoveRedundantSuffixes()
{
// Migrate to new settings
// CustomSuffixes no longer contains custom suffixes
// users has tweaked the settings
// or this function has been executed once
if (UseCustomSuffixes == true || ProgramSuffixes == null)
return;
var suffixes = ProgramSuffixes.ToList();
foreach(var item in BuiltinSuffixesStatus)
{
suffixes.Remove(item.Key);
}
CustomSuffixes = suffixes.ToArray(); // Custom suffixes
UseCustomSuffixes = CustomSuffixes.Length != 0; // Search custom suffixes or not
ProgramSuffixes = null;
}
public bool EnableStartMenuSource { get; set; } = true; public bool EnableStartMenuSource { get; set; } = true;
public bool EnableDescription { get; set; } = false; public bool EnableDescription { get; set; } = false;
public bool HideAppsPath { get; set; } = true; public bool HideAppsPath { get; set; } = true;
public bool EnableRegistrySource { get; set; } = true; public bool EnableRegistrySource { get; set; } = true;
public string CustomizedExplorer { get; set; } = Explorer; public string CustomizedExplorer { get; set; } = Explorer;
public string CustomizedArgs { get; set; } = ExplorerArgs; public string CustomizedArgs { get; set; } = ExplorerArgs;
internal const char SuffixSeperator = ';'; internal const char SuffixSeparator = ';';
internal const string Explorer = "explorer"; internal const string Explorer = "explorer";

View file

@ -12,7 +12,7 @@ namespace Flow.Launcher.Plugin.Program
var text = value as string[]; var text = value as string[];
if (text != null) if (text != null)
{ {
return string.Join(";", text); return string.Join(Settings.SuffixSeparator, text);
} }
else else
{ {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2 KiB