diff --git a/Flow.Launcher.Infrastructure/Constant.cs b/Flow.Launcher.Infrastructure/Constant.cs index 57b39e46e47..5ace463768d 100644 --- a/Flow.Launcher.Infrastructure/Constant.cs +++ b/Flow.Launcher.Infrastructure/Constant.cs @@ -1,4 +1,4 @@ -using System.Diagnostics; +using System.Diagnostics; using System.IO; using System.Reflection; @@ -21,6 +21,7 @@ public static class Constant public static readonly string PreinstalledDirectory = Path.Combine(ProgramDirectory, Plugins); public const string Issue = "https://github.com/Flow-Launcher/Flow.Launcher/issues/new"; public static readonly string Version = FileVersionInfo.GetVersionInfo(Assembly.Location.NonNull()).ProductVersion; + public static readonly string Dev = "Dev"; public const string Documentation = "https://flowlauncher.com/docs/#/usage-tips"; public static readonly int ThumbnailSize = 64; diff --git a/Flow.Launcher/HotkeyControl.xaml b/Flow.Launcher/HotkeyControl.xaml index 9b5f671d8f5..5a593d20a19 100644 --- a/Flow.Launcher/HotkeyControl.xaml +++ b/Flow.Launcher/HotkeyControl.xaml @@ -38,9 +38,8 @@ FontSize="13" FontWeight="SemiBold" Foreground="{DynamicResource Color05B}" - Visibility="Visible"> - Press key - + Text="{DynamicResource flowlauncherPressHotkey}" + Visibility="Visible" /> @@ -49,8 +48,8 @@ Margin="0,0,18,0" VerticalContentAlignment="Center" input:InputMethod.IsInputMethodEnabled="False" + LostFocus="tbHotkey_LostFocus" PreviewKeyDown="TbHotkey_OnPreviewKeyDown" - TabIndex="100" - LostFocus="tbHotkey_LostFocus"/> + TabIndex="100" /> \ No newline at end of file diff --git a/Flow.Launcher/HotkeyControl.xaml.cs b/Flow.Launcher/HotkeyControl.xaml.cs index 7e07695d8da..d746c8fd25d 100644 --- a/Flow.Launcher/HotkeyControl.xaml.cs +++ b/Flow.Launcher/HotkeyControl.xaml.cs @@ -9,6 +9,7 @@ using Flow.Launcher.Infrastructure.Hotkey; using Flow.Launcher.Plugin; using System.Threading; +using System.Windows.Interop; namespace Flow.Launcher { @@ -113,7 +114,7 @@ public Task SetHotkeyAsync(string keyStr, bool triggerValidate = true) private void tbHotkey_LostFocus(object sender, RoutedEventArgs e) { tbMsg.Text = tbMsgTextOriginal; - tbMsg.Foreground = tbMsgForegroundColorOriginal; + tbMsg.SetResourceReference(TextBox.ForegroundProperty, "Color05B"); } } } diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml index f393af11983..e3312d7880e 100644 --- a/Flow.Launcher/Languages/en.xaml +++ b/Flow.Launcher/Languages/en.xaml @@ -27,7 +27,7 @@ Reset search window position - Flow Launcher Settings + Settings General Portable Mode Store all settings and user data in one folder (Useful when used with removable drives or cloud services). @@ -146,6 +146,7 @@ Show result selection hotkey with results. Custom Query Hotkey Custom Query Shortcut + Built-in Shortcuts Query Shortcut Expanded @@ -163,6 +164,7 @@ You can also quickly adjust this by using Ctrl+[ and Ctrl+]. Use Segoe Fluent Icons Use Segoe Fluent Icons for query results where supported + Press Key HTTP Proxy @@ -186,6 +188,7 @@ Github Docs Version + Icons You have activated Flow Launcher {0} times Check for Updates New version {0} is available, would you like to restart Flow Launcher to use the update? diff --git a/Flow.Launcher/MainWindow.xaml b/Flow.Launcher/MainWindow.xaml index 922f8b9338f..3bf855da7b1 100644 --- a/Flow.Launcher/MainWindow.xaml +++ b/Flow.Launcher/MainWindow.xaml @@ -1,4 +1,5 @@ - - - - - - + + + + - - - - - - - - - - - + + - - - - + - - - - - - - - - - - - + - - - - + + + - - + - - - - + + + + + + + + + + + + + + + - - + + + + + + + + + + - + - + Text="{Binding DateText}" + Visibility="{Binding Settings.UseDate, Converter={StaticResource BooleanToVisibilityConverter}}" /> + - - - - - - - + + + - @@ -306,16 +335,14 @@ - - - + + + - @@ -323,16 +350,14 @@ - - - + + + - diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs index 6a65a38f2ae..747509d7776 100644 --- a/Flow.Launcher/MainWindow.xaml.cs +++ b/Flow.Launcher/MainWindow.xaml.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.ComponentModel; using System.Threading.Tasks; using System.Windows; @@ -27,6 +27,9 @@ using System.IO; using System.Windows.Threading; using System.Windows.Data; +using ModernWpf.Controls; +using System.Drawing; +using System.Windows.Forms.Design.Behavior; namespace Flow.Launcher { @@ -224,11 +227,12 @@ private void InitializePosition() 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("PositionReset"); - ((MenuItem)menu.Items[4]).Header = InternationalizationManager.Instance.GetTranslation("iconTraySettings"); - ((MenuItem)menu.Items[5]).Header = InternationalizationManager.Instance.GetTranslation("iconTrayExit"); + ((MenuItem)menu.Items[0]).Header = InternationalizationManager.Instance.GetTranslation("iconTrayOpen") + " (" + _settings.Hotkey + ")"; + ((MenuItem)menu.Items[1]).Header = InternationalizationManager.Instance.GetTranslation("GameMode"); + ((MenuItem)menu.Items[2]).Header = InternationalizationManager.Instance.GetTranslation("PositionReset"); + ((MenuItem)menu.Items[3]).Header = InternationalizationManager.Instance.GetTranslation("iconTraySettings"); + ((MenuItem)menu.Items[4]).Header = InternationalizationManager.Instance.GetTranslation("iconTrayExit"); + } private void InitializeNotifyIcon() @@ -240,31 +244,35 @@ private void InitializeNotifyIcon() Visible = !_settings.HideNotifyIcon }; contextMenu = new ContextMenu(); - - var header = new MenuItem - { - Header = "Flow Launcher", - IsEnabled = false - }; + var openIcon = new FontIcon { Glyph = "\ue71e" }; var open = new MenuItem { - Header = InternationalizationManager.Instance.GetTranslation("iconTrayOpen") + " (" +_settings.Hotkey + ")" + Header = InternationalizationManager.Instance.GetTranslation("iconTrayOpen") + " (" + _settings.Hotkey + ")", + Icon = openIcon }; + var gamemodeIcon = new FontIcon { Glyph = "\ue7fc" }; var gamemode = new MenuItem { - Header = InternationalizationManager.Instance.GetTranslation("GameMode") + Header = InternationalizationManager.Instance.GetTranslation("GameMode"), + Icon = gamemodeIcon }; + var positionresetIcon = new FontIcon { Glyph = "\ue73f" }; var positionreset = new MenuItem { - Header = InternationalizationManager.Instance.GetTranslation("PositionReset") + Header = InternationalizationManager.Instance.GetTranslation("PositionReset"), + Icon = positionresetIcon }; + var settingsIcon = new FontIcon { Glyph = "\ue713" }; var settings = new MenuItem { - Header = InternationalizationManager.Instance.GetTranslation("iconTraySettings") + Header = InternationalizationManager.Instance.GetTranslation("iconTraySettings"), + Icon = settingsIcon }; + var exitIcon = new FontIcon { Glyph = "\ue7e8" }; var exit = new MenuItem { - Header = InternationalizationManager.Instance.GetTranslation("iconTrayExit") + Header = InternationalizationManager.Instance.GetTranslation("iconTrayExit"), + Icon = exitIcon }; open.Click += (o, e) => _viewModel.ToggleFlowLauncher(); @@ -272,7 +280,6 @@ private void InitializeNotifyIcon() 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"); diff --git a/Flow.Launcher/Resources/CustomControlTemplate.xaml b/Flow.Launcher/Resources/CustomControlTemplate.xaml index 6e82940313a..07897361c9e 100644 --- a/Flow.Launcher/Resources/CustomControlTemplate.xaml +++ b/Flow.Launcher/Resources/CustomControlTemplate.xaml @@ -1407,7 +1407,8 @@ Padding="{TemplateBinding Padding}" BorderBrush="{DynamicResource ButtonInsideBorder}" BorderThickness="{DynamicResource CustomButtonInsideBorderThickness}" - CornerRadius="4"> + CornerRadius="4" + SnapsToDevicePixels="True"> - + + - + + + + + diff --git a/Flow.Launcher/Resources/Dark.xaml b/Flow.Launcher/Resources/Dark.xaml index 674e04debc2..a5eec29ab49 100644 --- a/Flow.Launcher/Resources/Dark.xaml +++ b/Flow.Launcher/Resources/Dark.xaml @@ -65,7 +65,8 @@ - + + diff --git a/Flow.Launcher/Resources/Light.xaml b/Flow.Launcher/Resources/Light.xaml index 8b04196dda0..a78b14d65ee 100644 --- a/Flow.Launcher/Resources/Light.xaml +++ b/Flow.Launcher/Resources/Light.xaml @@ -58,7 +58,8 @@ - + + diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index 188d3427e9b..5584983a9c4 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -15,7 +15,7 @@ Title="{DynamicResource flowlauncher_settings}" Width="{Binding SettingWindowWidth, Mode=TwoWay}" Height="{Binding SettingWindowHeight, Mode=TwoWay}" - MinWidth="900" + MinWidth="940" MinHeight="600" d:DataContext="{d:DesignInstance vm:SettingWindowViewModel}" Closed="OnClosed" @@ -98,6 +98,7 @@ - -