mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Merge branch 'dev' into dependabot/nuget/System.Data.SQLite.Core-1.0.116
This commit is contained in:
commit
e77be5e3da
67 changed files with 2415 additions and 704 deletions
|
|
@ -1,4 +1,6 @@
|
|||
namespace Flow.Launcher.Core.ExternalPlugins
|
||||
using System;
|
||||
|
||||
namespace Flow.Launcher.Core.ExternalPlugins
|
||||
{
|
||||
public record UserPlugin
|
||||
{
|
||||
|
|
@ -12,5 +14,8 @@
|
|||
public string UrlDownload { get; set; }
|
||||
public string UrlSourceCode { get; set; }
|
||||
public string IcoPath { get; set; }
|
||||
public DateTime LatestReleaseDate { get; set; }
|
||||
public DateTime DateAdded { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -252,6 +252,7 @@ namespace Flow.Launcher.Infrastructure.Image
|
|||
image.BeginInit();
|
||||
image.CacheOption = BitmapCacheOption.OnLoad;
|
||||
image.UriSource = new Uri(path);
|
||||
image.CreateOptions = BitmapCreateOptions.IgnoreColorProfile;
|
||||
image.EndInit();
|
||||
return image;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -202,7 +202,11 @@ namespace Flow.Launcher.Infrastructure
|
|||
if (allQuerySubstringsMatched)
|
||||
{
|
||||
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);
|
||||
|
||||
var resultList = indexList.Select(x => translationMapping?.MapToOriginalIndex(x) ?? x).Distinct().ToList();
|
||||
|
|
@ -296,7 +300,7 @@ namespace Flow.Launcher.Infrastructure
|
|||
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)
|
||||
{
|
||||
// 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
|
||||
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
|
||||
if (stringToCompare.Length - query.Length < 5)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -41,6 +41,10 @@ namespace Flow.Launcher.Infrastructure.UserSettings
|
|||
public bool UseGlyphIcons { get; set; } = true;
|
||||
public bool UseAnimation { 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 double SettingWindowWidth { get; set; } = 1000;
|
||||
|
|
@ -199,7 +203,7 @@ namespace Flow.Launcher.Infrastructure.UserSettings
|
|||
}
|
||||
public bool LeaveCmdOpen { get; set; }
|
||||
public bool HideWhenDeactive { get; set; } = true;
|
||||
public bool RememberLastLaunchLocation { get; set; }
|
||||
public SearchWindowPositions SearchWindowPosition { get; set; } = SearchWindowPositions.MouseScreenCenter;
|
||||
public bool IgnoreHotkeysOnFullscreen { get; set; }
|
||||
|
||||
public HttpProxy Proxy { get; set; } = new HttpProxy();
|
||||
|
|
@ -225,4 +229,12 @@ namespace Flow.Launcher.Infrastructure.UserSettings
|
|||
Light,
|
||||
Dark
|
||||
}
|
||||
public enum SearchWindowPositions
|
||||
{
|
||||
RememberLastLaunchLocation,
|
||||
MouseScreenCenter,
|
||||
MouseScreenCenterTop,
|
||||
MouseScreenLeftTop,
|
||||
MouseScreenRightTop
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@
|
|||
<ItemGroup>
|
||||
<PackageReference Include="Moq" Version="4.16.1" />
|
||||
<PackageReference Include="nunit" Version="3.13.2" />
|
||||
<PackageReference Include="NUnit3TestAdapter" Version="4.0.0">
|
||||
<PackageReference Include="NUnit3TestAdapter" Version="4.2.1">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
|
|
|
|||
|
|
@ -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, LastIsChrome, 147)]
|
||||
[TestCase(Chrome, LastIsChrome, 145)]
|
||||
[TestCase("chro", HelpCureHopeRaiseOnMindEntityChrome, 50)]
|
||||
[TestCase("chr", HelpCureHopeRaiseOnMindEntityChrome, 30)]
|
||||
[TestCase(Chrome, UninstallOrChangeProgramsOnYourComputer, 21)]
|
||||
[TestCase(Chrome, CandyCrushSagaFromKing, 0)]
|
||||
[TestCase("sql", MicrosoftSqlServerManagementStudio, 110)]
|
||||
[TestCase("sql manag", MicrosoftSqlServerManagementStudio, 121)] //double spacing intended
|
||||
[TestCase("sql", MicrosoftSqlServerManagementStudio, 109)]
|
||||
[TestCase("sql manag", MicrosoftSqlServerManagementStudio, 120)] //double spacing intended
|
||||
public void WhenGivenQueryString_ThenShouldReturn_TheDesiredScoring(
|
||||
string queryString, string compareString, int expectedScore)
|
||||
{
|
||||
|
|
@ -275,7 +281,40 @@ namespace Flow.Launcher.Test
|
|||
$"Query: \"{queryString}\"{Environment.NewLine} " +
|
||||
$"CompareString1: \"{compareString1}\", Score: {compareString1Result.Score}{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")]
|
||||
|
|
|
|||
43
Flow.Launcher/Converters/BoolToVisibilityConverter.cs
Normal file
43
Flow.Launcher/Converters/BoolToVisibilityConverter.cs
Normal 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();
|
||||
}
|
||||
}
|
||||
32
Flow.Launcher/Converters/TextConverter.cs
Normal file
32
Flow.Launcher/Converters/TextConverter.cs
Normal 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();
|
||||
}
|
||||
}
|
||||
|
|
@ -17,7 +17,7 @@ namespace Flow.Launcher.Helper
|
|||
internal static void Initialize(MainViewModel mainVM)
|
||||
{
|
||||
mainViewModel = mainVM;
|
||||
settings = mainViewModel._settings;
|
||||
settings = mainViewModel.Settings;
|
||||
|
||||
SetHotkey(settings.Hotkey, OnToggleHotkey);
|
||||
LoadCustomPluginHotkey();
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 1.2 KiB |
|
|
@ -77,13 +77,13 @@
|
|||
<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_web">Website</system:String>
|
||||
<system:String x:Key="plugin_uninstall">Uninstall</system:String>
|
||||
<system:String x:Key="uninstallbtn">Uninstall</system:String>
|
||||
|
||||
|
||||
<!-- Setting Plugin Store -->
|
||||
<system:String x:Key="pluginStore">Plugin Store</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 -->
|
||||
<system:String x:Key="theme">Tema</system:String>
|
||||
|
|
|
|||
|
|
@ -77,13 +77,13 @@
|
|||
<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_web">Webseite</system:String>
|
||||
<system:String x:Key="plugin_uninstall">Deinstallieren</system:String>
|
||||
<system:String x:Key="uninstallbtn">Deinstallieren</system:String>
|
||||
|
||||
|
||||
<!-- Setting Plugin Store -->
|
||||
<system:String x:Key="pluginStore">Erweiterungen laden</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 -->
|
||||
<system:String x:Key="theme">Design</system:String>
|
||||
|
|
|
|||
|
|
@ -23,6 +23,8 @@
|
|||
<system:String x:Key="textTitle">Text</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="PositionReset">Position Reset</system:String>
|
||||
<system:String x:Key="PositionResetToolTip">Reset search window position</system:String>
|
||||
|
||||
<!-- Setting General -->
|
||||
<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="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="SearchWindowPosition">Search Window Position</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="lastQueryMode">Last Query Style</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_version">| Version</system:String>
|
||||
<system:String x:Key="plugin_query_web">Website</system:String>
|
||||
<system:String x:Key="plugin_uninstall">Uninstall</system:String>
|
||||
|
||||
|
||||
<!-- Setting Plugin Store -->
|
||||
<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="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 -->
|
||||
<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="Animation">Animation</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 -->
|
||||
<system:String x:Key="hotkey">Hotkey</system:String>
|
||||
|
|
|
|||
|
|
@ -77,13 +77,13 @@
|
|||
<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_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 -->
|
||||
<system:String x:Key="pluginStore">Tienda de Plugins</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 -->
|
||||
<system:String x:Key="theme">Tema</system:String>
|
||||
|
|
|
|||
|
|
@ -77,13 +77,13 @@
|
|||
<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_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 -->
|
||||
<system:String x:Key="pluginStore">Plugin Store</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 -->
|
||||
<system:String x:Key="theme">Thèmes</system:String>
|
||||
|
|
|
|||
|
|
@ -77,13 +77,13 @@
|
|||
<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_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 -->
|
||||
<system:String x:Key="pluginStore">Negozio dei Plugin</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 -->
|
||||
<system:String x:Key="theme">Tema</system:String>
|
||||
|
|
|
|||
|
|
@ -77,13 +77,13 @@
|
|||
<system:String x:Key="plugin_query_time">クエリ時間:</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_uninstall">アンインストール</system:String>
|
||||
<system:String x:Key="uninstallbtn">アンインストール</system:String>
|
||||
|
||||
|
||||
<!-- Setting Plugin Store -->
|
||||
<system:String x:Key="pluginStore">プラグインストア</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 -->
|
||||
<system:String x:Key="theme">テーマ</system:String>
|
||||
|
|
|
|||
|
|
@ -77,13 +77,13 @@
|
|||
<system:String x:Key="plugin_query_time">쿼리 시간:</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_uninstall">제거</system:String>
|
||||
<system:String x:Key="uninstallbtn">제거</system:String>
|
||||
|
||||
|
||||
<!-- Setting Plugin Store -->
|
||||
<system:String x:Key="pluginStore">플러그인 스토어</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 -->
|
||||
<system:String x:Key="theme">테마</system:String>
|
||||
|
|
|
|||
|
|
@ -77,13 +77,13 @@
|
|||
<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_web">Website</system:String>
|
||||
<system:String x:Key="plugin_uninstall">Uninstall</system:String>
|
||||
<system:String x:Key="uninstallbtn">Uninstall</system:String>
|
||||
|
||||
|
||||
<!-- Setting Plugin Store -->
|
||||
<system:String x:Key="pluginStore">Plugin Store</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 -->
|
||||
<system:String x:Key="theme">Theme</system:String>
|
||||
|
|
|
|||
|
|
@ -77,13 +77,13 @@
|
|||
<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_web">Website</system:String>
|
||||
<system:String x:Key="plugin_uninstall">Uninstall</system:String>
|
||||
<system:String x:Key="uninstallbtn">Uninstall</system:String>
|
||||
|
||||
|
||||
<!-- Setting Plugin Store -->
|
||||
<system:String x:Key="pluginStore">Plugin Winkel</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 -->
|
||||
<system:String x:Key="theme">Thema</system:String>
|
||||
|
|
|
|||
|
|
@ -77,13 +77,13 @@
|
|||
<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_web">Website</system:String>
|
||||
<system:String x:Key="plugin_uninstall">Odinstalowywanie</system:String>
|
||||
<system:String x:Key="uninstallbtn">Odinstalowywanie</system:String>
|
||||
|
||||
|
||||
<!-- Setting Plugin Store -->
|
||||
<system:String x:Key="pluginStore">Plugin Store</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 -->
|
||||
<system:String x:Key="theme">Skórka</system:String>
|
||||
|
|
|
|||
|
|
@ -77,13 +77,13 @@
|
|||
<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_web">Website</system:String>
|
||||
<system:String x:Key="plugin_uninstall">Desinstalar</system:String>
|
||||
<system:String x:Key="uninstallbtn">Desinstalar</system:String>
|
||||
|
||||
|
||||
<!-- Setting Plugin Store -->
|
||||
<system:String x:Key="pluginStore">Plugin Store</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 -->
|
||||
<system:String x:Key="theme">Tema</system:String>
|
||||
|
|
|
|||
|
|
@ -77,13 +77,13 @@
|
|||
<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_web">Site</system:String>
|
||||
<system:String x:Key="plugin_uninstall">Desinstalar</system:String>
|
||||
<system:String x:Key="uninstallbtn">Desinstalar</system:String>
|
||||
|
||||
|
||||
<!-- Setting Plugin Store -->
|
||||
<system:String x:Key="pluginStore">Loja de plugins</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 -->
|
||||
<system:String x:Key="theme">Tema</system:String>
|
||||
|
|
|
|||
|
|
@ -77,13 +77,13 @@
|
|||
<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_web">Website</system:String>
|
||||
<system:String x:Key="plugin_uninstall">Удалить</system:String>
|
||||
<system:String x:Key="uninstallbtn">Удалить</system:String>
|
||||
|
||||
|
||||
<!-- Setting Plugin Store -->
|
||||
<system:String x:Key="pluginStore">Plugin Store</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 -->
|
||||
<system:String x:Key="theme">Тема</system:String>
|
||||
|
|
|
|||
|
|
@ -77,13 +77,13 @@
|
|||
<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_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 -->
|
||||
<system:String x:Key="pluginStore">Repozitár pluginov</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 -->
|
||||
<system:String x:Key="theme">Motív</system:String>
|
||||
|
|
|
|||
|
|
@ -77,13 +77,13 @@
|
|||
<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_web">Website</system:String>
|
||||
<system:String x:Key="plugin_uninstall">Uninstall</system:String>
|
||||
<system:String x:Key="uninstallbtn">Uninstall</system:String>
|
||||
|
||||
|
||||
<!-- Setting Plugin Store -->
|
||||
<system:String x:Key="pluginStore">Plugin Store</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 -->
|
||||
<system:String x:Key="theme">Tema</system:String>
|
||||
|
|
|
|||
|
|
@ -77,13 +77,13 @@
|
|||
<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_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 -->
|
||||
<system:String x:Key="pluginStore">Eklenti Mağazası</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 -->
|
||||
<system:String x:Key="theme">Temalar</system:String>
|
||||
|
|
|
|||
|
|
@ -77,13 +77,13 @@
|
|||
<system:String x:Key="plugin_query_time">Запит:</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_uninstall">Uninstall</system:String>
|
||||
<system:String x:Key="uninstallbtn">Uninstall</system:String>
|
||||
|
||||
|
||||
<!-- Setting Plugin Store -->
|
||||
<system:String x:Key="pluginStore">Магазин плагінів</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 -->
|
||||
<system:String x:Key="theme">Тема</system:String>
|
||||
|
|
|
|||
|
|
@ -77,13 +77,13 @@
|
|||
<system:String x:Key="plugin_query_time">查询耗时:</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_uninstall">卸载</system:String>
|
||||
<system:String x:Key="uninstallbtn">卸载</system:String>
|
||||
|
||||
|
||||
<!-- Setting Plugin Store -->
|
||||
<system:String x:Key="pluginStore">插件商店</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 -->
|
||||
<system:String x:Key="theme">主题</system:String>
|
||||
|
|
|
|||
|
|
@ -77,13 +77,13 @@
|
|||
<system:String x:Key="plugin_query_time">查詢耗時:</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_uninstall">解除安裝</system:String>
|
||||
<system:String x:Key="uninstallbtn">解除安裝</system:String>
|
||||
|
||||
|
||||
<!-- Setting Plugin Store -->
|
||||
<system:String x:Key="pluginStore">外掛商店</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 -->
|
||||
<system:String x:Key="theme">主題</system:String>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
<Window
|
||||
x:Class="Flow.Launcher.MainWindow"
|
||||
<Window x:Class="Flow.Launcher.MainWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:converters="clr-namespace:Flow.Launcher.Converters"
|
||||
|
|
@ -32,193 +31,200 @@
|
|||
Visibility="{Binding MainWindowVisibility, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
WindowStartupLocation="Manual"
|
||||
WindowStyle="None"
|
||||
mc:Ignorable="d"
|
||||
Left="{Binding Left, Mode=TwoWay}"
|
||||
Top="{Binding Top, Mode=TwoWay}">
|
||||
mc:Ignorable="d">
|
||||
<Window.Resources>
|
||||
<converters:QuerySuggestionBoxConverter x:Key="QuerySuggestionBoxConverter" />
|
||||
<converters:BorderClipConverter x:Key="BorderClipConverter" />
|
||||
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
|
||||
</Window.Resources>
|
||||
<Window.InputBindings>
|
||||
<KeyBinding Key="Escape" Command="{Binding EscCommand}" />
|
||||
<KeyBinding Key="F1" Command="{Binding StartHelpCommand}" />
|
||||
<KeyBinding Key="F5" Command="{Binding ReloadPluginDataCommand}" />
|
||||
<KeyBinding Key="Tab" Command="{Binding AutocompleteQueryCommand}" />
|
||||
<KeyBinding
|
||||
Key="Tab"
|
||||
<KeyBinding Key="Escape"
|
||||
Command="{Binding EscCommand}" />
|
||||
<KeyBinding Key="F1"
|
||||
Command="{Binding StartHelpCommand}" />
|
||||
<KeyBinding Key="F5"
|
||||
Command="{Binding ReloadPluginDataCommand}" />
|
||||
<KeyBinding Key="Tab"
|
||||
Command="{Binding AutocompleteQueryCommand}" />
|
||||
<KeyBinding Key="Tab"
|
||||
Command="{Binding AutocompleteQueryCommand}"
|
||||
Modifiers="Shift" />
|
||||
<KeyBinding
|
||||
Key="I"
|
||||
<KeyBinding Key="I"
|
||||
Command="{Binding OpenSettingCommand}"
|
||||
Modifiers="Ctrl" />
|
||||
<KeyBinding
|
||||
Key="N"
|
||||
<KeyBinding Key="N"
|
||||
Command="{Binding SelectNextItemCommand}"
|
||||
Modifiers="Ctrl" />
|
||||
<KeyBinding
|
||||
Key="J"
|
||||
<KeyBinding Key="J"
|
||||
Command="{Binding SelectNextItemCommand}"
|
||||
Modifiers="Ctrl" />
|
||||
<KeyBinding
|
||||
Key="D"
|
||||
<KeyBinding Key="D"
|
||||
Command="{Binding SelectNextPageCommand}"
|
||||
Modifiers="Ctrl" />
|
||||
<KeyBinding
|
||||
Key="P"
|
||||
<KeyBinding Key="P"
|
||||
Command="{Binding SelectPrevItemCommand}"
|
||||
Modifiers="Ctrl" />
|
||||
<KeyBinding
|
||||
Key="K"
|
||||
<KeyBinding Key="K"
|
||||
Command="{Binding SelectPrevItemCommand}"
|
||||
Modifiers="Ctrl" />
|
||||
<KeyBinding
|
||||
Key="U"
|
||||
<KeyBinding Key="U"
|
||||
Command="{Binding SelectPrevPageCommand}"
|
||||
Modifiers="Ctrl" />
|
||||
<KeyBinding
|
||||
Key="Home"
|
||||
<KeyBinding Key="Home"
|
||||
Command="{Binding SelectFirstResultCommand}"
|
||||
Modifiers="Alt" />
|
||||
<KeyBinding
|
||||
Key="O"
|
||||
<KeyBinding Key="O"
|
||||
Command="{Binding LoadContextMenuCommand}"
|
||||
Modifiers="Ctrl" />
|
||||
<KeyBinding Key="Right"
|
||||
Command="{Binding LoadContextMenuCommand}" />
|
||||
<KeyBinding Key="Left"
|
||||
Command="{Binding EscCommand}" />
|
||||
<KeyBinding
|
||||
Key="H"
|
||||
Command="{Binding LoadHistoryCommand}"
|
||||
Modifiers="Ctrl" />
|
||||
<KeyBinding Key="Right" Command="{Binding LoadContextMenuCommand}" />
|
||||
<KeyBinding Key="Left" Command="{Binding EscCommand}" />
|
||||
<KeyBinding
|
||||
Key="OemCloseBrackets"
|
||||
Modifiers="Control"
|
||||
Command="{Binding IncreaseWidthCommand}"/>
|
||||
Command="{Binding IncreaseWidthCommand}"
|
||||
Modifiers="Control" />
|
||||
<KeyBinding
|
||||
Key="OemOpenBrackets"
|
||||
Modifiers="Control"
|
||||
Command="{Binding DecreaseWidthCommand}"/>
|
||||
Command="{Binding DecreaseWidthCommand}"
|
||||
Modifiers="Control" />
|
||||
<KeyBinding
|
||||
Key="OemPlus"
|
||||
Modifiers="Control"
|
||||
Command="{Binding IncreaseMaxResultCommand}"/>
|
||||
Command="{Binding IncreaseMaxResultCommand}"
|
||||
Modifiers="Control" />
|
||||
<KeyBinding
|
||||
Key="OemMinus"
|
||||
Modifiers="Control"
|
||||
Command="{Binding DecreaseMaxResultCommand}"/>
|
||||
Command="{Binding DecreaseMaxResultCommand}"
|
||||
Modifiers="Control" />
|
||||
<KeyBinding
|
||||
Key="H"
|
||||
Command="{Binding LoadHistoryCommand}"
|
||||
Modifiers="Ctrl" />
|
||||
<KeyBinding
|
||||
Key="Enter"
|
||||
<KeyBinding Key="Enter"
|
||||
Command="{Binding OpenResultCommand}"
|
||||
Modifiers="Ctrl+Shift" />
|
||||
<KeyBinding
|
||||
Key="Enter"
|
||||
<KeyBinding Key="Enter"
|
||||
Command="{Binding LoadContextMenuCommand}"
|
||||
Modifiers="Shift" />
|
||||
<KeyBinding Key="Enter" Command="{Binding OpenResultCommand}" />
|
||||
<KeyBinding
|
||||
Key="Enter"
|
||||
<KeyBinding Key="Enter"
|
||||
Command="{Binding OpenResultCommand}" />
|
||||
<KeyBinding Key="Enter"
|
||||
Command="{Binding OpenResultCommand}"
|
||||
Modifiers="Ctrl" />
|
||||
<KeyBinding
|
||||
Key="Enter"
|
||||
<KeyBinding Key="Enter"
|
||||
Command="{Binding OpenResultCommand}"
|
||||
Modifiers="Alt" />
|
||||
<KeyBinding
|
||||
Key="D1"
|
||||
<KeyBinding Key="D1"
|
||||
Command="{Binding OpenResultCommand}"
|
||||
CommandParameter="0"
|
||||
Modifiers="{Binding OpenResultCommandModifiers}" />
|
||||
<KeyBinding
|
||||
Key="D2"
|
||||
<KeyBinding Key="D2"
|
||||
Command="{Binding OpenResultCommand}"
|
||||
CommandParameter="1"
|
||||
Modifiers="{Binding OpenResultCommandModifiers}" />
|
||||
<KeyBinding
|
||||
Key="D3"
|
||||
<KeyBinding Key="D3"
|
||||
Command="{Binding OpenResultCommand}"
|
||||
CommandParameter="2"
|
||||
Modifiers="{Binding OpenResultCommandModifiers}" />
|
||||
<KeyBinding
|
||||
Key="D4"
|
||||
<KeyBinding Key="D4"
|
||||
Command="{Binding OpenResultCommand}"
|
||||
CommandParameter="3"
|
||||
Modifiers="{Binding OpenResultCommandModifiers}" />
|
||||
<KeyBinding
|
||||
Key="D5"
|
||||
<KeyBinding Key="D5"
|
||||
Command="{Binding OpenResultCommand}"
|
||||
CommandParameter="4"
|
||||
Modifiers="{Binding OpenResultCommandModifiers}" />
|
||||
<KeyBinding
|
||||
Key="D6"
|
||||
<KeyBinding Key="D6"
|
||||
Command="{Binding OpenResultCommand}"
|
||||
CommandParameter="5"
|
||||
Modifiers="{Binding OpenResultCommandModifiers}" />
|
||||
<KeyBinding
|
||||
Key="D7"
|
||||
<KeyBinding Key="D7"
|
||||
Command="{Binding OpenResultCommand}"
|
||||
CommandParameter="6"
|
||||
Modifiers="{Binding OpenResultCommandModifiers}" />
|
||||
<KeyBinding
|
||||
Key="D8"
|
||||
<KeyBinding Key="D8"
|
||||
Command="{Binding OpenResultCommand}"
|
||||
CommandParameter="7"
|
||||
Modifiers="{Binding OpenResultCommandModifiers}" />
|
||||
<KeyBinding
|
||||
Key="D9"
|
||||
<KeyBinding Key="D9"
|
||||
Command="{Binding OpenResultCommand}"
|
||||
CommandParameter="8"
|
||||
Modifiers="{Binding OpenResultCommandModifiers}" />
|
||||
<KeyBinding
|
||||
Key="D0"
|
||||
<KeyBinding Key="D0"
|
||||
Command="{Binding OpenResultCommand}"
|
||||
CommandParameter="9"
|
||||
Modifiers="{Binding OpenResultCommandModifiers}" />
|
||||
</Window.InputBindings>
|
||||
<Grid>
|
||||
<Border MouseDown="OnMouseDown" Style="{DynamicResource WindowBorderStyle}">
|
||||
<Border MouseDown="OnMouseDown"
|
||||
Style="{DynamicResource WindowBorderStyle}">
|
||||
<StackPanel Orientation="Vertical">
|
||||
<Grid>
|
||||
<TextBox
|
||||
x:Name="QueryTextSuggestionBox"
|
||||
<TextBox x:Name="QueryTextSuggestionBox"
|
||||
IsEnabled="False"
|
||||
Style="{DynamicResource QuerySuggestionBoxStyle}">
|
||||
<TextBox.Text>
|
||||
<MultiBinding Converter="{StaticResource QuerySuggestionBoxConverter}">
|
||||
<Binding ElementName="QueryTextBox" Mode="OneTime" />
|
||||
<Binding ElementName="ResultListBox" Path="SelectedItem" />
|
||||
<Binding ElementName="QueryTextBox" Path="Text" />
|
||||
<Binding ElementName="QueryTextBox"
|
||||
Mode="OneTime" />
|
||||
<Binding ElementName="ResultListBox"
|
||||
Path="SelectedItem" />
|
||||
<Binding ElementName="QueryTextBox"
|
||||
Path="Text" />
|
||||
</MultiBinding>
|
||||
</TextBox.Text>
|
||||
</TextBox>
|
||||
<TextBox
|
||||
x:Name="QueryTextBox"
|
||||
<TextBox x:Name="QueryTextBox"
|
||||
AllowDrop="True"
|
||||
Background="Transparent"
|
||||
PreviewDragOver="OnPreviewDragOver"
|
||||
PreviewKeyUp="QueryTextBox_KeyUp"
|
||||
Style="{DynamicResource QueryBoxStyle}"
|
||||
Text="{Binding QueryText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
PreviewKeyUp="QueryTextBox_KeyUp"
|
||||
Visibility="Visible">
|
||||
<TextBox.CommandBindings>
|
||||
<CommandBinding Command="ApplicationCommands.Copy" Executed="OnCopy" />
|
||||
<CommandBinding Command="ApplicationCommands.Copy"
|
||||
Executed="OnCopy" />
|
||||
</TextBox.CommandBindings>
|
||||
<TextBox.ContextMenu>
|
||||
<ContextMenu>
|
||||
<MenuItem Command="ApplicationCommands.Cut" Header="{DynamicResource cut}" />
|
||||
<MenuItem Command="ApplicationCommands.Copy" Header="{DynamicResource copy}" />
|
||||
<MenuItem Command="ApplicationCommands.Paste" Header="{DynamicResource paste}" />
|
||||
<Separator
|
||||
Margin="0"
|
||||
<MenuItem Command="ApplicationCommands.Cut"
|
||||
Header="{DynamicResource cut}" />
|
||||
<MenuItem Command="ApplicationCommands.Copy"
|
||||
Header="{DynamicResource copy}" />
|
||||
<MenuItem Command="ApplicationCommands.Paste"
|
||||
Header="{DynamicResource paste}" />
|
||||
<Separator Margin="0"
|
||||
Padding="0,4,0,4"
|
||||
Background="{DynamicResource ContextSeparator}" />
|
||||
<MenuItem Click="OnContextMenusForSettingsClick" Header="{DynamicResource flowlauncher_settings}" />
|
||||
<MenuItem Command="{Binding EscCommand}" Header="{DynamicResource closeWindow}" />
|
||||
<MenuItem Click="OnContextMenusForSettingsClick"
|
||||
Header="{DynamicResource flowlauncher_settings}" />
|
||||
<MenuItem Command="{Binding EscCommand}"
|
||||
Header="{DynamicResource closeWindow}" />
|
||||
</ContextMenu>
|
||||
</TextBox.ContextMenu>
|
||||
</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}">
|
||||
<Image
|
||||
x:Name="PluginActivationIcon"
|
||||
<Image x:Name="PluginActivationIcon"
|
||||
Width="32"
|
||||
Height="32"
|
||||
Margin="0,0,0,0"
|
||||
|
|
@ -229,8 +235,7 @@
|
|||
Source="{Binding PluginIconPath}"
|
||||
Stretch="Uniform"
|
||||
Style="{DynamicResource PluginActivationIcon}" />
|
||||
<Path
|
||||
Name="SearchIcon"
|
||||
<Path Name="SearchIcon"
|
||||
Margin="0"
|
||||
Data="{DynamicResource SearchIconImg}"
|
||||
Stretch="Fill"
|
||||
|
|
@ -243,27 +248,32 @@
|
|||
<ContentControl>
|
||||
<ContentControl.Style>
|
||||
<Style TargetType="ContentControl">
|
||||
<Setter Property="Visibility" Value="Collapsed" />
|
||||
<Setter Property="Visibility"
|
||||
Value="Collapsed" />
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding ElementName=ResultListBox, Path=Visibility}" Value="Visible">
|
||||
<Setter Property="Visibility" Value="Visible" />
|
||||
<DataTrigger Binding="{Binding ElementName=ResultListBox, Path=Visibility}"
|
||||
Value="Visible">
|
||||
<Setter Property="Visibility"
|
||||
Value="Visible" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding ElementName=ContextMenu, Path=Visibility}" Value="Visible">
|
||||
<Setter Property="Visibility" Value="Visible" />
|
||||
<DataTrigger Binding="{Binding ElementName=ContextMenu, Path=Visibility}"
|
||||
Value="Visible">
|
||||
<Setter Property="Visibility"
|
||||
Value="Visible" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding ElementName=History, Path=Visibility}" Value="Visible">
|
||||
<Setter Property="Visibility" Value="Visible" />
|
||||
<DataTrigger Binding="{Binding ElementName=History, Path=Visibility}"
|
||||
Value="Visible">
|
||||
<Setter Property="Visibility"
|
||||
Value="Visible" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</ContentControl.Style>
|
||||
<Rectangle
|
||||
Width="Auto"
|
||||
<Rectangle Width="Auto"
|
||||
HorizontalAlignment="Stretch"
|
||||
Style="{DynamicResource SeparatorStyle}" />
|
||||
</ContentControl>
|
||||
<Line
|
||||
x:Name="ProgressBar"
|
||||
<Line x:Name="ProgressBar"
|
||||
Width="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Grid}}, Path=ActualWidth}"
|
||||
Height="2"
|
||||
HorizontalAlignment="Right"
|
||||
|
|
@ -279,14 +289,16 @@
|
|||
<Border Style="{DynamicResource WindowRadius}">
|
||||
<Border.Clip>
|
||||
<MultiBinding Converter="{StaticResource BorderClipConverter}">
|
||||
<Binding Path="ActualWidth" RelativeSource="{RelativeSource Self}" />
|
||||
<Binding Path="ActualHeight" RelativeSource="{RelativeSource Self}" />
|
||||
<Binding Path="CornerRadius" RelativeSource="{RelativeSource Self}" />
|
||||
<Binding Path="ActualWidth"
|
||||
RelativeSource="{RelativeSource Self}" />
|
||||
<Binding Path="ActualHeight"
|
||||
RelativeSource="{RelativeSource Self}" />
|
||||
<Binding Path="CornerRadius"
|
||||
RelativeSource="{RelativeSource Self}" />
|
||||
</MultiBinding>
|
||||
</Border.Clip>
|
||||
<ContentControl>
|
||||
<flowlauncher:ResultListBox
|
||||
x:Name="ResultListBox"
|
||||
<flowlauncher:ResultListBox x:Name="ResultListBox"
|
||||
DataContext="{Binding Results}"
|
||||
PreviewMouseDown="OnPreviewMouseButtonDown" />
|
||||
</ContentControl>
|
||||
|
|
@ -294,14 +306,16 @@
|
|||
<Border Style="{DynamicResource WindowRadius}">
|
||||
<Border.Clip>
|
||||
<MultiBinding Converter="{StaticResource BorderClipConverter}">
|
||||
<Binding Path="ActualWidth" RelativeSource="{RelativeSource Self}" />
|
||||
<Binding Path="ActualHeight" RelativeSource="{RelativeSource Self}" />
|
||||
<Binding Path="CornerRadius" RelativeSource="{RelativeSource Self}" />
|
||||
<Binding Path="ActualWidth"
|
||||
RelativeSource="{RelativeSource Self}" />
|
||||
<Binding Path="ActualHeight"
|
||||
RelativeSource="{RelativeSource Self}" />
|
||||
<Binding Path="CornerRadius"
|
||||
RelativeSource="{RelativeSource Self}" />
|
||||
</MultiBinding>
|
||||
</Border.Clip>
|
||||
<ContentControl>
|
||||
<flowlauncher:ResultListBox
|
||||
x:Name="ContextMenu"
|
||||
<flowlauncher:ResultListBox x:Name="ContextMenu"
|
||||
DataContext="{Binding ContextMenu}"
|
||||
PreviewMouseDown="OnPreviewMouseButtonDown" />
|
||||
</ContentControl>
|
||||
|
|
@ -309,14 +323,16 @@
|
|||
<Border Style="{DynamicResource WindowRadius}">
|
||||
<Border.Clip>
|
||||
<MultiBinding Converter="{StaticResource BorderClipConverter}">
|
||||
<Binding Path="ActualWidth" RelativeSource="{RelativeSource Self}" />
|
||||
<Binding Path="ActualHeight" RelativeSource="{RelativeSource Self}" />
|
||||
<Binding Path="CornerRadius" RelativeSource="{RelativeSource Self}" />
|
||||
<Binding Path="ActualWidth"
|
||||
RelativeSource="{RelativeSource Self}" />
|
||||
<Binding Path="ActualHeight"
|
||||
RelativeSource="{RelativeSource Self}" />
|
||||
<Binding Path="CornerRadius"
|
||||
RelativeSource="{RelativeSource Self}" />
|
||||
</MultiBinding>
|
||||
</Border.Clip>
|
||||
<ContentControl>
|
||||
<flowlauncher:ResultListBox
|
||||
x:Name="History"
|
||||
<flowlauncher:ResultListBox x:Name="History"
|
||||
DataContext="{Binding History}"
|
||||
PreviewMouseDown="OnPreviewMouseButtonDown" />
|
||||
</ContentControl>
|
||||
|
|
@ -324,4 +340,4 @@
|
|||
</StackPanel>
|
||||
</Border>
|
||||
</Grid>
|
||||
</Window>
|
||||
</Window>
|
||||
|
|
@ -20,8 +20,8 @@ using Flow.Launcher.Infrastructure;
|
|||
using System.Windows.Media;
|
||||
using Flow.Launcher.Infrastructure.Hotkey;
|
||||
using Flow.Launcher.Plugin.SharedCommands;
|
||||
using System.Windows.Threading;
|
||||
using System.Windows.Data;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace Flow.Launcher
|
||||
{
|
||||
|
|
@ -45,7 +45,9 @@ namespace Flow.Launcher
|
|||
DataContext = mainVM;
|
||||
_viewModel = mainVM;
|
||||
_settings = settings;
|
||||
|
||||
InitializeComponent();
|
||||
InitializePosition();
|
||||
animationSound.Open(new Uri(AppDomain.CurrentDomain.BaseDirectory + "Resources\\open.wav"));
|
||||
}
|
||||
|
||||
|
|
@ -53,6 +55,7 @@ namespace Flow.Launcher
|
|||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void OnCopy(object sender, ExecutedRoutedEventArgs e)
|
||||
{
|
||||
if (QueryTextBox.SelectionLength == 0)
|
||||
|
|
@ -108,7 +111,6 @@ namespace Flow.Launcher
|
|||
animationSound.Position = TimeSpan.Zero;
|
||||
animationSound.Play();
|
||||
}
|
||||
|
||||
UpdatePosition();
|
||||
Activate();
|
||||
QueryTextBox.Focus();
|
||||
|
|
@ -161,6 +163,7 @@ namespace Flow.Launcher
|
|||
_viewModel.QueryTextCursorMovedToEnd = false;
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
};
|
||||
_settings.PropertyChanged += (o, e) =>
|
||||
|
|
@ -176,17 +179,51 @@ namespace Flow.Launcher
|
|||
case nameof(Settings.Hotkey):
|
||||
UpdateNotifyIconText();
|
||||
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()
|
||||
{
|
||||
var menu = contextMenu;
|
||||
((MenuItem)menu.Items[1]).Header = InternationalizationManager.Instance.GetTranslation("iconTrayOpen") + " (" + _settings.Hotkey + ")";
|
||||
((MenuItem)menu.Items[2]).Header = InternationalizationManager.Instance.GetTranslation("GameMode");
|
||||
((MenuItem)menu.Items[3]).Header = InternationalizationManager.Instance.GetTranslation("iconTraySettings");
|
||||
((MenuItem)menu.Items[4]).Header = InternationalizationManager.Instance.GetTranslation("iconTrayExit");
|
||||
((MenuItem)menu.Items[3]).Header = InternationalizationManager.Instance.GetTranslation("PositionReset");
|
||||
((MenuItem)menu.Items[4]).Header = InternationalizationManager.Instance.GetTranslation("iconTraySettings");
|
||||
((MenuItem)menu.Items[5]).Header = InternationalizationManager.Instance.GetTranslation("iconTrayExit");
|
||||
}
|
||||
|
||||
private void InitializeNotifyIcon()
|
||||
|
|
@ -212,6 +249,10 @@ namespace Flow.Launcher
|
|||
{
|
||||
Header = InternationalizationManager.Instance.GetTranslation("GameMode")
|
||||
};
|
||||
var positionreset = new MenuItem
|
||||
{
|
||||
Header = InternationalizationManager.Instance.GetTranslation("PositionReset")
|
||||
};
|
||||
var settings = new MenuItem
|
||||
{
|
||||
Header = InternationalizationManager.Instance.GetTranslation("iconTraySettings")
|
||||
|
|
@ -223,12 +264,15 @@ namespace Flow.Launcher
|
|||
|
||||
open.Click += (o, e) => _viewModel.ToggleFlowLauncher();
|
||||
gamemode.Click += (o, e) => ToggleGameMode();
|
||||
positionreset.Click += (o, e) => PositionReset();
|
||||
settings.Click += (o, e) => App.API.OpenSettingDialog();
|
||||
exit.Click += (o, e) => Close();
|
||||
contextMenu.Items.Add(header);
|
||||
contextMenu.Items.Add(open);
|
||||
gamemode.ToolTip = InternationalizationManager.Instance.GetTranslation("GameModeToolTip");
|
||||
positionreset.ToolTip = InternationalizationManager.Instance.GetTranslation("PositionResetToolTip");
|
||||
contextMenu.Items.Add(gamemode);
|
||||
contextMenu.Items.Add(positionreset);
|
||||
contextMenu.Items.Add(settings);
|
||||
contextMenu.Items.Add(exit);
|
||||
|
||||
|
|
@ -275,10 +319,17 @@ namespace Flow.Launcher
|
|||
_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()
|
||||
{
|
||||
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)));
|
||||
Storyboard.SetTargetProperty(da, new PropertyPath("(Line.X2)"));
|
||||
Storyboard.SetTargetProperty(da1, new PropertyPath("(Line.X1)"));
|
||||
|
|
@ -382,6 +433,8 @@ namespace Flow.Launcher
|
|||
|
||||
private async void OnDeactivated(object sender, EventArgs e)
|
||||
{
|
||||
_settings.WindowLeft = Left;
|
||||
_settings.WindowTop = Top;
|
||||
//This condition stops extra hide call when animator is on,
|
||||
// which causes the toggling to occasional hide instead of show.
|
||||
if (_viewModel.MainWindowVisibilityStatus)
|
||||
|
|
@ -403,24 +456,14 @@ namespace Flow.Launcher
|
|||
{
|
||||
if (_animating)
|
||||
return;
|
||||
|
||||
if (_settings.RememberLastLaunchLocation)
|
||||
{
|
||||
Left = _settings.WindowLeft;
|
||||
Top = _settings.WindowTop;
|
||||
}
|
||||
else
|
||||
{
|
||||
Left = WindowLeft();
|
||||
Top = WindowTop();
|
||||
}
|
||||
InitializePosition();
|
||||
}
|
||||
|
||||
private void OnLocationChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (_animating)
|
||||
return;
|
||||
if (_settings.RememberLastLaunchLocation)
|
||||
if (_settings.SearchWindowPosition == SearchWindowPositions.RememberLastLaunchLocation)
|
||||
{
|
||||
_settings.WindowLeft = Left;
|
||||
_settings.WindowTop = Top;
|
||||
|
|
@ -439,17 +482,8 @@ namespace Flow.Launcher
|
|||
_viewModel.Show();
|
||||
}
|
||||
}
|
||||
|
||||
private void InitializePosition()
|
||||
{
|
||||
if (!_settings.RememberLastLaunchLocation)
|
||||
{
|
||||
Left = WindowLeft();
|
||||
Top = WindowTop();
|
||||
}
|
||||
}
|
||||
|
||||
public double WindowLeft()
|
||||
public double HorizonCenter()
|
||||
{
|
||||
var screen = Screen.FromPoint(System.Windows.Forms.Cursor.Position);
|
||||
var dip1 = WindowsInteropHelper.TransformPixelsToDIP(this, screen.WorkingArea.X, 0);
|
||||
|
|
@ -458,7 +492,7 @@ namespace Flow.Launcher
|
|||
return left;
|
||||
}
|
||||
|
||||
public double WindowTop()
|
||||
public double VerticalCenter()
|
||||
{
|
||||
var screen = Screen.FromPoint(System.Windows.Forms.Cursor.Position);
|
||||
var dip1 = WindowsInteropHelper.TransformPixelsToDIP(this, 0, screen.WorkingArea.Y);
|
||||
|
|
@ -467,6 +501,15 @@ namespace Flow.Launcher
|
|||
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>
|
||||
/// Register up and down key
|
||||
/// todo: any way to put this in xaml ?
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@
|
|||
xmlns:flowlauncher="clr-namespace:Flow.Launcher"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:scm="clr-namespace:System.ComponentModel;assembly=WindowsBase"
|
||||
xmlns:svgc="http://sharpvectors.codeplex.com/svgc/"
|
||||
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||
xmlns:ui="http://schemas.modernwpf.com/2019"
|
||||
xmlns:userSettings="clr-namespace:Flow.Launcher.Infrastructure.UserSettings;assembly=Flow.Launcher.Infrastructure"
|
||||
|
|
@ -40,6 +39,8 @@
|
|||
|
||||
<Window.Resources>
|
||||
<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.SortDescriptions>
|
||||
<scm:SortDescription PropertyName="Source" />
|
||||
|
|
@ -685,12 +686,25 @@
|
|||
</ItemsControl>
|
||||
</Border>
|
||||
|
||||
<Border Style="{DynamicResource SettingGroupBox}">
|
||||
<Border Margin="0,30,0,0" Style="{DynamicResource SettingGroupBox}">
|
||||
<ItemsControl Style="{StaticResource SettingGrid}">
|
||||
<StackPanel Style="{StaticResource TextPanel}">
|
||||
<TextBlock Style="{DynamicResource SettingTitleLabel}" Text="{DynamicResource rememberLastLocation}" />
|
||||
<TextBlock Style="{DynamicResource SettingTitleLabel}" Text="{DynamicResource SearchWindowPosition}" />
|
||||
</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}">
|
||||

|
||||
</TextBlock>
|
||||
</ItemsControl>
|
||||
</Border>
|
||||
|
||||
|
|
@ -1317,7 +1331,7 @@
|
|||
FontSize="11"
|
||||
Foreground="{DynamicResource PluginInfoColor}"
|
||||
MouseUp="OnExternalPluginUninstallClick"
|
||||
Text="{DynamicResource plugin_uninstall}"
|
||||
Text="{DynamicResource uninstallbtn}"
|
||||
TextDecorations="Underline" />
|
||||
|
||||
<TextBlock
|
||||
|
|
@ -1464,6 +1478,32 @@
|
|||
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
||||
SelectionMode="Single"
|
||||
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>
|
||||
<ItemsPanelTemplate>
|
||||
<UniformGrid
|
||||
|
|
@ -1520,33 +1560,16 @@
|
|||
HorizontalAlignment="Right"
|
||||
Orientation="Horizontal">
|
||||
<Border
|
||||
x:Name="LabelNew"
|
||||
x:Name="LabelUpdate"
|
||||
Height="12"
|
||||
Margin="0,10,8,0"
|
||||
Padding="6,2,6,2"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Top"
|
||||
Background="#f14551"
|
||||
CornerRadius="4"
|
||||
Visibility="Collapsed">
|
||||
<TextBlock
|
||||
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>
|
||||
Background="#45BD59"
|
||||
CornerRadius="36"
|
||||
ToolTip="{DynamicResource LabelUpdateToolTip}"
|
||||
Visibility="{Binding LabelUpdate, Converter={StaticResource BoolToVisibilityConverter}}" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel
|
||||
|
|
@ -1605,7 +1628,7 @@
|
|||
<Run
|
||||
FontSize="12"
|
||||
Foreground="{DynamicResource Color04B}"
|
||||
Text="{Binding Description}" />
|
||||
Text="{Binding Description, Mode=OneWay}" />
|
||||
</TextBlock>
|
||||
|
||||
</StackPanel>
|
||||
|
|
@ -1667,25 +1690,45 @@
|
|||
Foreground="{DynamicResource Color04B}"
|
||||
NavigateUri="{Binding Website}"
|
||||
RequestNavigate="OnRequestNavigate">
|
||||
<Run FontSize="12" Text="{Binding Author}" />
|
||||
<Run FontSize="12" Text="{Binding Author, Mode=OneWay}" />
|
||||
</Hyperlink>
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
<Border
|
||||
Grid.Row="0"
|
||||
Grid.Column="1"
|
||||
Padding="0,0,0,0">
|
||||
<Button
|
||||
Name="ShortCutButtonPrev"
|
||||
MinHeight="40"
|
||||
<Grid Grid.Row="0" Grid.Column="1">
|
||||
<StackPanel
|
||||
Margin="0,70,20,0"
|
||||
Padding="15,5,15,5"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center"
|
||||
Click="OnExternalPluginInstallClick"
|
||||
Content="{DynamicResource install}" />
|
||||
</Border>
|
||||
Orientation="Horizontal">
|
||||
<Button
|
||||
MinHeight="40"
|
||||
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>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
|
@ -1766,8 +1809,11 @@
|
|||
IsReadOnly="True"
|
||||
Style="{DynamicResource QueryBoxStyle}"
|
||||
Text="{DynamicResource hiThere}" />
|
||||
|
||||
</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}">
|
||||
<Path
|
||||
Margin="0"
|
||||
|
|
@ -2090,7 +2136,88 @@
|
|||
<StackPanel>
|
||||
|
||||
<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}">
|
||||

|
||||
</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}">
|
||||

|
||||
</TextBlock>
|
||||
</ItemsControl>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<Border
|
||||
Margin="0,12,0,12"
|
||||
Padding="0"
|
||||
CornerRadius="5"
|
||||
Style="{DynamicResource SettingGroupBox}">
|
||||
|
|
|
|||
|
|
@ -1,31 +1,23 @@
|
|||
using Droplex;
|
||||
using Flow.Launcher.Core.ExternalPlugins;
|
||||
using Flow.Launcher.Core.Plugin;
|
||||
using Flow.Launcher.Core.Plugin;
|
||||
using Flow.Launcher.Core.Resource;
|
||||
using Flow.Launcher.Helper;
|
||||
using Flow.Launcher.Infrastructure;
|
||||
using Flow.Launcher.Infrastructure.Hotkey;
|
||||
using Flow.Launcher.Infrastructure.Logger;
|
||||
using Flow.Launcher.Infrastructure.UserSettings;
|
||||
using Flow.Launcher.Plugin;
|
||||
using Flow.Launcher.Plugin.SharedCommands;
|
||||
using Flow.Launcher.ViewModel;
|
||||
using Microsoft.Win32;
|
||||
using ModernWpf;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Forms;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Interop;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Navigation;
|
||||
using Button = System.Windows.Controls.Button;
|
||||
using Control = System.Windows.Controls.Control;
|
||||
using ListViewItem = System.Windows.Controls.ListViewItem;
|
||||
using KeyEventArgs = System.Windows.Input.KeyEventArgs;
|
||||
using MessageBox = System.Windows.MessageBox;
|
||||
using TextBox = System.Windows.Controls.TextBox;
|
||||
|
|
@ -47,6 +39,10 @@ namespace Flow.Launcher
|
|||
API = api;
|
||||
InitializePosition();
|
||||
InitializeComponent();
|
||||
|
||||
CollectionView view = (CollectionView)CollectionViewSource.GetDefaultView(StoreListBox.ItemsSource);
|
||||
PropertyGroupDescription groupDescription = new PropertyGroupDescription("Category");
|
||||
view.GroupDescriptions.Add(groupDescription);
|
||||
}
|
||||
|
||||
#region General
|
||||
|
|
@ -67,6 +63,7 @@ namespace Flow.Launcher
|
|||
pluginStoreView.Filter = PluginStoreFilter;
|
||||
|
||||
InitializePosition();
|
||||
ClockDisplay();
|
||||
}
|
||||
|
||||
private void OnSelectPythonDirectoryClick(object sender, RoutedEventArgs e)
|
||||
|
|
@ -306,15 +303,34 @@ namespace Flow.Launcher
|
|||
|
||||
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");
|
||||
var actionKeyword = pluginsManagerPlugin.Metadata.ActionKeywords.Count == 0 ? "" : pluginsManagerPlugin.Metadata.ActionKeywords[0];
|
||||
API.ChangeQuery($"{actionKeyword} install {plugin.Name}");
|
||||
API.ShowMainWindow();
|
||||
viewModel.DisplayPluginQuery($"install {plugin.Name}", PluginManager.GetPluginForId("9f8f9b14-2518-4907-b211-35ab6290dee7"));
|
||||
}
|
||||
}
|
||||
|
||||
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 */
|
||||
{
|
||||
if (Keyboard.FocusedElement is not TextBox textBox)
|
||||
|
|
@ -388,7 +404,7 @@ namespace Flow.Launcher
|
|||
{
|
||||
if (string.IsNullOrEmpty(pluginStoreFilterTxb.Text))
|
||||
return true;
|
||||
if (item is UserPlugin model)
|
||||
if (item is PluginStoreItemViewModel model)
|
||||
{
|
||||
return StringMatcher.FuzzySearch(pluginStoreFilterTxb.Text, model.Name).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()
|
||||
{
|
||||
if (settings.SettingWindowTop >= 0 && settings.SettingWindowLeft >= 0)
|
||||
|
|
@ -473,17 +516,6 @@ namespace Flow.Launcher
|
|||
var top = (dip2.Y - this.ActualHeight) / 2 + dip1.Y - 20;
|
||||
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();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,64 +1,100 @@
|
|||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
<ResourceDictionary
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/Themes/Base.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<Style x:Key="ItemGlyph" BasedOn="{StaticResource BaseGlyphStyle}" TargetType="{x:Type TextBlock}">
|
||||
<Style
|
||||
x:Key="ItemGlyph"
|
||||
BasedOn="{StaticResource BaseGlyphStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#9fb2bf" />
|
||||
</Style>
|
||||
<Style x:Key="QueryBoxStyle" BasedOn="{StaticResource BaseQueryBoxStyle}" TargetType="{x:Type TextBox}">
|
||||
<Setter Property="SelectionBrush" Value="#515a6b"/>
|
||||
<Style
|
||||
x:Key="QueryBoxStyle"
|
||||
BasedOn="{StaticResource BaseQueryBoxStyle}"
|
||||
TargetType="{x:Type TextBox}">
|
||||
<Setter Property="SelectionBrush" Value="#515a6b" />
|
||||
<Setter Property="FontSize" Value="24" />
|
||||
<Setter Property="Background" Value="#282c34" />
|
||||
<Setter Property="Foreground" Value="#61afef" />
|
||||
<Setter Property="CaretBrush" Value="#ffb86c" />
|
||||
<Setter Property="FontSize" Value="26" />
|
||||
<Setter Property="Padding" Value="0 4 66 0" />
|
||||
<Setter Property="Padding" Value="0,4,66,0" />
|
||||
<Setter Property="Height" Value="42" />
|
||||
</Style>
|
||||
<Style x:Key="QuerySuggestionBoxStyle" BasedOn="{StaticResource BaseQuerySuggestionBoxStyle}" TargetType="{x:Type TextBox}">
|
||||
<Style
|
||||
x:Key="QuerySuggestionBoxStyle"
|
||||
BasedOn="{StaticResource BaseQuerySuggestionBoxStyle}"
|
||||
TargetType="{x:Type TextBox}">
|
||||
<Setter Property="Background" Value="#282c34" />
|
||||
<Setter Property="Foreground" Value="#454e61" />
|
||||
<Setter Property="FontSize" Value="26" />
|
||||
<Setter Property="Padding" Value="0 4 66 0" />
|
||||
<Setter Property="Padding" Value="0,4,66,0" />
|
||||
<Setter Property="Height" Value="42" />
|
||||
</Style>
|
||||
<Style x:Key="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="BorderBrush" Value="#44475a" />
|
||||
<Setter Property="CornerRadius" Value="5" />
|
||||
<Setter Property="Background" Value="#282c34" />
|
||||
</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="RenderOptions.ClearTypeHint" Value="Enabled"/>
|
||||
<Setter Property="RenderOptions.ClearTypeHint" Value="Enabled" />
|
||||
</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 -->
|
||||
<Style x:Key="ItemTitleStyle" BasedOn="{StaticResource BaseItemTitleStyle}" TargetType="{x:Type TextBlock}">
|
||||
<!-- Item Style -->
|
||||
<Style
|
||||
x:Key="ItemTitleStyle"
|
||||
BasedOn="{StaticResource BaseItemTitleStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#9fb2bf" />
|
||||
</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="FontSize" Value="13" />
|
||||
</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" />
|
||||
</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="Foreground" Value="#e5c07b" />
|
||||
</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="Foreground" Value="#c678dd" />
|
||||
</Style>
|
||||
<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" />
|
||||
</Style>
|
||||
<Style x:Key="HighlightStyle">
|
||||
|
|
@ -68,36 +104,67 @@
|
|||
<Setter Property="FontSize" Value="13" />
|
||||
<Setter Property="Foreground" Value="#6272a4" />
|
||||
</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="Foreground" Value="#56b6c2" />
|
||||
</Style>
|
||||
<!-- button style in the middle of the scrollbar -->
|
||||
<Style x:Key="ThumbStyle" BasedOn="{StaticResource BaseThumbStyle}" TargetType="{x:Type Thumb}">
|
||||
<Setter Property="SnapsToDevicePixels" Value="True"/>
|
||||
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
||||
<Setter Property="IsTabStop" Value="false"/>
|
||||
<Setter Property="Width" Value="2"/>
|
||||
<Setter Property="Focusable" Value="false"/>
|
||||
<!-- button style in the middle of the scrollbar -->
|
||||
<Style
|
||||
x:Key="ThumbStyle"
|
||||
BasedOn="{StaticResource BaseThumbStyle}"
|
||||
TargetType="{x:Type Thumb}">
|
||||
<Setter Property="SnapsToDevicePixels" Value="True" />
|
||||
<Setter Property="OverridesDefaultStyle" Value="true" />
|
||||
<Setter Property="IsTabStop" Value="false" />
|
||||
<Setter Property="Width" Value="2" />
|
||||
<Setter Property="Focusable" Value="false" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Thumb}">
|
||||
<Border CornerRadius="2" DockPanel.Dock="Right" Background="#b4b5b7" BorderBrush="Transparent" BorderThickness="0" />
|
||||
<Border
|
||||
Background="#b4b5b7"
|
||||
BorderBrush="Transparent"
|
||||
BorderThickness="0"
|
||||
CornerRadius="2"
|
||||
DockPanel.Dock="Right" />
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style x:Key="ScrollBarStyle" BasedOn="{StaticResource BaseScrollBarStyle}" TargetType="{x:Type ScrollBar}">
|
||||
<Style
|
||||
x:Key="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 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 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="#495162" />
|
||||
<Setter Property="Width" Value="32" />
|
||||
<Setter Property="Height" Value="32" />
|
||||
<Setter Property="Opacity" Value="0.8" />
|
||||
</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>
|
||||
|
|
|
|||
|
|
@ -79,6 +79,83 @@
|
|||
<Setter Property="Stroke" Value="Blue" />
|
||||
</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 -->
|
||||
<Style x:Key="ProgressBarResult" TargetType="{x:Type ProgressBar}">
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
</ResourceDictionary.MergedDictionaries>
|
||||
|
||||
<system:Boolean x:Key="ThemeBlurEnabled">True</system:Boolean>
|
||||
|
||||
<Style x:Key="WindowRadius" TargetType="{x:Type Border}">
|
||||
<Setter Property="CornerRadius" Value="0" />
|
||||
</Style>
|
||||
|
|
@ -36,6 +37,7 @@
|
|||
x:Key="WindowBorderStyle"
|
||||
BasedOn="{StaticResource BaseWindowBorderStyle}"
|
||||
TargetType="{x:Type Border}">
|
||||
|
||||
<Setter Property="BorderThickness" Value="1" />
|
||||
<Setter Property="BorderBrush" Value="#444444" />
|
||||
<Setter Property="CornerRadius" Value="0" />
|
||||
|
|
@ -140,4 +142,18 @@
|
|||
<Setter Property="Foreground" Value="#ffffff" />
|
||||
<Setter Property="Opacity" Value="0.2" />
|
||||
</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>
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@
|
|||
TargetType="{x:Type Window}">
|
||||
<Setter Property="Background">
|
||||
<Setter.Value>
|
||||
<SolidColorBrush Opacity="0.5" />
|
||||
<SolidColorBrush Opacity="0.5" Color="White" />
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
|
@ -143,4 +143,18 @@
|
|||
<Setter Property="Foreground" Value="#000000" />
|
||||
<Setter Property="Opacity" Value="0.2" />
|
||||
</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>
|
||||
|
|
|
|||
|
|
@ -1,84 +1,131 @@
|
|||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
<ResourceDictionary
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/Themes/Base.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
|
||||
<Style x:Key="ItemGlyph" BasedOn="{StaticResource BaseGlyphStyle}" TargetType="{x:Type TextBlock}">
|
||||
<Style
|
||||
x:Key="ItemGlyph"
|
||||
BasedOn="{StaticResource BaseGlyphStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#ebebeb" />
|
||||
</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="Background" Value="Transparent" />
|
||||
</Style>
|
||||
|
||||
<Style x:Key="QuerySuggestionBoxStyle" BasedOn="{StaticResource BaseQuerySuggestionBoxStyle}" TargetType="{x:Type TextBox}">
|
||||
<Setter Property="Foreground" Value="Transparent" />
|
||||
<Style
|
||||
x:Key="QuerySuggestionBoxStyle"
|
||||
BasedOn="{StaticResource BaseQuerySuggestionBoxStyle}"
|
||||
TargetType="{x:Type TextBox}">
|
||||
<Setter Property="Foreground" Value="Transparent" />
|
||||
</Style>
|
||||
|
||||
<Style x:Key="WindowBorderStyle" BasedOn="{StaticResource BaseWindowBorderStyle}" TargetType="{x:Type Border}">
|
||||
<Setter Property="CornerRadius" Value="5" />
|
||||
<Setter Property="BorderThickness" Value="1 1 0 0" />
|
||||
<Style
|
||||
x:Key="WindowBorderStyle"
|
||||
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="Background">
|
||||
<Setter.Value>
|
||||
<SolidColorBrush Color="#333333" Opacity="0.95"/>
|
||||
<SolidColorBrush Opacity="0.95" Color="#333333" />
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</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.Value>
|
||||
<SolidColorBrush Color="White" Opacity="0.5"/>
|
||||
<SolidColorBrush Opacity="0.5" Color="White" />
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</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 -->
|
||||
<Style x:Key="ItemTitleStyle" BasedOn="{StaticResource BaseItemTitleStyle}" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Margin" Value="0, -10"/>
|
||||
<Setter Property="Foreground" Value="#ebebeb"/>
|
||||
<!-- Item Style -->
|
||||
<Style
|
||||
x:Key="ItemTitleStyle"
|
||||
BasedOn="{StaticResource BaseItemTitleStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Margin" Value="0,-10" />
|
||||
<Setter Property="Foreground" Value="#ebebeb" />
|
||||
</Style>
|
||||
<Style x:Key="ItemSubTitleStyle" BasedOn="{StaticResource BaseItemSubTitleStyle}" TargetType="{x:Type TextBlock}" >
|
||||
<Setter Property="Foreground" Value="#787878"/>
|
||||
<Style
|
||||
x:Key="ItemSubTitleStyle"
|
||||
BasedOn="{StaticResource BaseItemSubTitleStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#787878" />
|
||||
</Style>
|
||||
<Style x:Key="ItemTitleSelectedStyle" BasedOn="{StaticResource BaseItemTitleSelectedStyle}" TargetType="{x:Type TextBlock}" >
|
||||
<Setter Property="Margin" Value="0, -10"/>
|
||||
<Setter Property="Foreground" Value="#ffffff"/>
|
||||
<Style
|
||||
x:Key="ItemTitleSelectedStyle"
|
||||
BasedOn="{StaticResource BaseItemTitleSelectedStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Margin" Value="0,-10" />
|
||||
<Setter Property="Foreground" Value="#ffffff" />
|
||||
</Style>
|
||||
<Style x:Key="ItemSubTitleSelectedStyle" BasedOn="{StaticResource BaseItemSubTitleSelectedStyle}" TargetType="{x:Type TextBlock}" >
|
||||
<Setter Property="Foreground" Value="#949494"/>
|
||||
<Style
|
||||
x:Key="ItemSubTitleSelectedStyle"
|
||||
BasedOn="{StaticResource BaseItemSubTitleSelectedStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#949494" />
|
||||
</Style>
|
||||
<SolidColorBrush x:Key="ItemSelectedBackgroundColor">#545454</SolidColorBrush>
|
||||
|
||||
<!-- button style in the middle of the scrollbar -->
|
||||
<Style x:Key="ThumbStyle" BasedOn="{StaticResource BaseThumbStyle}" TargetType="{x:Type Thumb}">
|
||||
<!-- button style in the middle of the scrollbar -->
|
||||
<Style
|
||||
x:Key="ThumbStyle"
|
||||
BasedOn="{StaticResource BaseThumbStyle}"
|
||||
TargetType="{x:Type Thumb}">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Thumb}">
|
||||
<Border CornerRadius="2" DockPanel.Dock="Right" Background="#525252" BorderBrush="Transparent" BorderThickness="0" />
|
||||
<Border
|
||||
Background="#525252"
|
||||
BorderBrush="Transparent"
|
||||
BorderThickness="0"
|
||||
CornerRadius="2"
|
||||
DockPanel.Dock="Right" />
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style x:Key="ScrollBarStyle" BasedOn="{StaticResource BaseScrollBarStyle}" TargetType="{x:Type ScrollBar}">
|
||||
<Setter Property="Background" Value="#a0a0a0"/>
|
||||
<Style
|
||||
x:Key="ScrollBarStyle"
|
||||
BasedOn="{StaticResource BaseScrollBarStyle}"
|
||||
TargetType="{x:Type ScrollBar}">
|
||||
<Setter Property="Background" Value="#a0a0a0" />
|
||||
</Style>
|
||||
<Style x:Key="SearchIconStyle" TargetType="{x:Type Path}" BasedOn="{StaticResource BaseSearchIconStyle}">
|
||||
<Style
|
||||
x:Key="SearchIconStyle"
|
||||
BasedOn="{StaticResource BaseSearchIconStyle}"
|
||||
TargetType="{x:Type Path}">
|
||||
<Setter Property="Fill" Value="#FFFFFF" />
|
||||
<Setter Property="Width" Value="32" />
|
||||
<Setter Property="Height" Value="32" />
|
||||
<Setter Property="Opacity" Value="0.2" />
|
||||
</Style>
|
||||
<Style x:Key="SeparatorStyle" BasedOn="{StaticResource BaseSeparatorStyle}" TargetType="{x:Type Rectangle}">
|
||||
<Setter Property="Fill" Value="#787878"/>
|
||||
<Setter Property="Height" Value="1"/>
|
||||
<Setter Property="Margin" Value="0 0 0 8"/>
|
||||
<Style
|
||||
x:Key="SeparatorStyle"
|
||||
BasedOn="{StaticResource BaseSeparatorStyle}"
|
||||
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" />
|
||||
</Style>
|
||||
<Style x:Key="ItemHotkeyStyle" TargetType="{x:Type TextBlock}">
|
||||
|
|
@ -91,5 +138,16 @@
|
|||
<Setter Property="Foreground" Value="#787878" />
|
||||
<Setter Property="Opacity" Value="0.1" />
|
||||
</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>
|
||||
|
|
|
|||
|
|
@ -1,51 +1,97 @@
|
|||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
<ResourceDictionary
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/Themes/Base.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<Style x:Key="ItemGlyph" BasedOn="{StaticResource BaseGlyphStyle}" TargetType="{x:Type TextBlock}">
|
||||
<Style
|
||||
x:Key="ItemGlyph"
|
||||
BasedOn="{StaticResource BaseGlyphStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#ffffff" />
|
||||
</Style>
|
||||
<Style x:Key="QueryBoxStyle" BasedOn="{StaticResource BaseQueryBoxStyle}" TargetType="{x:Type TextBox}">
|
||||
<Setter Property="SelectionBrush" Value="#6e6e6e"/>
|
||||
<Setter Property="SelectionBrush" Value="#4D4D4D"/>
|
||||
<Style
|
||||
x:Key="QueryBoxStyle"
|
||||
BasedOn="{StaticResource BaseQueryBoxStyle}"
|
||||
TargetType="{x:Type TextBox}">
|
||||
<Setter Property="SelectionBrush" Value="#6e6e6e" />
|
||||
<Setter Property="SelectionBrush" Value="#4D4D4D" />
|
||||
</Style>
|
||||
|
||||
<Style x:Key="QuerySuggestionBoxStyle" BasedOn="{StaticResource BaseQuerySuggestionBoxStyle}" TargetType="{x:Type TextBox}">
|
||||
<Style
|
||||
x:Key="QuerySuggestionBoxStyle"
|
||||
BasedOn="{StaticResource BaseQuerySuggestionBoxStyle}"
|
||||
TargetType="{x:Type TextBox}">
|
||||
<Setter Property="Foreground" Value="#8f8f8f" />
|
||||
</Style>
|
||||
<Style x:Key="WindowBorderStyle" BasedOn="{StaticResource BaseWindowBorderStyle}" TargetType="{x:Type Border}">
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="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 -->
|
||||
<Style x:Key="ItemTitleStyle" BasedOn="{StaticResource BaseItemTitleStyle}" TargetType="{x:Type TextBlock}">
|
||||
</Style>
|
||||
<Style x:Key="ItemSubTitleStyle" BasedOn="{StaticResource BaseItemSubTitleStyle}" TargetType="{x:Type TextBlock}" >
|
||||
<!-- Item Style -->
|
||||
<Style
|
||||
x:Key="ItemTitleStyle"
|
||||
BasedOn="{StaticResource BaseItemTitleStyle}"
|
||||
TargetType="{x:Type TextBlock}" />
|
||||
<Style
|
||||
x:Key="ItemSubTitleStyle"
|
||||
BasedOn="{StaticResource BaseItemSubTitleStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#8f8f8f" />
|
||||
</Style>
|
||||
<Style x:Key="ItemTitleSelectedStyle" BasedOn="{StaticResource BaseItemTitleSelectedStyle}" TargetType="{x:Type TextBlock}" >
|
||||
<Style
|
||||
x:Key="ItemTitleSelectedStyle"
|
||||
BasedOn="{StaticResource BaseItemTitleSelectedStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Cursor" Value="Arrow" />
|
||||
</Style>
|
||||
<Style x:Key="ItemSubTitleSelectedStyle" BasedOn="{StaticResource BaseItemSubTitleSelectedStyle}" TargetType="{x:Type TextBlock}" >
|
||||
<Style
|
||||
x:Key="ItemSubTitleSelectedStyle"
|
||||
BasedOn="{StaticResource BaseItemSubTitleSelectedStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#8f8f8f" />
|
||||
<Setter Property="Cursor" Value="Arrow" />
|
||||
</Style>
|
||||
<SolidColorBrush x:Key="ItemSelectedBackgroundColor">#4d4d4d</SolidColorBrush>
|
||||
<Style x:Key="ItemImageSelectedStyle" BasedOn="{StaticResource BaseItemImageSelectedStyle}" TargetType="{x:Type Image}" >
|
||||
<Style
|
||||
x:Key="ItemImageSelectedStyle"
|
||||
BasedOn="{StaticResource BaseItemImageSelectedStyle}"
|
||||
TargetType="{x:Type Image}">
|
||||
<Setter Property="Cursor" Value="Arrow" />
|
||||
</Style>
|
||||
|
||||
<!-- button style in the middle of the scrollbar -->
|
||||
<Style x:Key="ThumbStyle" BasedOn="{StaticResource BaseThumbStyle}" TargetType="{x:Type Thumb}">
|
||||
</Style>
|
||||
<!-- button style in the middle of the scrollbar -->
|
||||
<Style
|
||||
x:Key="ThumbStyle"
|
||||
BasedOn="{StaticResource BaseThumbStyle}"
|
||||
TargetType="{x:Type Thumb}" />
|
||||
|
||||
<Style x:Key="ScrollBarStyle" BasedOn="{StaticResource BaseScrollBarStyle}" TargetType="{x:Type ScrollBar}">
|
||||
<Style
|
||||
x:Key="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>
|
||||
</ResourceDictionary>
|
||||
|
|
|
|||
|
|
@ -1,64 +1,101 @@
|
|||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
<ResourceDictionary
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/Themes/Base.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<Style x:Key="ItemGlyph" BasedOn="{StaticResource BaseGlyphStyle}" TargetType="{x:Type TextBlock}">
|
||||
<Style
|
||||
x:Key="ItemGlyph"
|
||||
BasedOn="{StaticResource BaseGlyphStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#ffffff" />
|
||||
</Style>
|
||||
<Style x:Key="QueryBoxStyle" BasedOn="{StaticResource BaseQueryBoxStyle}" TargetType="{x:Type TextBox}">
|
||||
<Style
|
||||
x:Key="QueryBoxStyle"
|
||||
BasedOn="{StaticResource BaseQueryBoxStyle}"
|
||||
TargetType="{x:Type TextBox}">
|
||||
<Setter Property="Foreground" Value="#dcddde" />
|
||||
<Setter Property="Background" Value="#36393f" />
|
||||
<Setter Property="CaretBrush" Value="#ffffff" />
|
||||
<Setter Property="SelectionBrush" Value="#0a68d8"/>
|
||||
<Setter Property="SelectionBrush" Value="#0a68d8" />
|
||||
<Setter Property="Height" Value="42" />
|
||||
<Setter Property="FontSize" Value="24" />
|
||||
<Setter Property="Padding" Value="0 0 66 0" />
|
||||
<Setter Property="Padding" Value="0,0,66,0" />
|
||||
</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="Background" Value="#36393f" />
|
||||
<Setter Property="Height" Value="42" />
|
||||
<Setter Property="FontSize" Value="24" />
|
||||
<Setter Property="Padding" Value="0 0 66 0" />
|
||||
<Setter Property="Padding" Value="0,0,66,0" />
|
||||
</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="BorderBrush" Value="#2f3136" />
|
||||
<Setter Property="CornerRadius" Value="4" />
|
||||
<Setter Property="Background" Value="#36393f" />
|
||||
</Style>
|
||||
<Style x:Key="WindowStyle" BasedOn="{StaticResource BaseWindowStyle}" TargetType="{x:Type Window}">
|
||||
<Style
|
||||
x:Key="WindowStyle"
|
||||
BasedOn="{StaticResource BaseWindowStyle}"
|
||||
TargetType="{x:Type Window}">
|
||||
<Setter Property="Width" Value="576" />
|
||||
<Setter Property="RenderOptions.ClearTypeHint" Value="Enabled"/>
|
||||
<Setter Property="RenderOptions.ClearTypeHint" Value="Enabled" />
|
||||
</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="Opacity" Value="0.6" />
|
||||
</Style>
|
||||
|
||||
<!-- Item Style -->
|
||||
<Style x:Key="ItemTitleStyle" BasedOn="{StaticResource BaseItemTitleStyle}" TargetType="{x:Type TextBlock}">
|
||||
<!-- Item Style -->
|
||||
<Style
|
||||
x:Key="ItemTitleStyle"
|
||||
BasedOn="{StaticResource BaseItemTitleStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#dcddde" />
|
||||
</Style>
|
||||
<Style x:Key="ItemSubTitleStyle" BasedOn="{StaticResource BaseItemSubTitleStyle}" TargetType="{x:Type TextBlock}" >
|
||||
<Style
|
||||
x:Key="ItemSubTitleStyle"
|
||||
BasedOn="{StaticResource BaseItemSubTitleStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#72767d" />
|
||||
<Setter Property="FontSize" Value="13" />
|
||||
</Style>
|
||||
<Style x:Key="ItemNumberStyle" BasedOn="{StaticResource BaseItemNumberStyle}" TargetType="{x:Type TextBlock}">
|
||||
<Style
|
||||
x:Key="ItemNumberStyle"
|
||||
BasedOn="{StaticResource BaseItemNumberStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#A6A6A6" />
|
||||
</Style>
|
||||
<Style x:Key="ItemTitleSelectedStyle" BasedOn="{StaticResource BaseItemTitleSelectedStyle}" TargetType="{x:Type TextBlock}" >
|
||||
<Style
|
||||
x:Key="ItemTitleSelectedStyle"
|
||||
BasedOn="{StaticResource BaseItemTitleSelectedStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Cursor" Value="Arrow" />
|
||||
<Setter Property="Foreground" Value="#32bd6a" />
|
||||
</Style>
|
||||
<Style x:Key="ItemSubTitleSelectedStyle" BasedOn="{StaticResource BaseItemSubTitleSelectedStyle}" TargetType="{x:Type TextBlock}" >
|
||||
<Style
|
||||
x:Key="ItemSubTitleSelectedStyle"
|
||||
BasedOn="{StaticResource BaseItemSubTitleSelectedStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Cursor" Value="Arrow" />
|
||||
<Setter Property="Foreground" Value="#72767d" />
|
||||
</Style>
|
||||
<SolidColorBrush x:Key="ItemSelectedBackgroundColor">#49443c</SolidColorBrush>
|
||||
<Style x:Key="ItemImageSelectedStyle" BasedOn="{StaticResource BaseItemImageSelectedStyle}" TargetType="{x:Type Image}" >
|
||||
<Style
|
||||
x:Key="ItemImageSelectedStyle"
|
||||
BasedOn="{StaticResource BaseItemImageSelectedStyle}"
|
||||
TargetType="{x:Type Image}">
|
||||
<Setter Property="Cursor" Value="Arrow" />
|
||||
</Style>
|
||||
<Style x:Key="HighlightStyle">
|
||||
|
|
@ -74,30 +111,58 @@
|
|||
<Setter Property="Foreground" Value="#72767d" />
|
||||
<Setter Property="Opacity" Value="0.8" />
|
||||
</Style>
|
||||
<!-- button style in the middle of the scrollbar -->
|
||||
<Style x:Key="ThumbStyle" BasedOn="{StaticResource BaseThumbStyle}" TargetType="{x:Type Thumb}">
|
||||
<Setter Property="SnapsToDevicePixels" Value="True"/>
|
||||
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
||||
<Setter Property="IsTabStop" Value="false"/>
|
||||
<Setter Property="Focusable" Value="false"/>
|
||||
<!-- button style in the middle of the scrollbar -->
|
||||
<Style
|
||||
x:Key="ThumbStyle"
|
||||
BasedOn="{StaticResource BaseThumbStyle}"
|
||||
TargetType="{x:Type Thumb}">
|
||||
<Setter Property="SnapsToDevicePixels" Value="True" />
|
||||
<Setter Property="OverridesDefaultStyle" Value="true" />
|
||||
<Setter Property="IsTabStop" Value="false" />
|
||||
<Setter Property="Focusable" Value="false" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Thumb}">
|
||||
<Border CornerRadius="2" DockPanel.Dock="Right" Background="#202225" BorderBrush="Transparent" BorderThickness="0" />
|
||||
<Border
|
||||
Background="#202225"
|
||||
BorderBrush="Transparent"
|
||||
BorderThickness="0"
|
||||
CornerRadius="2"
|
||||
DockPanel.Dock="Right" />
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style x:Key="ScrollBarStyle" BasedOn="{StaticResource BaseScrollBarStyle}" TargetType="{x:Type ScrollBar}">
|
||||
<Style
|
||||
x:Key="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 x:Key="SeparatorStyle" BasedOn="{StaticResource BaseSeparatorStyle}" TargetType="{x:Type Rectangle}">
|
||||
<Setter Property="Fill" Value="#42454a"/>
|
||||
<Setter Property="Height" Value="1"/>
|
||||
<Setter Property="Margin" Value="12 0 12 8"/>
|
||||
</Style>
|
||||
<Style x:Key="SearchIconStyle" TargetType="{x:Type Path}" BasedOn="{StaticResource BaseSearchIconStyle}">
|
||||
<Style
|
||||
x:Key="SearchIconStyle"
|
||||
BasedOn="{StaticResource BaseSearchIconStyle}"
|
||||
TargetType="{x:Type Path}">
|
||||
<Setter Property="Fill" Value="#42454a" />
|
||||
<Setter Property="Width" Value="32" />
|
||||
<Setter Property="Height" Value="32" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="ClockBox"
|
||||
BasedOn="{StaticResource BaseClockBox}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#72767d" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="DateBox"
|
||||
BasedOn="{StaticResource BaseDateBox}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#72767d" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
|
|
|
|||
|
|
@ -1,64 +1,100 @@
|
|||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
<ResourceDictionary
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/Themes/Base.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<Style x:Key="ItemGlyph" BasedOn="{StaticResource BaseGlyphStyle}" TargetType="{x:Type TextBlock}">
|
||||
<Style
|
||||
x:Key="ItemGlyph"
|
||||
BasedOn="{StaticResource BaseGlyphStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#f8f8f2" />
|
||||
</Style>
|
||||
<Style x:Key="QueryBoxStyle" BasedOn="{StaticResource BaseQueryBoxStyle}" TargetType="{x:Type TextBox}">
|
||||
<Setter Property="SelectionBrush" Value="#ff79c6"/>
|
||||
<Style
|
||||
x:Key="QueryBoxStyle"
|
||||
BasedOn="{StaticResource BaseQueryBoxStyle}"
|
||||
TargetType="{x:Type TextBox}">
|
||||
<Setter Property="SelectionBrush" Value="#ff79c6" />
|
||||
<Setter Property="FontSize" Value="24" />
|
||||
<Setter Property="Background" Value="#282a36" />
|
||||
<Setter Property="Foreground" Value="#f8f8f2" />
|
||||
<Setter Property="CaretBrush" Value="#ffb86c" />
|
||||
<Setter Property="FontSize" Value="26" />
|
||||
<Setter Property="Padding" Value="0 4 66 0" />
|
||||
<Setter Property="Padding" Value="0,4,66,0" />
|
||||
<Setter Property="Height" Value="42" />
|
||||
</Style>
|
||||
<Style x:Key="QuerySuggestionBoxStyle" BasedOn="{StaticResource BaseQuerySuggestionBoxStyle}" TargetType="{x:Type TextBox}">
|
||||
<Style
|
||||
x:Key="QuerySuggestionBoxStyle"
|
||||
BasedOn="{StaticResource BaseQuerySuggestionBoxStyle}"
|
||||
TargetType="{x:Type TextBox}">
|
||||
<Setter Property="Background" Value="#282a36" />
|
||||
<Setter Property="Foreground" Value="#6272a4" />
|
||||
<Setter Property="FontSize" Value="26" />
|
||||
<Setter Property="Padding" Value="0 4 66 0" />
|
||||
<Setter Property="Padding" Value="0,4,66,0" />
|
||||
<Setter Property="Height" Value="42" />
|
||||
</Style>
|
||||
<Style x:Key="WindowBorderStyle" BasedOn="{StaticResource BaseWindowBorderStyle}" TargetType="{x:Type Border}">
|
||||
<Style
|
||||
x:Key="WindowBorderStyle"
|
||||
BasedOn="{StaticResource BaseWindowBorderStyle}"
|
||||
TargetType="{x:Type Border}">
|
||||
<Setter Property="BorderThickness" Value="2" />
|
||||
<Setter Property="BorderBrush" Value="#44475a" />
|
||||
<Setter Property="CornerRadius" Value="5" />
|
||||
<Setter Property="Background" Value="#282a36" />
|
||||
</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="RenderOptions.ClearTypeHint" Value="Enabled"/>
|
||||
<Setter Property="RenderOptions.ClearTypeHint" Value="Enabled" />
|
||||
</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 -->
|
||||
<Style x:Key="ItemTitleStyle" BasedOn="{StaticResource BaseItemTitleStyle}" TargetType="{x:Type TextBlock}">
|
||||
<!-- Item Style -->
|
||||
<Style
|
||||
x:Key="ItemTitleStyle"
|
||||
BasedOn="{StaticResource BaseItemTitleStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#f8f8f2" />
|
||||
</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="FontSize" Value="13" />
|
||||
</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" />
|
||||
</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="Foreground" Value="#ff79c6" />
|
||||
</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="Foreground" Value="#6272a4" />
|
||||
</Style>
|
||||
<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" />
|
||||
</Style>
|
||||
<Style x:Key="HighlightStyle">
|
||||
|
|
@ -68,36 +104,67 @@
|
|||
<Setter Property="FontSize" Value="13" />
|
||||
<Setter Property="Foreground" Value="#6272a4" />
|
||||
</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="Foreground" Value="#ff79c6" />
|
||||
</Style>
|
||||
<!-- button style in the middle of the scrollbar -->
|
||||
<Style x:Key="ThumbStyle" BasedOn="{StaticResource BaseThumbStyle}" TargetType="{x:Type Thumb}">
|
||||
<Setter Property="SnapsToDevicePixels" Value="True"/>
|
||||
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
||||
<Setter Property="IsTabStop" Value="false"/>
|
||||
<Setter Property="Width" Value="2"/>
|
||||
<Setter Property="Focusable" Value="false"/>
|
||||
<!-- button style in the middle of the scrollbar -->
|
||||
<Style
|
||||
x:Key="ThumbStyle"
|
||||
BasedOn="{StaticResource BaseThumbStyle}"
|
||||
TargetType="{x:Type Thumb}">
|
||||
<Setter Property="SnapsToDevicePixels" Value="True" />
|
||||
<Setter Property="OverridesDefaultStyle" Value="true" />
|
||||
<Setter Property="IsTabStop" Value="false" />
|
||||
<Setter Property="Width" Value="2" />
|
||||
<Setter Property="Focusable" Value="false" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Thumb}">
|
||||
<Border CornerRadius="2" DockPanel.Dock="Right" Background="#44475a" BorderBrush="Transparent" BorderThickness="0" />
|
||||
<Border
|
||||
Background="#44475a"
|
||||
BorderBrush="Transparent"
|
||||
BorderThickness="0"
|
||||
CornerRadius="2"
|
||||
DockPanel.Dock="Right" />
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style x:Key="ScrollBarStyle" BasedOn="{StaticResource BaseScrollBarStyle}" TargetType="{x:Type ScrollBar}">
|
||||
<Style
|
||||
x:Key="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 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 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="#6272a4" />
|
||||
<Setter Property="Width" Value="32" />
|
||||
<Setter Property="Height" Value="32" />
|
||||
<Setter Property="Opacity" Value="0.8" />
|
||||
</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>
|
||||
|
|
|
|||
|
|
@ -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.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/Themes/Base.xaml" />
|
||||
</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="Foreground" Value="#222222" />
|
||||
</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" />
|
||||
</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="Foreground" Value="#b8b8b8" />
|
||||
</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="BorderThickness" Value="2" />
|
||||
<Setter Property="Background" Value="LightGray"></Setter>
|
||||
<Setter Property="Background" Value="LightGray" />
|
||||
</Style>
|
||||
<Style x:Key="WindowStyle" TargetType="{x:Type Window}" BasedOn="{StaticResource BaseWindowStyle}" >
|
||||
</Style>
|
||||
<Style x:Key="PendingLineStyle" BasedOn="{StaticResource BasePendingLineStyle}" TargetType="{x:Type Line}" />
|
||||
<Style x:Key="ItemTitleStyle" BasedOn="{StaticResource BaseItemTitleStyle}" TargetType="{x:Type TextBlock}">
|
||||
<Style
|
||||
x:Key="WindowStyle"
|
||||
BasedOn="{StaticResource BaseWindowStyle}"
|
||||
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="FontWeight" Value="Bold" />
|
||||
</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" />
|
||||
</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="FontSize" Value="13" />
|
||||
</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" />
|
||||
</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="FontSize" Value="13" />
|
||||
</Style>
|
||||
<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.Value>
|
||||
<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>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ScrollBarStyle" BasedOn="{StaticResource BaseScrollBarStyle}" TargetType="{x:Type ScrollBar}" >
|
||||
<Setter Property="Width" Value="3"/>
|
||||
<Style
|
||||
x:Key="ScrollBarStyle"
|
||||
BasedOn="{StaticResource BaseScrollBarStyle}"
|
||||
TargetType="{x:Type ScrollBar}">
|
||||
<Setter Property="Width" Value="3" />
|
||||
</Style>
|
||||
<Style x:Key="SearchIconStyle" TargetType="{x:Type Path}" BasedOn="{StaticResource BaseSearchIconStyle}">
|
||||
<Style
|
||||
x:Key="SearchIconStyle"
|
||||
BasedOn="{StaticResource BaseSearchIconStyle}"
|
||||
TargetType="{x:Type Path}">
|
||||
<Setter Property="Fill" Value="#a4a4a4" />
|
||||
<Setter Property="Width" Value="32" />
|
||||
<Setter Property="Height" Value="32" />
|
||||
|
|
@ -67,5 +113,17 @@
|
|||
<Style x:Key="ItemHotkeySelectedStyle" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="FontSize" Value="15" />
|
||||
<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>
|
||||
|
|
|
|||
|
|
@ -118,5 +118,16 @@
|
|||
<Setter Property="Width" Value="32" />
|
||||
<Setter Property="Height" Value="32" />
|
||||
</Style>
|
||||
|
||||
<Style
|
||||
x:Key="ClockBox"
|
||||
BasedOn="{StaticResource BaseClockBox}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#4bb44b" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="DateBox"
|
||||
BasedOn="{StaticResource BaseDateBox}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#4bb44b" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
|
|
@ -1,48 +1,83 @@
|
|||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/Themes/Base.xaml"></ResourceDictionary>
|
||||
<ResourceDictionary Source="pack://application:,,,/Themes/Base.xaml" />
|
||||
</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" />
|
||||
</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="Background" Value="#001e4e"/>
|
||||
<Setter Property="Padding" Value="0 0 18 0" />
|
||||
<Setter Property="Background" Value="#001e4e" />
|
||||
<Setter Property="Padding" Value="0,0,18,0" />
|
||||
</Style>
|
||||
<Style x:Key="QuerySuggestionBoxStyle" BasedOn="{StaticResource BaseQuerySuggestionBoxStyle}" TargetType="{x:Type TextBox}">
|
||||
<Style
|
||||
x:Key="QuerySuggestionBoxStyle"
|
||||
BasedOn="{StaticResource BaseQuerySuggestionBoxStyle}"
|
||||
TargetType="{x:Type TextBox}">
|
||||
<Setter Property="Foreground" Value="#344c71" />
|
||||
<Setter Property="Background" Value="#001e4e" />
|
||||
<Setter Property="Padding" Value="0 0 18 0" />
|
||||
<Setter Property="Padding" Value="0,0,18,0" />
|
||||
</Style>
|
||||
|
||||
<Style x:Key="WindowBorderStyle" BasedOn="{StaticResource BaseWindowBorderStyle}" TargetType="{x:Type Border}">
|
||||
<Setter Property="Background" Value="#001e4e"></Setter>
|
||||
<Style
|
||||
x:Key="WindowBorderStyle"
|
||||
BasedOn="{StaticResource BaseWindowBorderStyle}"
|
||||
TargetType="{x:Type Border}">
|
||||
<Setter Property="Background" Value="#001e4e" />
|
||||
</Style>
|
||||
<Style x:Key="WindowStyle" TargetType="{x:Type Window}" BasedOn="{StaticResource BaseWindowStyle}" >
|
||||
</Style>
|
||||
<Style x:Key="PendingLineStyle" BasedOn="{StaticResource BasePendingLineStyle}" TargetType="{x:Type Line}" >
|
||||
</Style>
|
||||
<Style x:Key="ItemTitleStyle" BasedOn="{StaticResource BaseItemTitleStyle}" TargetType="{x:Type TextBlock}" >
|
||||
<Setter Property="Foreground" Value="#f5f5f5"></Setter>
|
||||
</Style>
|
||||
<Style x:Key="ItemSubTitleStyle" BasedOn="{StaticResource BaseItemSubTitleStyle}" TargetType="{x:Type TextBlock}" >
|
||||
<Setter Property="Foreground" Value="#A5A5A5"></Setter>
|
||||
<Setter Property="FontSize" Value="13" />
|
||||
</Style>
|
||||
<Style x:Key="ItemTitleSelectedStyle" BasedOn="{StaticResource BaseItemTitleSelectedStyle}" TargetType="{x:Type TextBlock}">
|
||||
<Style
|
||||
x:Key="WindowStyle"
|
||||
BasedOn="{StaticResource BaseWindowStyle}"
|
||||
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="#f5f5f5" />
|
||||
</Style>
|
||||
<Style x:Key="ItemSubTitleSelectedStyle" BasedOn="{StaticResource BaseItemSubTitleSelectedStyle}" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#A5A5A5"></Setter>
|
||||
<Style
|
||||
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" />
|
||||
</Style>
|
||||
<SolidColorBrush x:Key="ItemSelectedBackgroundColor">#04152E</SolidColorBrush>
|
||||
<Style x:Key="ThumbStyle" BasedOn="{StaticResource BaseThumbStyle}" TargetType="{x:Type Thumb}">
|
||||
</Style>
|
||||
<Style x:Key="ScrollBarStyle" BasedOn="{StaticResource BaseScrollBarStyle}" TargetType="{x:Type ScrollBar}">
|
||||
</Style>
|
||||
<Style x:Key="SearchIconStyle" TargetType="{x:Type Path}" BasedOn="{StaticResource BaseSearchIconStyle}">
|
||||
<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="SearchIconStyle"
|
||||
BasedOn="{StaticResource BaseSearchIconStyle}"
|
||||
TargetType="{x:Type Path}">
|
||||
<Setter Property="Fill" Value="#1d427d" />
|
||||
<Setter Property="Width" Value="32" />
|
||||
<Setter Property="Height" Value="32" />
|
||||
|
|
@ -56,4 +91,23 @@
|
|||
<Setter Property="FontSize" Value="15" />
|
||||
<Setter Property="Foreground" Value="#2C5595" />
|
||||
</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>
|
||||
|
|
@ -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.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/Themes/Base.xaml" />
|
||||
</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" />
|
||||
</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="Foreground" Value="#eceff4" />
|
||||
<Setter Property="FontSize" Value="30" />
|
||||
</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="Foreground" Value="#50596b" />
|
||||
<Setter Property="FontSize" Value="30" />
|
||||
</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="BorderThickness" Value="1" />
|
||||
<Setter Property="Background" Value="#2e3440"></Setter>
|
||||
<Setter Property="Background" Value="#2e3440" />
|
||||
</Style>
|
||||
<Style x:Key="WindowStyle" TargetType="{x:Type Window}" BasedOn="{StaticResource BaseWindowStyle}" >
|
||||
</Style>
|
||||
<Style x:Key="PendingLineStyle" BasedOn="{StaticResource BasePendingLineStyle}" TargetType="{x:Type Line}">
|
||||
<Style
|
||||
x:Key="WindowStyle"
|
||||
BasedOn="{StaticResource BaseWindowStyle}"
|
||||
TargetType="{x:Type Window}" />
|
||||
<Style
|
||||
x:Key="PendingLineStyle"
|
||||
BasedOn="{StaticResource BasePendingLineStyle}"
|
||||
TargetType="{x:Type Line}">
|
||||
<Setter Property="Stroke" Value="White" />
|
||||
</Style>
|
||||
<Style x:Key="ItemTitleStyle" BasedOn="{StaticResource BaseItemTitleStyle}" TargetType="{x:Type TextBlock}">
|
||||
<Style
|
||||
x:Key="ItemTitleStyle"
|
||||
BasedOn="{StaticResource BaseItemTitleStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#e5e9f0" />
|
||||
<Setter Property="FontWeight" Value="Bold" />
|
||||
</Style>
|
||||
<Style x:Key="ItemNumberStyle" BasedOn="{StaticResource BaseItemNumberStyle}" TargetType="{x:Type TextBlock}">
|
||||
<Style
|
||||
x:Key="ItemNumberStyle"
|
||||
BasedOn="{StaticResource BaseItemNumberStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#6F7C95" />
|
||||
</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" />
|
||||
</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" />
|
||||
</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" />
|
||||
</Style>
|
||||
<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.Value>
|
||||
<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>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ScrollBarStyle" BasedOn="{StaticResource BaseScrollBarStyle}" TargetType="{x:Type ScrollBar}" >
|
||||
<Setter Property="Width" Value="3"/>
|
||||
<Style
|
||||
x:Key="ScrollBarStyle"
|
||||
BasedOn="{StaticResource BaseScrollBarStyle}"
|
||||
TargetType="{x:Type ScrollBar}">
|
||||
<Setter Property="Width" Value="3" />
|
||||
</Style>
|
||||
<Style x:Key="SearchIconStyle" TargetType="{x:Type Path}" BasedOn="{StaticResource BaseSearchIconStyle}">
|
||||
<Style
|
||||
x:Key="SearchIconStyle"
|
||||
BasedOn="{StaticResource BaseSearchIconStyle}"
|
||||
TargetType="{x:Type Path}">
|
||||
<Setter Property="Fill" Value="#50596b" />
|
||||
<Setter Property="Width" Value="32" />
|
||||
<Setter Property="Height" Value="32" />
|
||||
|
|
@ -71,4 +117,16 @@
|
|||
<Setter Property="FontSize" Value="15" />
|
||||
<Setter Property="Foreground" Value="#8391AB" />
|
||||
</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>
|
||||
|
|
|
|||
|
|
@ -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.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/Themes/Base.xaml" />
|
||||
</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" />
|
||||
</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="Foreground" Value="#eceff4" />
|
||||
<Setter Property="FontSize" Value="25" />
|
||||
</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="Foreground" Value="#eceff4" />
|
||||
<Setter Property="FontSize" Value="25" />
|
||||
</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="BorderThickness" Value="1" />
|
||||
<Setter Property="Background" Value="#4c566a"></Setter>
|
||||
<Setter Property="Background" Value="#4c566a" />
|
||||
</Style>
|
||||
<Style x:Key="WindowStyle" TargetType="{x:Type Window}" BasedOn="{StaticResource BaseWindowStyle}" >
|
||||
</Style>
|
||||
<Style x:Key="PendingLineStyle" BasedOn="{StaticResource BasePendingLineStyle}" TargetType="{x:Type Line}">
|
||||
<Style
|
||||
x:Key="WindowStyle"
|
||||
BasedOn="{StaticResource BaseWindowStyle}"
|
||||
TargetType="{x:Type Window}" />
|
||||
<Style
|
||||
x:Key="PendingLineStyle"
|
||||
BasedOn="{StaticResource BasePendingLineStyle}"
|
||||
TargetType="{x:Type Line}">
|
||||
<Setter Property="Stroke" Value="White" />
|
||||
</Style>
|
||||
<Style x:Key="ItemTitleStyle" BasedOn="{StaticResource BaseItemTitleStyle}" TargetType="{x:Type TextBlock}">
|
||||
<Style
|
||||
x:Key="ItemTitleStyle"
|
||||
BasedOn="{StaticResource BaseItemTitleStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#e5e9f0" />
|
||||
<Setter Property="FontWeight" Value="Bold" />
|
||||
</Style>
|
||||
<Style x:Key="ItemNumberStyle" BasedOn="{StaticResource BaseItemNumberStyle}" TargetType="{x:Type TextBlock}">
|
||||
<Style
|
||||
x:Key="ItemNumberStyle"
|
||||
BasedOn="{StaticResource BaseItemNumberStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#798090" />
|
||||
</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" />
|
||||
</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" />
|
||||
</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" />
|
||||
</Style>
|
||||
<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.Value>
|
||||
<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>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style x:Key="ScrollBarStyle" BasedOn="{StaticResource BaseScrollBarStyle}" TargetType="{x:Type ScrollBar}" >
|
||||
<Setter Property="Width" Value="3"/>
|
||||
<Style
|
||||
x:Key="ScrollBarStyle"
|
||||
BasedOn="{StaticResource BaseScrollBarStyle}"
|
||||
TargetType="{x:Type ScrollBar}">
|
||||
<Setter Property="Width" Value="3" />
|
||||
</Style>
|
||||
<Style x:Key="SearchIconStyle" TargetType="{x:Type Path}" BasedOn="{StaticResource BaseSearchIconStyle}">
|
||||
<Style
|
||||
x:Key="SearchIconStyle"
|
||||
BasedOn="{StaticResource BaseSearchIconStyle}"
|
||||
TargetType="{x:Type Path}">
|
||||
<Setter Property="Fill" Value="#687693" />
|
||||
<Setter Property="Width" Value="32" />
|
||||
<Setter Property="Height" Value="32" />
|
||||
|
|
@ -70,4 +116,16 @@
|
|||
<Setter Property="FontSize" Value="14" />
|
||||
<Setter Property="Foreground" Value="#687693" />
|
||||
</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>
|
||||
|
|
|
|||
|
|
@ -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 Source="pack://application:,,,/Themes/Base.xaml"></ResourceDictionary>
|
||||
<ResourceDictionary Source="pack://application:,,,/Themes/Base.xaml" />
|
||||
</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" />
|
||||
</Style>
|
||||
<Style x:Key="QueryBoxStyle" BasedOn="{StaticResource BaseQueryBoxStyle}" TargetType="{x:Type TextBox}">
|
||||
<Setter Property="Background" Value="#1f1d1f"/>
|
||||
<Style
|
||||
x:Key="QueryBoxStyle"
|
||||
BasedOn="{StaticResource BaseQueryBoxStyle}"
|
||||
TargetType="{x:Type TextBox}">
|
||||
<Setter Property="Background" Value="#1f1d1f" />
|
||||
<Setter Property="Foreground" Value="#cc1081" />
|
||||
<Setter Property="CaretBrush" Value="#cc1081" />
|
||||
<Setter Property="SelectionBrush" Value="#e564b1"/>
|
||||
<Setter Property="SelectionBrush" Value="#e564b1" />
|
||||
</Style>
|
||||
|
||||
<Style x:Key="QuerySuggestionBoxStyle" BasedOn="{StaticResource BaseQuerySuggestionBoxStyle}" TargetType="{x:Type TextBox}">
|
||||
<Setter Property="Background" Value="#1f1d1f"/>
|
||||
<Style
|
||||
x:Key="QuerySuggestionBoxStyle"
|
||||
BasedOn="{StaticResource BaseQuerySuggestionBoxStyle}"
|
||||
TargetType="{x:Type TextBox}">
|
||||
<Setter Property="Background" Value="#1f1d1f" />
|
||||
<Setter Property="Foreground" Value="#71114b" />
|
||||
</Style>
|
||||
|
||||
<Style x:Key="WindowBorderStyle" BasedOn="{StaticResource BaseWindowBorderStyle}" TargetType="{x:Type Border}">
|
||||
<Setter Property="Background" Value="#1f1d1f"></Setter>
|
||||
<Setter Property="BorderThickness" Value="2"></Setter>
|
||||
<Setter Property="BorderBrush" Value="#000000"></Setter>
|
||||
<Style
|
||||
x:Key="WindowBorderStyle"
|
||||
BasedOn="{StaticResource BaseWindowBorderStyle}"
|
||||
TargetType="{x:Type Border}">
|
||||
<Setter Property="Background" Value="#1f1d1f" />
|
||||
<Setter Property="BorderThickness" Value="2" />
|
||||
<Setter Property="BorderBrush" Value="#000000" />
|
||||
</Style>
|
||||
<Style x:Key="WindowStyle" TargetType="{x:Type Window}" BasedOn="{StaticResource BaseWindowStyle}" >
|
||||
</Style>
|
||||
<Style x:Key="PendingLineStyle" BasedOn="{StaticResource BasePendingLineStyle}" TargetType="{x:Type Line}">
|
||||
<Style
|
||||
x:Key="WindowStyle"
|
||||
BasedOn="{StaticResource BaseWindowStyle}"
|
||||
TargetType="{x:Type Window}" />
|
||||
<Style
|
||||
x:Key="PendingLineStyle"
|
||||
BasedOn="{StaticResource BasePendingLineStyle}"
|
||||
TargetType="{x:Type Line}">
|
||||
<Setter Property="Stroke" Value="#cc1081" />
|
||||
</Style>
|
||||
<Style x:Key="ItemTitleStyle" BasedOn="{StaticResource BaseItemTitleStyle}" TargetType="{x:Type TextBlock}" >
|
||||
<Setter Property="Foreground" Value="#f5f5f5"></Setter>
|
||||
</Style>
|
||||
<Style x:Key="ItemSubTitleStyle" BasedOn="{StaticResource BaseItemSubTitleStyle}" TargetType="{x:Type TextBlock}" >
|
||||
<Setter Property="Foreground" Value="#c2c2c2"></Setter>
|
||||
<Setter Property="Opacity" Value="0.5"></Setter>
|
||||
</Style>
|
||||
<Style x:Key="ItemTitleSelectedStyle" BasedOn="{StaticResource BaseItemTitleSelectedStyle}" TargetType="{x:Type TextBlock}">
|
||||
<Style
|
||||
x:Key="ItemTitleStyle"
|
||||
BasedOn="{StaticResource BaseItemTitleStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#f5f5f5" />
|
||||
</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" />
|
||||
</Style>
|
||||
<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.Value>
|
||||
<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>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</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>
|
||||
|
||||
<Style x:Key="SearchIconPosition" TargetType="{x:Type Canvas}">
|
||||
<Setter Property="Width" Value="34" />
|
||||
<Setter Property="Height" Value="34" />
|
||||
<Setter Property="Margin" Value="0 6 14 0" />
|
||||
<Setter Property="Margin" Value="0,6,14,0" />
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="HorizontalAlignment" Value="Right" />
|
||||
</Style>
|
||||
|
|
@ -74,4 +113,16 @@
|
|||
<Setter Property="FontSize" Value="14" />
|
||||
<Setter Property="Foreground" Value="#ed92c9" />
|
||||
</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>
|
||||
|
|
@ -1,64 +1,101 @@
|
|||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
<ResourceDictionary
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/Themes/Base.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<Style x:Key="ItemGlyph" BasedOn="{StaticResource BaseGlyphStyle}" TargetType="{x:Type TextBlock}">
|
||||
<Style
|
||||
x:Key="ItemGlyph"
|
||||
BasedOn="{StaticResource BaseGlyphStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#5bafb0" />
|
||||
</Style>
|
||||
<Style x:Key="QueryBoxStyle" BasedOn="{StaticResource BaseQueryBoxStyle}" TargetType="{x:Type TextBox}">
|
||||
<Style
|
||||
x:Key="QueryBoxStyle"
|
||||
BasedOn="{StaticResource BaseQueryBoxStyle}"
|
||||
TargetType="{x:Type TextBox}">
|
||||
<Setter Property="FontSize" Value="24" />
|
||||
<Setter Property="Background" Value="#303840" />
|
||||
<Setter Property="Foreground" Value="#d2d8e5" />
|
||||
<Setter Property="CaretBrush" Value="#FFAA47" />
|
||||
<Setter Property="FontSize" Value="26" />
|
||||
<Setter Property="Height" Value="42" />
|
||||
<Setter Property="Padding" Value="0 4 66 0" />
|
||||
<Setter Property="Padding" Value="0,4,66,0" />
|
||||
</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="Foreground" Value="#798189" />
|
||||
<Setter Property="FontSize" Value="26" />
|
||||
<Setter Property="Height" Value="42" />
|
||||
<Setter Property="Padding" Value="0 4 66 0" />
|
||||
<Setter Property="Padding" Value="0,4,66,0" />
|
||||
</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="BorderBrush" Value="#6c7279" />
|
||||
<Setter Property="CornerRadius" Value="6" />
|
||||
<Setter Property="Background" Value="#303840" />
|
||||
</Style>
|
||||
<Style x:Key="WindowStyle" BasedOn="{StaticResource BaseWindowStyle}" TargetType="{x:Type Window}">
|
||||
<Style
|
||||
x:Key="WindowStyle"
|
||||
BasedOn="{StaticResource BaseWindowStyle}"
|
||||
TargetType="{x:Type Window}">
|
||||
<Setter Property="Width" Value="576" />
|
||||
<Setter Property="RenderOptions.ClearTypeHint" Value="Enabled"/>
|
||||
<Setter Property="RenderOptions.ClearTypeHint" Value="Enabled" />
|
||||
</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" />
|
||||
</Style>
|
||||
|
||||
<!-- Item Style -->
|
||||
<Style x:Key="ItemTitleStyle" BasedOn="{StaticResource BaseItemTitleStyle}" TargetType="{x:Type TextBlock}">
|
||||
<!-- Item Style -->
|
||||
<Style
|
||||
x:Key="ItemTitleStyle"
|
||||
BasedOn="{StaticResource BaseItemTitleStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#5989b2" />
|
||||
</Style>
|
||||
<Style x:Key="ItemSubTitleStyle" BasedOn="{StaticResource BaseItemSubTitleStyle}" TargetType="{x:Type TextBlock}" >
|
||||
<Style
|
||||
x:Key="ItemSubTitleStyle"
|
||||
BasedOn="{StaticResource BaseItemSubTitleStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#7b858f" />
|
||||
<Setter Property="FontSize" Value="13" />
|
||||
</Style>
|
||||
<Style x:Key="ItemNumberStyle" BasedOn="{StaticResource BaseItemNumberStyle}" TargetType="{x:Type TextBlock}">
|
||||
<Style
|
||||
x:Key="ItemNumberStyle"
|
||||
BasedOn="{StaticResource BaseItemNumberStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#7b858f" />
|
||||
</Style>
|
||||
<Style x:Key="ItemTitleSelectedStyle" BasedOn="{StaticResource BaseItemTitleSelectedStyle}" TargetType="{x:Type TextBlock}" >
|
||||
<Style
|
||||
x:Key="ItemTitleSelectedStyle"
|
||||
BasedOn="{StaticResource BaseItemTitleSelectedStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Cursor" Value="Arrow" />
|
||||
<Setter Property="Foreground" Value="#5bafb0" />
|
||||
</Style>
|
||||
<Style x:Key="ItemSubTitleSelectedStyle" BasedOn="{StaticResource BaseItemSubTitleSelectedStyle}" TargetType="{x:Type TextBlock}" >
|
||||
<Style
|
||||
x:Key="ItemSubTitleSelectedStyle"
|
||||
BasedOn="{StaticResource BaseItemSubTitleSelectedStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Cursor" Value="Arrow" />
|
||||
<Setter Property="Foreground" Value="#cc8ec8" />
|
||||
</Style>
|
||||
<SolidColorBrush x:Key="ItemSelectedBackgroundColor">#3c454e</SolidColorBrush>
|
||||
<Style x:Key="ItemImageSelectedStyle" BasedOn="{StaticResource BaseItemImageSelectedStyle}" TargetType="{x:Type Image}" >
|
||||
<Style
|
||||
x:Key="ItemImageSelectedStyle"
|
||||
BasedOn="{StaticResource BaseItemImageSelectedStyle}"
|
||||
TargetType="{x:Type Image}">
|
||||
<Setter Property="Cursor" Value="Arrow" />
|
||||
</Style>
|
||||
<Style x:Key="HighlightStyle">
|
||||
|
|
@ -72,31 +109,59 @@
|
|||
<Setter Property="FontSize" Value="13" />
|
||||
<Setter Property="Foreground" Value="#ea7354" />
|
||||
</Style>
|
||||
<!-- button style in the middle of the scrollbar -->
|
||||
<Style x:Key="ThumbStyle" BasedOn="{StaticResource BaseThumbStyle}" TargetType="{x:Type Thumb}">
|
||||
<Setter Property="SnapsToDevicePixels" Value="True"/>
|
||||
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
||||
<Setter Property="IsTabStop" Value="false"/>
|
||||
<Setter Property="Width" Value="2"/>
|
||||
<Setter Property="Focusable" Value="false"/>
|
||||
<!-- button style in the middle of the scrollbar -->
|
||||
<Style
|
||||
x:Key="ThumbStyle"
|
||||
BasedOn="{StaticResource BaseThumbStyle}"
|
||||
TargetType="{x:Type Thumb}">
|
||||
<Setter Property="SnapsToDevicePixels" Value="True" />
|
||||
<Setter Property="OverridesDefaultStyle" Value="true" />
|
||||
<Setter Property="IsTabStop" Value="false" />
|
||||
<Setter Property="Width" Value="2" />
|
||||
<Setter Property="Focusable" Value="false" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Thumb}">
|
||||
<Border CornerRadius="2" DockPanel.Dock="Right" Background="#6c7279" BorderBrush="Transparent" BorderThickness="0" />
|
||||
<Border
|
||||
Background="#6c7279"
|
||||
BorderBrush="Transparent"
|
||||
BorderThickness="0"
|
||||
CornerRadius="2"
|
||||
DockPanel.Dock="Right" />
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style x:Key="ScrollBarStyle" BasedOn="{StaticResource BaseScrollBarStyle}" TargetType="{x:Type ScrollBar}">
|
||||
<Style
|
||||
x:Key="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 x:Key="SeparatorStyle" BasedOn="{StaticResource BaseSeparatorStyle}" TargetType="{x:Type Rectangle}">
|
||||
<Setter Property="Fill" Value="#3c454e"/>
|
||||
<Setter Property="Height" Value="1"/>
|
||||
<Setter Property="Margin" Value="0 0 0 8"/>
|
||||
</Style>
|
||||
<Style x:Key="SearchIconStyle" TargetType="{x:Type Path}" BasedOn="{StaticResource BaseSearchIconStyle}">
|
||||
<Style
|
||||
x:Key="SearchIconStyle"
|
||||
BasedOn="{StaticResource BaseSearchIconStyle}"
|
||||
TargetType="{x:Type Path}">
|
||||
<Setter Property="Fill" Value="#3c454e" />
|
||||
<Setter Property="Width" Value="32" />
|
||||
<Setter Property="Height" Value="32" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="ClockBox"
|
||||
BasedOn="{StaticResource BaseClockBox}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#5bafb0" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="DateBox"
|
||||
BasedOn="{StaticResource BaseDateBox}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#5bafb0" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
|
|
|
|||
|
|
@ -1,67 +1,104 @@
|
|||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
<ResourceDictionary
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/Themes/Base.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<Style x:Key="ItemGlyph" BasedOn="{StaticResource BaseGlyphStyle}" TargetType="{x:Type TextBlock}">
|
||||
<Style
|
||||
x:Key="ItemGlyph"
|
||||
BasedOn="{StaticResource BaseGlyphStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#000000" />
|
||||
</Style>
|
||||
<Style x:Key="QueryBoxStyle" BasedOn="{StaticResource BaseQueryBoxStyle}" TargetType="{x:Type TextBox}">
|
||||
<Setter Property="SelectionBrush" Value="#0a68d8"/>
|
||||
<Style
|
||||
x:Key="QueryBoxStyle"
|
||||
BasedOn="{StaticResource BaseQueryBoxStyle}"
|
||||
TargetType="{x:Type TextBox}">
|
||||
<Setter Property="SelectionBrush" Value="#0a68d8" />
|
||||
<Setter Property="FontSize" Value="24" />
|
||||
<Setter Property="Foreground" Value="#000000" />
|
||||
<Setter Property="Background" Value="#dddddd" />
|
||||
<Setter Property="CaretBrush" Value="#000000" />
|
||||
<Setter Property="BorderBrush" Value="Black"/>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
<Setter Property="BorderBrush" Value="Black" />
|
||||
<Setter Property="BorderThickness" Value="0" />
|
||||
<Setter Property="FontSize" Value="28" />
|
||||
<Setter Property="Height" Value="42" />
|
||||
<Setter Property="Padding" Value="0 4 66 0" />
|
||||
<Setter Property="Padding" Value="0,4,66,0" />
|
||||
</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="Foreground" Value="#c6c6c6" />
|
||||
<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" />
|
||||
</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="BorderBrush" Value="#aaaaaa" />
|
||||
<Setter Property="CornerRadius" Value="0" />
|
||||
<Setter Property="Background" Value="#dddddd" />
|
||||
</Style>
|
||||
<Style x:Key="WindowStyle" BasedOn="{StaticResource BaseWindowStyle}" TargetType="{x:Type Window}">
|
||||
<Style
|
||||
x:Key="WindowStyle"
|
||||
BasedOn="{StaticResource BaseWindowStyle}"
|
||||
TargetType="{x:Type Window}">
|
||||
<Setter Property="Width" Value="576" />
|
||||
<Setter Property="RenderOptions.ClearTypeHint" Value="Enabled"/>
|
||||
<Setter Property="RenderOptions.ClearTypeHint" Value="Enabled" />
|
||||
</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" />
|
||||
</Style>
|
||||
|
||||
<!-- Item Style -->
|
||||
<Style x:Key="ItemTitleStyle" BasedOn="{StaticResource BaseItemTitleStyle}" TargetType="{x:Type TextBlock}">
|
||||
<!-- Item Style -->
|
||||
<Style
|
||||
x:Key="ItemTitleStyle"
|
||||
BasedOn="{StaticResource BaseItemTitleStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#000000" />
|
||||
</Style>
|
||||
<Style x:Key="ItemSubTitleStyle" BasedOn="{StaticResource BaseItemSubTitleStyle}" TargetType="{x:Type TextBlock}" >
|
||||
<Style
|
||||
x:Key="ItemSubTitleStyle"
|
||||
BasedOn="{StaticResource BaseItemSubTitleStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#818181" />
|
||||
<Setter Property="FontSize" Value="13" />
|
||||
</Style>
|
||||
<Style x:Key="ItemNumberStyle" BasedOn="{StaticResource BaseItemNumberStyle}" TargetType="{x:Type TextBlock}">
|
||||
<Style
|
||||
x:Key="ItemNumberStyle"
|
||||
BasedOn="{StaticResource BaseItemNumberStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#818181" />
|
||||
</Style>
|
||||
<Style x:Key="ItemTitleSelectedStyle" BasedOn="{StaticResource BaseItemTitleSelectedStyle}" TargetType="{x:Type TextBlock}" >
|
||||
<Style
|
||||
x:Key="ItemTitleSelectedStyle"
|
||||
BasedOn="{StaticResource BaseItemTitleSelectedStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Cursor" Value="Arrow" />
|
||||
<Setter Property="Foreground" Value="#000000" />
|
||||
</Style>
|
||||
<Style x:Key="ItemSubTitleSelectedStyle" BasedOn="{StaticResource BaseItemSubTitleSelectedStyle}" TargetType="{x:Type TextBlock}" >
|
||||
<Style
|
||||
x:Key="ItemSubTitleSelectedStyle"
|
||||
BasedOn="{StaticResource BaseItemSubTitleSelectedStyle}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Cursor" Value="Arrow" />
|
||||
<Setter Property="Foreground" Value="#72767d" />
|
||||
</Style>
|
||||
<SolidColorBrush x:Key="ItemSelectedBackgroundColor">#ccd0d4</SolidColorBrush>
|
||||
<Style x:Key="ItemImageSelectedStyle" BasedOn="{StaticResource BaseItemImageSelectedStyle}" TargetType="{x:Type Image}" >
|
||||
<Style
|
||||
x:Key="ItemImageSelectedStyle"
|
||||
BasedOn="{StaticResource BaseItemImageSelectedStyle}"
|
||||
TargetType="{x:Type Image}">
|
||||
<Setter Property="Cursor" Value="Arrow" />
|
||||
</Style>
|
||||
<Style x:Key="HighlightStyle">
|
||||
|
|
@ -75,31 +112,59 @@
|
|||
<Setter Property="FontSize" Value="15" />
|
||||
<Setter Property="Foreground" Value="#b2b2b2" />
|
||||
</Style>
|
||||
<!-- button style in the middle of the scrollbar -->
|
||||
<Style x:Key="ThumbStyle" BasedOn="{StaticResource BaseThumbStyle}" TargetType="{x:Type Thumb}">
|
||||
<Setter Property="SnapsToDevicePixels" Value="True"/>
|
||||
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
||||
<Setter Property="IsTabStop" Value="false"/>
|
||||
<Setter Property="Focusable" Value="false"/>
|
||||
<!-- button style in the middle of the scrollbar -->
|
||||
<Style
|
||||
x:Key="ThumbStyle"
|
||||
BasedOn="{StaticResource BaseThumbStyle}"
|
||||
TargetType="{x:Type Thumb}">
|
||||
<Setter Property="SnapsToDevicePixels" Value="True" />
|
||||
<Setter Property="OverridesDefaultStyle" Value="true" />
|
||||
<Setter Property="IsTabStop" Value="false" />
|
||||
<Setter Property="Focusable" Value="false" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Thumb}">
|
||||
<Border CornerRadius="2" DockPanel.Dock="Right" Background="#bebebe" BorderBrush="Transparent" BorderThickness="0" />
|
||||
<Border
|
||||
Background="#bebebe"
|
||||
BorderBrush="Transparent"
|
||||
BorderThickness="0"
|
||||
CornerRadius="2"
|
||||
DockPanel.Dock="Right" />
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style x:Key="ScrollBarStyle" BasedOn="{StaticResource BaseScrollBarStyle}" TargetType="{x:Type ScrollBar}">
|
||||
<Style
|
||||
x:Key="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 x:Key="SeparatorStyle" BasedOn="{StaticResource BaseSeparatorStyle}" TargetType="{x:Type Rectangle}">
|
||||
<Setter Property="Fill" Value="#c6c6c6"/>
|
||||
<Setter Property="Height" Value="1"/>
|
||||
<Setter Property="Margin" Value="12 0 12 8"/>
|
||||
</Style>
|
||||
<Style x:Key="SearchIconStyle" TargetType="{x:Type Path}" BasedOn="{StaticResource BaseSearchIconStyle}">
|
||||
<Style
|
||||
x:Key="SearchIconStyle"
|
||||
BasedOn="{StaticResource BaseSearchIconStyle}"
|
||||
TargetType="{x:Type Path}">
|
||||
<Setter Property="Fill" Value="#555555" />
|
||||
<Setter Property="Width" Value="32" />
|
||||
<Setter Property="Height" Value="32" />
|
||||
<Setter Property="Opacity" Value="0.2" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="ClockBox"
|
||||
BasedOn="{StaticResource BaseClockBox}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#b2b2b2" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="DateBox"
|
||||
BasedOn="{StaticResource BaseDateBox}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#b2b2b2" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
|
|
|
|||
|
|
@ -156,4 +156,16 @@
|
|||
<Setter Property="Width" Value="32" />
|
||||
<Setter Property="Height" Value="32" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="ClockBox"
|
||||
BasedOn="{StaticResource BaseClockBox}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#7b7b7b" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="DateBox"
|
||||
BasedOn="{StaticResource BaseDateBox}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#7b7b7b" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
|
|
|
|||
|
|
@ -164,4 +164,16 @@
|
|||
<Setter Property="Height" Value="32" />
|
||||
<Setter Property="Opacity" Value="0.2" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="ClockBox"
|
||||
BasedOn="{StaticResource BaseClockBox}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#acacac" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="DateBox"
|
||||
BasedOn="{StaticResource BaseDateBox}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#acacac" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
|
|
|
|||
|
|
@ -156,4 +156,16 @@
|
|||
<Setter Property="Height" Value="32" />
|
||||
<Setter Property="Opacity" Value="1" />
|
||||
</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>
|
||||
|
|
|
|||
|
|
@ -38,7 +38,6 @@ namespace Flow.Launcher.ViewModel
|
|||
private readonly FlowLauncherJsonStorage<History> _historyItemsStorage;
|
||||
private readonly FlowLauncherJsonStorage<UserSelectedRecord> _userSelectedRecordStorage;
|
||||
private readonly FlowLauncherJsonStorage<TopMostRecord> _topMostRecordStorage;
|
||||
internal readonly Settings _settings;
|
||||
private readonly History _history;
|
||||
private readonly UserSelectedRecord _userSelectedRecord;
|
||||
private readonly TopMostRecord _topMostRecord;
|
||||
|
|
@ -61,8 +60,8 @@ namespace Flow.Launcher.ViewModel
|
|||
_queryText = "";
|
||||
_lastQuery = new Query();
|
||||
|
||||
_settings = settings;
|
||||
_settings.PropertyChanged += (_, args) =>
|
||||
Settings = settings;
|
||||
Settings.PropertyChanged += (_, args) =>
|
||||
{
|
||||
if (args.PropertyName == nameof(Settings.WindowSize))
|
||||
{
|
||||
|
|
@ -77,15 +76,16 @@ namespace Flow.Launcher.ViewModel
|
|||
_userSelectedRecord = _userSelectedRecordStorage.Load();
|
||||
_topMostRecord = _topMostRecordStorage.Load();
|
||||
|
||||
ContextMenu = new ResultsViewModel(_settings);
|
||||
Results = new ResultsViewModel(_settings);
|
||||
History = new ResultsViewModel(_settings);
|
||||
ContextMenu = new ResultsViewModel(Settings);
|
||||
Results = new ResultsViewModel(Settings);
|
||||
History = new ResultsViewModel(Settings);
|
||||
_selectedResults = Results;
|
||||
|
||||
InitializeKeyCommands();
|
||||
|
||||
RegisterViewUpdate();
|
||||
RegisterResultsUpdatedEvent();
|
||||
RegisterClockAndDateUpdateAsync();
|
||||
|
||||
SetOpenResultModifiers();
|
||||
}
|
||||
|
|
@ -321,6 +321,22 @@ namespace Flow.Launcher.ViewModel
|
|||
|
||||
#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 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]
|
||||
private void IncreaseWidth()
|
||||
{
|
||||
if (MainWindowWidth + 100 > 1920 || _settings.WindowSize == 1920)
|
||||
if (MainWindowWidth + 100 > 1920 || Settings.WindowSize == 1920)
|
||||
{
|
||||
_settings.WindowSize = 1920;
|
||||
Settings.WindowSize = 1920;
|
||||
}
|
||||
else
|
||||
{
|
||||
_settings.WindowSize += 100;
|
||||
Left -= 50;
|
||||
{
|
||||
Settings.WindowSize += 100;
|
||||
Settings.WindowLeft -= 50;
|
||||
}
|
||||
OnPropertyChanged();
|
||||
}
|
||||
|
|
@ -378,14 +375,14 @@ namespace Flow.Launcher.ViewModel
|
|||
[RelayCommand]
|
||||
private void DecreaseWidth()
|
||||
{
|
||||
if (MainWindowWidth - 100 < 400 || _settings.WindowSize == 400)
|
||||
if (MainWindowWidth - 100 < 400 || Settings.WindowSize == 400)
|
||||
{
|
||||
_settings.WindowSize = 400;
|
||||
Settings.WindowSize = 400;
|
||||
}
|
||||
else
|
||||
{
|
||||
Left += 50;
|
||||
_settings.WindowSize -= 100;
|
||||
{
|
||||
Settings.WindowLeft += 50;
|
||||
Settings.WindowSize -= 100;
|
||||
}
|
||||
OnPropertyChanged();
|
||||
}
|
||||
|
|
@ -393,19 +390,19 @@ namespace Flow.Launcher.ViewModel
|
|||
[RelayCommand]
|
||||
private void IncreaseMaxResult()
|
||||
{
|
||||
if (_settings.MaxResultsToShow == 17)
|
||||
if (Settings.MaxResultsToShow == 17)
|
||||
return;
|
||||
|
||||
_settings.MaxResultsToShow += 1;
|
||||
Settings.MaxResultsToShow += 1;
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
private void DecreaseMaxResult()
|
||||
{
|
||||
if (_settings.MaxResultsToShow == 2)
|
||||
if (Settings.MaxResultsToShow == 2)
|
||||
return;
|
||||
|
||||
_settings.MaxResultsToShow -= 1;
|
||||
Settings.MaxResultsToShow -= 1;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -485,8 +482,8 @@ namespace Flow.Launcher.ViewModel
|
|||
|
||||
public double MainWindowWidth
|
||||
{
|
||||
get => _settings.WindowSize;
|
||||
set => _settings.WindowSize = value;
|
||||
get => Settings.WindowSize;
|
||||
set => Settings.WindowSize = value;
|
||||
}
|
||||
|
||||
public string PluginIconPath { get; set; } = null;
|
||||
|
|
@ -835,7 +832,7 @@ namespace Flow.Launcher.ViewModel
|
|||
|
||||
private void SetOpenResultModifiers()
|
||||
{
|
||||
OpenResultCommandModifiers = _settings.OpenResultModifiers ?? DefaultOpenResultModifiers;
|
||||
OpenResultCommandModifiers = Settings.OpenResultModifiers ?? DefaultOpenResultModifiers;
|
||||
}
|
||||
|
||||
public void ToggleFlowLauncher()
|
||||
|
|
@ -864,24 +861,24 @@ namespace Flow.Launcher.ViewModel
|
|||
// Trick for no delay
|
||||
MainWindowOpacity = 0;
|
||||
|
||||
switch (_settings.LastQueryMode)
|
||||
switch (Settings.LastQueryMode)
|
||||
{
|
||||
case LastQueryMode.Empty:
|
||||
ChangeQueryText(string.Empty);
|
||||
await Task.Delay(100); //Time for change to opacity
|
||||
break;
|
||||
case LastQueryMode.Preserved:
|
||||
if (_settings.UseAnimation)
|
||||
if (Settings.UseAnimation)
|
||||
await Task.Delay(100);
|
||||
LastQuerySelected = true;
|
||||
break;
|
||||
case LastQueryMode.Selected:
|
||||
if (_settings.UseAnimation)
|
||||
if (Settings.UseAnimation)
|
||||
await Task.Delay(100);
|
||||
LastQuerySelected = false;
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentException($"wrong LastQueryMode: <{_settings.LastQueryMode}>");
|
||||
throw new ArgumentException($"wrong LastQueryMode: <{Settings.LastQueryMode}>");
|
||||
}
|
||||
|
||||
MainWindowVisibilityStatus = false;
|
||||
|
|
@ -896,7 +893,7 @@ namespace Flow.Launcher.ViewModel
|
|||
/// </summary>
|
||||
public bool ShouldIgnoreHotkeys()
|
||||
{
|
||||
return _settings.IgnoreHotkeysOnFullscreen && WindowsInteropHelper.IsWindowFullscreen();
|
||||
return Settings.IgnoreHotkeysOnFullscreen && WindowsInteropHelper.IsWindowFullscreen();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
58
Flow.Launcher/ViewModel/PluginStoreItemViewModel.cs
Normal file
58
Flow.Launcher/ViewModel/PluginStoreItemViewModel.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -163,15 +163,17 @@ namespace Flow.Launcher.ViewModel
|
|||
}
|
||||
}
|
||||
|
||||
var loadFullImage = (Path.GetExtension(imagePath) ?? "").Equals(".url", StringComparison.OrdinalIgnoreCase);
|
||||
|
||||
if (ImageLoader.CacheContainImage(imagePath))
|
||||
{
|
||||
// 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;
|
||||
}
|
||||
|
||||
// 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; }
|
||||
|
|
|
|||
|
|
@ -281,14 +281,24 @@ namespace Flow.Launcher.ViewModel
|
|||
}
|
||||
}
|
||||
|
||||
public IList<UserPlugin> ExternalPlugins
|
||||
public IList<PluginStoreItemViewModel> ExternalPlugins
|
||||
{
|
||||
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
|
||||
{
|
||||
get
|
||||
|
|
@ -314,6 +324,15 @@ namespace Flow.Launcher.ViewModel
|
|||
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
|
||||
|
|
@ -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
|
||||
{
|
||||
get => Settings.WindowSize;
|
||||
|
|
@ -409,6 +472,18 @@ namespace Flow.Launcher.ViewModel
|
|||
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
|
||||
{
|
||||
get => Settings.SettingWindowWidth;
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Mages" Version="2.0.0" />
|
||||
<PackageReference Include="Mages" Version="2.0.1" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
@ -37,7 +37,7 @@ namespace Flow.Launcher.Plugin.PluginsManager
|
|||
contextMenu = new ContextMenu(Context);
|
||||
pluginManager = new PluginsManager(Context, Settings);
|
||||
|
||||
await pluginManager.UpdateManifestAsync();
|
||||
_ = pluginManager.UpdateManifestAsync();
|
||||
}
|
||||
|
||||
public List<Result> LoadContextMenus(Result selectedResult)
|
||||
|
|
@ -74,4 +74,4 @@ namespace Flow.Launcher.Plugin.PluginsManager
|
|||
return Context.API.GetTranslation("plugin_pluginsmanager_plugin_description");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="ini-parser" Version="2.5.2" />
|
||||
<PackageReference Include="System.Runtime" Version="4.3.1" />
|
||||
</ItemGroup>
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
|
||||
<!-- 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_edit">Edit</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_location">Location</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_indexing">Indexing</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_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_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_administrator">Run As Administrator</system:String>
|
||||
|
|
|
|||
|
|
@ -4,10 +4,12 @@
|
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:ui="http://schemas.modernwpf.com/2019"
|
||||
Title="{DynamicResource flowlauncher_plugin_program_suffixes}"
|
||||
Width="400"
|
||||
Width="600"
|
||||
Background="{DynamicResource PopuBGColor}"
|
||||
Foreground="{DynamicResource PopupTextColor}"
|
||||
DataContext="{Binding RelativeSource={RelativeSource Self}}"
|
||||
ResizeMode="NoResize"
|
||||
SizeToContent="Height"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
|
|
@ -15,9 +17,73 @@
|
|||
<WindowChrome.WindowChrome>
|
||||
<WindowChrome CaptionHeight="32" ResizeBorderThickness="{x:Static SystemParameters.WindowResizeBorderThickness}" />
|
||||
</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>
|
||||
<RowDefinition />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="80" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
|
|
@ -55,7 +121,9 @@
|
|||
</Grid>
|
||||
</StackPanel>
|
||||
<StackPanel Margin="26,12,26,0">
|
||||
|
||||
<StackPanel Margin="0,0,0,12">
|
||||
|
||||
<TextBlock
|
||||
Grid.Column="0"
|
||||
Margin="0,0,0,0"
|
||||
|
|
@ -65,10 +133,77 @@
|
|||
TextAlignment="Left" />
|
||||
</StackPanel>
|
||||
<TextBlock
|
||||
Margin="0,0,0,10"
|
||||
FontSize="14"
|
||||
Text="{DynamicResource flowlauncher_plugin_program_only_index_tip}"
|
||||
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>
|
||||
<Border
|
||||
|
|
@ -78,10 +213,17 @@
|
|||
BorderThickness="0,1,0,0">
|
||||
<StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
|
||||
<Button
|
||||
x:Name="btnCancel"
|
||||
x:Name="btnReset"
|
||||
Height="30"
|
||||
MinWidth="140"
|
||||
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"
|
||||
Content="{DynamicResource cancel}" />
|
||||
|
||||
|
|
@ -90,7 +232,7 @@
|
|||
MinWidth="140"
|
||||
Margin="5,0,0,0"
|
||||
HorizontalAlignment="Right"
|
||||
Click="ButtonBase_OnClick"
|
||||
Click="BtnAdd_OnClick"
|
||||
Content="{DynamicResource flowlauncher_plugin_program_update}"
|
||||
Style="{DynamicResource AccentButtonStyle}" />
|
||||
</StackPanel>
|
||||
|
|
|
|||
|
|
@ -1,44 +1,76 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows;
|
||||
|
||||
namespace Flow.Launcher.Plugin.Program
|
||||
{
|
||||
/// <summary>
|
||||
/// ProgramSuffixes.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class ProgramSuffixes
|
||||
{
|
||||
private PluginInitContext context;
|
||||
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)
|
||||
{
|
||||
this.context = context;
|
||||
InitializeComponent();
|
||||
_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)
|
||||
{
|
||||
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");
|
||||
MessageBox.Show(warning);
|
||||
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");
|
||||
MessageBox.Show(msg);
|
||||
_settings.CustomSuffixes = suffixes;
|
||||
_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;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,10 @@ using System.Collections;
|
|||
using System.Diagnostics;
|
||||
using Stopwatch = Flow.Launcher.Infrastructure.Stopwatch;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Channels;
|
||||
using Flow.Launcher.Infrastructure.Image;
|
||||
using IniParser;
|
||||
|
||||
namespace Flow.Launcher.Plugin.Program.Programs
|
||||
{
|
||||
|
|
@ -36,6 +39,7 @@ namespace Flow.Launcher.Plugin.Program.Programs
|
|||
public string Location => ParentDirectory;
|
||||
|
||||
private const string ShortcutExtension = "lnk";
|
||||
private const string UrlExtension = "url";
|
||||
private const string ExeExtension = "exe";
|
||||
|
||||
private static readonly Win32 Default = new Win32()
|
||||
|
|
@ -287,6 +291,45 @@ namespace Flow.Launcher.Plugin.Program.Programs
|
|||
#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)
|
||||
{
|
||||
try
|
||||
|
|
@ -343,10 +386,10 @@ namespace Flow.Launcher.Plugin.Program.Programs
|
|||
{
|
||||
ExeExtension => ExeProgram(x),
|
||||
ShortcutExtension => LnkProgram(x),
|
||||
UrlExtension => UrlProgram(x),
|
||||
_ => Win32Program(x)
|
||||
});
|
||||
|
||||
|
||||
return programs;
|
||||
}
|
||||
|
||||
|
|
@ -365,8 +408,9 @@ namespace Flow.Launcher.Plugin.Program.Programs
|
|||
.Select(x => Extension(x) switch
|
||||
{
|
||||
ShortcutExtension => LnkProgram(x),
|
||||
UrlExtension => UrlProgram(x),
|
||||
_ => Win32Program(x)
|
||||
}).Where(x => x.Valid);
|
||||
});
|
||||
return programs;
|
||||
}
|
||||
|
||||
|
|
@ -504,7 +548,7 @@ namespace Flow.Launcher.Plugin.Program.Programs
|
|||
{
|
||||
var programs = Enumerable.Empty<Win32>();
|
||||
|
||||
var unregistered = UnregisteredPrograms(settings.ProgramSources, settings.ProgramSuffixes);
|
||||
var unregistered = UnregisteredPrograms(settings.ProgramSources, settings.GetSuffixes());
|
||||
|
||||
programs = programs.Concat(unregistered);
|
||||
|
||||
|
|
@ -512,19 +556,19 @@ namespace Flow.Launcher.Plugin.Program.Programs
|
|||
|
||||
if (settings.EnableRegistrySource)
|
||||
{
|
||||
var appPaths = AppPathsPrograms(settings.ProgramSuffixes);
|
||||
var appPaths = AppPathsPrograms(settings.GetSuffixes());
|
||||
autoIndexPrograms = autoIndexPrograms.Concat(appPaths);
|
||||
}
|
||||
|
||||
if (settings.EnableStartMenuSource)
|
||||
{
|
||||
var startMenu = StartMenuPrograms(settings.ProgramSuffixes);
|
||||
var startMenu = StartMenuPrograms(settings.GetSuffixes());
|
||||
autoIndexPrograms = autoIndexPrograms.Concat(startMenu);
|
||||
}
|
||||
|
||||
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.
|
||||
catch (Exception)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using Windows.Foundation.Metadata;
|
||||
|
||||
namespace Flow.Launcher.Plugin.Program
|
||||
{
|
||||
|
|
@ -9,17 +12,109 @@ namespace Flow.Launcher.Plugin.Program
|
|||
public DateTime LastIndexTime { get; set; }
|
||||
public List<ProgramSource> ProgramSources { get; set; } = new List<ProgramSource>();
|
||||
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 EnableDescription { get; set; } = false;
|
||||
public bool HideAppsPath { get; set; } = true;
|
||||
public bool EnableRegistrySource { get; set; } = true;
|
||||
public string CustomizedExplorer { get; set; } = Explorer;
|
||||
public string CustomizedArgs { get; set; } = ExplorerArgs;
|
||||
|
||||
internal const char SuffixSeperator = ';';
|
||||
internal const char SuffixSeparator = ';';
|
||||
|
||||
internal const string Explorer = "explorer";
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ namespace Flow.Launcher.Plugin.Program
|
|||
var text = value as string[];
|
||||
if (text != null)
|
||||
{
|
||||
return string.Join(";", text);
|
||||
return string.Join(Settings.SuffixSeparator, text);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2 KiB |
Loading…
Reference in a new issue