From 3a0594f99b6167873b4b0e6dd3344780685153dc Mon Sep 17 00:00:00 2001 From: Dobin Park Date: Mon, 27 Sep 2021 20:00:46 +0900 Subject: [PATCH 01/57] - Changing Result item and hotkey layout - Add Hightlight Styling - Add New Themes and adjust classic themes --- Flow.Launcher.Core/Resource/Theme.cs | 12 +- .../Converters/HighlightTextConverter.cs | 8 +- Flow.Launcher/Flow.Launcher.csproj | 4 + Flow.Launcher/MainWindow.xaml | 24 +- Flow.Launcher/ResultListBox.xaml | 51 +-- Flow.Launcher/Themes/Base.xaml | 43 +- Flow.Launcher/Themes/BlackAndWhite.xaml | 10 + Flow.Launcher/Themes/BlurBlack Darker.xaml | 8 + Flow.Launcher/Themes/BlurBlack.xaml | 8 + Flow.Launcher/Themes/BlurWhite.xaml | 4 + Flow.Launcher/Themes/Darker.xaml | 8 + Flow.Launcher/Themes/Gray.xaml | 13 + Flow.Launcher/Themes/League.Designer.xaml | 36 ++ Flow.Launcher/Themes/League.xaml | 58 +++ Flow.Launcher/Themes/Light.xaml | 13 + Flow.Launcher/Themes/Metro Server.xaml | 16 +- Flow.Launcher/Themes/Nord Darker.xaml | 8 + Flow.Launcher/Themes/Nord.xaml | 8 + Flow.Launcher/Themes/Pink.xaml | 28 +- Flow.Launcher/Themes/Win11Dark.Designer.xaml | 36 ++ Flow.Launcher/Themes/Win11Dark.xaml | 251 +++++++++++ Flow.Launcher/ViewModel/ResultViewModel.cs | 2 +- Flow.Launcher/ViewModel/ResultsViewModel.cs | 2 +- ...her.Plugin.Explorer_ovmyrfet_wpftmp.csproj | 403 ++++++++++++++++++ 24 files changed, 991 insertions(+), 63 deletions(-) create mode 100644 Flow.Launcher/Themes/League.Designer.xaml create mode 100644 Flow.Launcher/Themes/League.xaml create mode 100644 Flow.Launcher/Themes/Win11Dark.Designer.xaml create mode 100644 Flow.Launcher/Themes/Win11Dark.xaml create mode 100644 Plugins/Flow.Launcher.Plugin.Explorer/Flow.Launcher.Plugin.Explorer_ovmyrfet_wpftmp.csproj diff --git a/Flow.Launcher.Core/Resource/Theme.cs b/Flow.Launcher.Core/Resource/Theme.cs index e70de673e..ac5363a2c 100644 --- a/Flow.Launcher.Core/Resource/Theme.cs +++ b/Flow.Launcher.Core/Resource/Theme.cs @@ -244,7 +244,7 @@ namespace Flow.Launcher.Core.Resource effectSetter.Property = Border.EffectProperty; effectSetter.Value = new DropShadowEffect { - Opacity = 0.9, + Opacity = 0.4, ShadowDepth = 2, BlurRadius = 15 }; @@ -261,7 +261,7 @@ namespace Flow.Launcher.Core.Resource } else { - var baseMargin = (Thickness) marginSetter.Value; + var baseMargin = (Thickness)marginSetter.Value; var newMargin = new Thickness( baseMargin.Left + ShadowExtraMargin, baseMargin.Top + ShadowExtraMargin, @@ -282,8 +282,8 @@ namespace Flow.Launcher.Core.Resource var effectSetter = windowBorderStyle.Setters.FirstOrDefault(setterBase => setterBase is Setter setter && setter.Property == Border.EffectProperty) as Setter; var marginSetter = windowBorderStyle.Setters.FirstOrDefault(setterBase => setterBase is Setter setter && setter.Property == Border.MarginProperty) as Setter; - - if(effectSetter != null) + + if (effectSetter != null) { windowBorderStyle.Setters.Remove(effectSetter); } @@ -371,11 +371,11 @@ namespace Flow.Launcher.Core.Resource private void SetWindowAccent(Window w, AccentState state) { var windowHelper = new WindowInteropHelper(w); - + // this determines the width of the main query window w.Width = mainWindowWidth; windowHelper.EnsureHandle(); - + var accent = new AccentPolicy { AccentState = state }; var accentStructSize = Marshal.SizeOf(accent); diff --git a/Flow.Launcher/Converters/HighlightTextConverter.cs b/Flow.Launcher/Converters/HighlightTextConverter.cs index 006e52320..6bea2092c 100644 --- a/Flow.Launcher/Converters/HighlightTextConverter.cs +++ b/Flow.Launcher/Converters/HighlightTextConverter.cs @@ -1,4 +1,4 @@ -using System; +using System.Windows;using System; using System.Collections.Generic; using System.Globalization; using System.Linq; @@ -6,6 +6,7 @@ using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Data; +using System.Windows.Media; using System.Windows.Documents; namespace Flow.Launcher.Converters @@ -30,7 +31,10 @@ namespace Flow.Launcher.Converters var currentCharacter = text.Substring(i, 1); if (this.ShouldHighlight(highlightData, i)) { - textBlock.Inlines.Add(new Bold(new Run(currentCharacter))); + //textBlock.Inlines.Add(new Bold(new Run(currentCharacter))); + //textBlock.Inlines.Add(new Run(currentCharacter) { Foreground = Brushes.RoyalBlue }); + textBlock.Inlines.Add(new Run(currentCharacter) { Style = (Style)Application.Current.FindResource("HighlightStyle") }); + } else { diff --git a/Flow.Launcher/Flow.Launcher.csproj b/Flow.Launcher/Flow.Launcher.csproj index 529fc52a2..bb3c84eec 100644 --- a/Flow.Launcher/Flow.Launcher.csproj +++ b/Flow.Launcher/Flow.Launcher.csproj @@ -47,7 +47,11 @@ + + + + diff --git a/Flow.Launcher/MainWindow.xaml b/Flow.Launcher/MainWindow.xaml index 83cc016bb..80373e1f8 100644 --- a/Flow.Launcher/MainWindow.xaml +++ b/Flow.Launcher/MainWindow.xaml @@ -31,6 +31,7 @@ + @@ -62,13 +63,13 @@ - + + Margin="16,0,56,0"> @@ -83,24 +84,29 @@ AllowDrop="True" Visibility="Visible" Background="Transparent" - Margin="18,0,56,0"> + Margin="16,0,56,0"> - + - + - + + - + Y1="0" Y2="0" X2="100" Height="2" Width="Auto" StrokeThickness="1"> + + + diff --git a/Flow.Launcher/ResultListBox.xaml b/Flow.Launcher/ResultListBox.xaml index dfee89810..605d0ffa5 100644 --- a/Flow.Launcher/ResultListBox.xaml +++ b/Flow.Launcher/ResultListBox.xaml @@ -20,6 +20,7 @@ IsSynchronizedWithCurrentItem="True" PreviewMouseDown="ListBox_PreviewMouseDown"> + - + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - - - - - + + + + - - - + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +  + + - - - - - + + + + + + + + - + - - - - - - - - + Width="130" Margin="10 0 0 0"> + + + + + + + + + + + + + + +  + - - - - - - - + + + + + + - + - - - - - - - - + Width="130" Margin="10 -2 0 0"> + + + + + + + + + + + + + + +  + - - - + + + + + + + + + + + + +  + + + + - - - + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +  + + + + + + + + + + + - - - - - - + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - -