diff --git a/.cm/gitstream.cm b/.cm/gitstream.cm index c372f5a6c..eee43c969 100644 --- a/.cm/gitstream.cm +++ b/.cm/gitstream.cm @@ -32,12 +32,12 @@ automations: args: comment: | This PR is {{ changes.ratio }}% new code. - # Post a comment that request changes for a PR that contains a TODO statement. + # Post a comment notifying that the PR contains a TODO statement. review_todo_comments: if: - - {{ source.diff.files | matchDiffLines(regex=r/^[+].*(TODO)|(todo)/) | some }} + - {{ source.diff.files | matchDiffLines(regex=r/^[+].*\b(TODO|todo)\b/) | some }} run: - - action: request-changes@v1 + - action: add-comment@v1 args: comment: | This PR contains a TODO statement. Please check to see if they should be removed. @@ -76,4 +76,4 @@ changes: has: screenshot_link: {{ pr.description | includes(regex=r/!\[.*\]\(.*(jpg|svg|png|gif|psd).*\)/) }} - image_uploaded: {{ pr.description | includes(regex=r//) }} \ No newline at end of file + image_uploaded: {{ pr.description | includes(regex=r//) }} diff --git a/Flow.Launcher.Core/Flow.Launcher.Core.csproj b/Flow.Launcher.Core/Flow.Launcher.Core.csproj index b653ec27e..8ec73bfcd 100644 --- a/Flow.Launcher.Core/Flow.Launcher.Core.csproj +++ b/Flow.Launcher.Core/Flow.Launcher.Core.csproj @@ -54,11 +54,10 @@ - - - - + + + diff --git a/Flow.Launcher.Infrastructure/Flow.Launcher.Infrastructure.csproj b/Flow.Launcher.Infrastructure/Flow.Launcher.Infrastructure.csproj index 7d6448c43..3a8e07b4a 100644 --- a/Flow.Launcher.Infrastructure/Flow.Launcher.Infrastructure.csproj +++ b/Flow.Launcher.Infrastructure/Flow.Launcher.Infrastructure.csproj @@ -49,13 +49,13 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/Flow.Launcher.Infrastructure/UserSettings/Point2D.cs b/Flow.Launcher.Infrastructure/UserSettings/Point2D.cs new file mode 100644 index 000000000..4c47ba6c0 --- /dev/null +++ b/Flow.Launcher.Infrastructure/UserSettings/Point2D.cs @@ -0,0 +1,46 @@ +using System; + +namespace Flow.Launcher.Infrastructure.UserSettings; + +public record struct Point2D(double X, double Y) +{ + public static implicit operator Point2D((double X, double Y) point) + { + return new Point2D(point.X, point.Y); + } + + public static Point2D operator +(Point2D point1, Point2D point2) + { + return new Point2D(point1.X + point2.X, point1.Y + point2.Y); + } + + public static Point2D operator -(Point2D point1, Point2D point2) + { + return new Point2D(point1.X - point2.X, point1.Y - point2.Y); + } + + public static Point2D operator *(Point2D point, double scalar) + { + return new Point2D(point.X * scalar, point.Y * scalar); + } + + public static Point2D operator /(Point2D point, double scalar) + { + return new Point2D(point.X / scalar, point.Y / scalar); + } + + public static Point2D operator /(Point2D point1, Point2D point2) + { + return new Point2D(point1.X / point2.X, point1.Y / point2.Y); + } + + public static Point2D operator *(Point2D point1, Point2D point2) + { + return new Point2D(point1.X * point2.X, point1.Y * point2.Y); + } + + public Point2D Clamp(Point2D min, Point2D max) + { + return new Point2D(Math.Clamp(X, min.X, max.X), Math.Clamp(Y, min.Y, max.Y)); + } +} diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs index 0c7de10fd..125447d83 100644 --- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs +++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs @@ -205,8 +205,10 @@ namespace Flow.Launcher.Infrastructure.UserSettings public bool AutoUpdates { get; set; } = false; - public double WindowLeft { get; set; } - public double WindowTop { get; set; } + + public Point2D WindowPosition { get; set; } + public Point2D PreviousScreen { get; set; } + public Point2D PreviousDpi { get; set; } /// /// Custom left position on selected monitor diff --git a/Flow.Launcher.Test/Flow.Launcher.Test.csproj b/Flow.Launcher.Test/Flow.Launcher.Test.csproj index 724fd1865..696b85ece 100644 --- a/Flow.Launcher.Test/Flow.Launcher.Test.csproj +++ b/Flow.Launcher.Test/Flow.Launcher.Test.csproj @@ -55,7 +55,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + \ No newline at end of file diff --git a/Flow.Launcher/Languages/fr.xaml b/Flow.Launcher/Languages/fr.xaml index a30fa0b19..65a41cbf3 100644 --- a/Flow.Launcher/Languages/fr.xaml +++ b/Flow.Launcher/Languages/fr.xaml @@ -178,8 +178,8 @@ Personnalisé Heure Date - This theme supports two(light/dark) modes. - This theme supports Blur Transparent Background. + Ce thème prend en charge deux modes (clair/sombre). + Ce thème prend en charge l'arrière-plan flou et transparent. diff --git a/Flow.Launcher/Languages/sk.xaml b/Flow.Launcher/Languages/sk.xaml index ef5fbd716..079c03e80 100644 --- a/Flow.Launcher/Languages/sk.xaml +++ b/Flow.Launcher/Languages/sk.xaml @@ -54,7 +54,7 @@ Ponechať Označiť Vymazať - Fixed Window Height + Pevná výška okna Výška okna sa nedá nastaviť ťahaním. Maximum výsledkov Túto hodnotu môžete rýchlo upraviť aj pomocou klávesových skratiek CTRL + znamienko plus (+) a CTRL + znamienko mínus (-). @@ -146,13 +146,13 @@ Spúšťanie programov ako správca alebo iný používateľ ProcessKiller Ukončenie nežiaducich procesov - Search Bar Height - Item Height + Výška vyhľadávacieho panela + Výška položky Písmo vyhľadávacieho poľa - Result Title Font - Result Subtitle Font + Písmo nadpisu výsledku + Písmo podnadpisu výsledku Resetovať - Customize + Prispôsobiť Režim okno Nepriehľadnosť Motív {0} neexistuje, použije sa predvolený motív diff --git a/Flow.Launcher/Languages/vi.xaml b/Flow.Launcher/Languages/vi.xaml index 312dbbb76..b7804381b 100644 --- a/Flow.Launcher/Languages/vi.xaml +++ b/Flow.Launcher/Languages/vi.xaml @@ -213,10 +213,10 @@ Chạy với quyền admin Refresh Search Results Dữ liệu plugin không tải - Quick Adjust Window Width - Quick Adjust Window Height - Use when require plugins to reload and update their existing data. - You can add one more hotkey for this function. + Điều chỉnh nhanh độ rộng cửa sổ + Điều chỉnh nhanh chiều cao cửa sổ + Sử dụng khi yêu cầu plugin tải lại và cập nhật dữ liệu hiện có của chúng. + Bạn có thể thêm một phím nóng nữa cho chức năng này. Phím tắt truy vấn tùy chỉnh Lối tắt truy vấn tùy chỉnh Phím tắt tích hợp @@ -283,9 +283,9 @@ Xóa tệp nhật ký Bạn có chắc chắn muốn xóa tất cả nhật ký không? Wizard - User Data Location - User settings and installed plugins are saved in the user data folder. This location may vary depending on whether it's in portable mode or not. - Open Folder + Vị trí dữ liệu người dùng + Thiết đặt người dùng và plugin đã cài đặt sẽ được lưu trong thư mục dữ liệu người dùng. Vị trí này có thể thay đổi tùy thuộc vào việc nó có ở chế độ di động hay không. + Mở thư mục Chọn trình quản lý tệp @@ -332,7 +332,7 @@ Tổ hợp phím plugin không hợp lệ Cập nhật Binding Hotkey - Current hotkey is unavailable. + Phím nóng hiện tại không có sẵn. This hotkey is reserved for "{0}" and can't be used. Please choose another hotkey. This hotkey is already in use by "{0}". If you press "Overwrite", it will be removed from "{0}". Press the keys you want to use for this function. @@ -429,10 +429,10 @@ Mở cửa sổ cài đặt Dữ liệu plugin không tải - Select first result - Select last result - Run current query again - Open result + Chọn kết quả đầu tiên + Chọn kết quả cuối cùng + Chạy lại truy vấn hiện tại + Mở kết quả Open result #{0} Thời Tiết @@ -445,7 +445,7 @@ Ghi chú - File Size - Created - Last Modified + Kích thước tệp + Đã tạo + Sửa đổi lần cuối diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs index 60048d070..4027e7698 100644 --- a/Flow.Launcher/MainWindow.xaml.cs +++ b/Flow.Launcher/MainWindow.xaml.cs @@ -72,11 +72,7 @@ namespace Flow.Launcher }; } - DispatcherTimer timer = new DispatcherTimer - { - Interval = new TimeSpan(0, 0, 0, 0, 500), - IsEnabled = false - }; + DispatcherTimer timer = new DispatcherTimer { Interval = new TimeSpan(0, 0, 0, 0, 500), IsEnabled = false }; public MainWindow() { @@ -87,6 +83,7 @@ namespace Flow.Launcher private const int WM_EXITSIZEMOVE = 0x0232; private int _initialWidth; private int _initialHeight; + private IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) { if (msg == WM_ENTERSIZEMOVE) @@ -95,18 +92,22 @@ namespace Flow.Launcher _initialHeight = (int)Height; handled = true; } + if (msg == WM_EXITSIZEMOVE) { - if ( _initialHeight != (int)Height) + if (_initialHeight != (int)Height) { OnResizeEnd(); } + if (_initialWidth != (int)Width) { FlowMainWindow.SizeToContent = SizeToContent.Height; } + handled = true; } + return IntPtr.Zero; } @@ -131,6 +132,7 @@ namespace Flow.Launcher _settings.MaxResultsToShow = Convert.ToInt32(Math.Truncate(itemCount)); } } + FlowMainWindow.SizeToContent = SizeToContent.Height; _viewModel.MainWindowWidth = Width; } @@ -175,6 +177,7 @@ namespace Flow.Launcher private void OnInitialized(object sender, EventArgs e) { } + private void OnLoaded(object sender, RoutedEventArgs _) { // MouseEventHandler @@ -206,6 +209,7 @@ namespace Flow.Launcher { SoundPlay(); } + UpdatePosition(); PreviewReset(); Activate(); @@ -217,7 +221,8 @@ namespace Flow.Launcher _viewModel.LastQuerySelected = true; } - if (_viewModel.ProgressBarVisibility == Visibility.Visible && isProgressBarStoryboardPaused) + if (_viewModel.ProgressBarVisibility == Visibility.Visible && + isProgressBarStoryboardPaused) { _progressBarStoryboard.Begin(ProgressBar, true); isProgressBarStoryboardPaused = false; @@ -258,9 +263,12 @@ namespace Flow.Launcher MoveQueryTextToEnd(); _viewModel.QueryTextCursorMovedToEnd = false; } + break; case nameof(MainViewModel.GameModeStatus): - _notifyIcon.Icon = _viewModel.GameModeStatus ? Properties.Resources.gamemode : Properties.Resources.app; + _notifyIcon.Icon = _viewModel.GameModeStatus + ? Properties.Resources.gamemode + : Properties.Resources.app; break; } }; @@ -278,11 +286,8 @@ namespace Flow.Launcher case nameof(Settings.Hotkey): UpdateNotifyIconText(); break; - case nameof(Settings.WindowLeft): - Left = _settings.WindowLeft; - break; - case nameof(Settings.WindowTop): - Top = _settings.WindowTop; + case nameof(Settings.WindowPosition): + (Left, Top) = _settings.WindowPosition; break; } }; @@ -292,8 +297,24 @@ namespace Flow.Launcher { if (_settings.SearchWindowScreen == SearchWindowScreens.RememberLastLaunchLocation) { - Top = _settings.WindowTop; - Left = _settings.WindowLeft; + var previousScreen = _settings.PreviousScreen; + + var previousDpi = _settings.PreviousDpi; + + _settings.PreviousScreen = (SystemParameters.VirtualScreenWidth, SystemParameters.VirtualScreenHeight); + + var currentDpi = GetDpi(); + + if (previousScreen == default || + previousDpi == default || + (previousScreen != (SystemParameters.VirtualScreenWidth, SystemParameters.VirtualScreenHeight) || + previousDpi != currentDpi)) + { + AdjustPositionForResolutionChange(); + return; + } + + (Left, Top) = _settings.WindowPosition; } else { @@ -306,34 +327,72 @@ namespace Flow.Launcher break; case SearchWindowAligns.CenterTop: Left = HorizonCenter(screen); - Top = 10; + Top = VerticalTop(screen); break; case SearchWindowAligns.LeftTop: Left = HorizonLeft(screen); - Top = 10; + Top = VerticalTop(screen); break; case SearchWindowAligns.RightTop: Left = HorizonRight(screen); - Top = 10; + Top = VerticalTop(screen); break; case SearchWindowAligns.Custom: - Left = WindowsInteropHelper.TransformPixelsToDIP(this, screen.WorkingArea.X + _settings.CustomWindowLeft, 0).X; - Top = WindowsInteropHelper.TransformPixelsToDIP(this, 0, screen.WorkingArea.Y + _settings.CustomWindowTop).Y; + var customLeft = WindowsInteropHelper.TransformPixelsToDIP(this, + screen.WorkingArea.X + _settings.CustomWindowLeft, 0); + var customTop = WindowsInteropHelper.TransformPixelsToDIP(this, 0, + screen.WorkingArea.Y + _settings.CustomWindowTop); + Left = customLeft.X; + Top = customTop.Y; break; } } + } + private void AdjustPositionForResolutionChange() + { + Point2D screenBound = (SystemParameters.VirtualScreenWidth, SystemParameters.VirtualScreenHeight); + + var currentDpi = GetDpi(); + + var previousPosition = _settings.WindowPosition; + + var ratio = screenBound / _settings.PreviousScreen; + + var dpiRatio = currentDpi / _settings.PreviousDpi; + + var newPosition = previousPosition * ratio * dpiRatio; + + Point2D minPosition = (SystemParameters.VirtualScreenLeft, SystemParameters.VirtualScreenTop); + + var maxPosition = minPosition + screenBound - (ActualWidth, ActualHeight); + + (Left, Top) = newPosition.Clamp(minPosition, maxPosition); + } + + private Point2D GetDpi() + { + PresentationSource source = PresentationSource.FromVisual(this); + Point2D point = (96, 96); + if (source is { CompositionTarget: not null }) + { + Matrix m = source.CompositionTarget.TransformToDevice; + point.X = 96 * m.M11; + point.Y = 96 * m.M22; + } + + return point; } private void UpdateNotifyIconText() { var menu = contextMenu; - ((MenuItem)menu.Items[0]).Header = InternationalizationManager.Instance.GetTranslation("iconTrayOpen") + " (" + _settings.Hotkey + ")"; + ((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() @@ -345,50 +404,34 @@ namespace Flow.Launcher Visible = !_settings.HideNotifyIcon }; - var openIcon = new FontIcon - { - Glyph = "\ue71e" - }; + 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 gamemodeIcon = new FontIcon { Glyph = "\ue7fc" }; var gamemode = new MenuItem { - Header = InternationalizationManager.Instance.GetTranslation("GameMode"), - Icon = gamemodeIcon - }; - var positionresetIcon = new FontIcon - { - Glyph = "\ue73f" + Header = InternationalizationManager.Instance.GetTranslation("GameMode"), Icon = gamemodeIcon }; + var positionresetIcon = new FontIcon { Glyph = "\ue73f" }; var positionreset = new MenuItem { Header = InternationalizationManager.Instance.GetTranslation("PositionReset"), Icon = positionresetIcon }; - var settingsIcon = new FontIcon - { - Glyph = "\ue713" - }; + var settingsIcon = new FontIcon { Glyph = "\ue713" }; var settings = new MenuItem { Header = InternationalizationManager.Instance.GetTranslation("iconTraySettings"), Icon = settingsIcon }; - var exitIcon = new FontIcon - { - Glyph = "\ue7e8" - }; + var exitIcon = new FontIcon { Glyph = "\ue7e8" }; var exit = new MenuItem { - Header = InternationalizationManager.Instance.GetTranslation("iconTrayExit"), - Icon = exitIcon + Header = InternationalizationManager.Instance.GetTranslation("iconTrayExit"), Icon = exitIcon }; open.Click += (o, e) => _viewModel.ToggleFlowLauncher(); @@ -421,6 +464,7 @@ namespace Flow.Launcher { _ = SetForegroundWindow(hwndSource.Handle); } + contextMenu.Focus(); break; } @@ -454,8 +498,10 @@ namespace Flow.Launcher private void InitProgressbarAnimation() { - var da = new DoubleAnimation(ProgressBar.X2, ActualWidth + 100, new Duration(new TimeSpan(0, 0, 0, 0, 1600))); - var da1 = new DoubleAnimation(ProgressBar.X1, ActualWidth + 0, new Duration(new TimeSpan(0, 0, 0, 0, 1600))); + var da = new DoubleAnimation(ProgressBar.X2, ActualWidth + 100, + new Duration(new TimeSpan(0, 0, 0, 0, 1600))); + var da1 = new DoubleAnimation(ProgressBar.X1, ActualWidth + 0, + new Duration(new TimeSpan(0, 0, 0, 0, 1600))); Storyboard.SetTargetProperty(da, new PropertyPath("(Line.X2)")); Storyboard.SetTargetProperty(da1, new PropertyPath("(Line.X1)")); _progressBarStoryboard.Children.Add(da); @@ -557,14 +603,14 @@ namespace Flow.Launcher iconsb.Children.Add(IconOpacity); windowsb.Completed += (_, _) => _animating = false; - _settings.WindowLeft = Left; - _settings.WindowTop = Top; + _settings.WindowPosition = (Left, Top); isArrowKeyPressed = false; if (QueryTextBox.Text.Length == 0) { clocksb.Begin(ClockPanel); } + iconsb.Begin(SearchIcon); windowsb.Begin(FlowMainWindow); } @@ -618,8 +664,7 @@ namespace Flow.Launcher private async void OnDeactivated(object sender, EventArgs e) { - _settings.WindowLeft = Left; - _settings.WindowTop = Top; + _settings.WindowPosition = (Left, Top); //This condition stops extra hide call when animator is on, // which causes the toggling to occasional hide instead of show. if (_viewModel.MainWindowVisibilityStatus) @@ -650,8 +695,7 @@ namespace Flow.Launcher return; if (_settings.SearchWindowScreen == SearchWindowScreens.RememberLastLaunchLocation) { - _settings.WindowLeft = Left; - _settings.WindowTop = Top; + _settings.WindowPosition = (Left, Top); } } @@ -671,7 +715,7 @@ namespace Flow.Launcher public Screen SelectedScreen() { Screen screen = null; - switch(_settings.SearchWindowScreen) + switch (_settings.SearchWindowScreen) { case SearchWindowScreens.Cursor: screen = Screen.FromPoint(System.Windows.Forms.Cursor.Position); @@ -693,6 +737,7 @@ namespace Flow.Launcher screen = Screen.AllScreens[0]; break; } + return screen ?? Screen.AllScreens[0]; } @@ -727,6 +772,13 @@ namespace Flow.Launcher return left; } + public double VerticalTop(Screen screen) + { + var dip1 = WindowsInteropHelper.TransformPixelsToDIP(this, 0, screen.WorkingArea.Y); + var top = dip1.Y + 10; + return top; + } + /// /// Register up and down key /// todo: any way to put this in xaml ? @@ -762,6 +814,7 @@ namespace Flow.Launcher _viewModel.LoadContextMenuCommand.Execute(null); e.Handled = true; } + break; case Key.Left: if (!_viewModel.SelectedIsFromQueryResults() && QueryTextBox.CaretIndex == 0) @@ -769,6 +822,7 @@ namespace Flow.Launcher _viewModel.EscCommand.Execute(null); e.Handled = true; } + break; case Key.Back: if (specialKeyState.CtrlPressed) @@ -787,12 +841,13 @@ namespace Flow.Launcher } } } + break; default: break; - } } + private void OnKeyUp(object sender, KeyEventArgs e) { if (e.Key == Key.Up || e.Key == Key.Down) @@ -808,6 +863,7 @@ namespace Flow.Launcher e.Handled = true; // Ignore Mouse Hover when press Arrowkeys } } + public void PreviewReset() { _viewModel.ResetPreview(); diff --git a/Flow.Launcher/SettingWindow.xaml.cs b/Flow.Launcher/SettingWindow.xaml.cs index de4fd1f91..99c363222 100644 --- a/Flow.Launcher/SettingWindow.xaml.cs +++ b/Flow.Launcher/SettingWindow.xaml.cs @@ -112,23 +112,45 @@ public partial class SettingWindow { if (_settings.SettingWindowTop == null || _settings.SettingWindowLeft == null) { - Top = WindowTop(); - Left = WindowLeft(); + SetWindowPosition(WindowTop(), WindowLeft()); } else { - Top = _settings.SettingWindowTop.Value; - Left = _settings.SettingWindowLeft.Value; + double left = _settings.SettingWindowLeft.Value; + double top = _settings.SettingWindowTop.Value; + AdjustWindowPosition(ref top, ref left); + SetWindowPosition(top, left); } WindowState = _settings.SettingWindowState; } + private void SetWindowPosition(double top, double left) + { + // Ensure window does not exceed screen boundaries + top = Math.Max(top, SystemParameters.VirtualScreenTop); + left = Math.Max(left, SystemParameters.VirtualScreenLeft); + top = Math.Min(top, SystemParameters.VirtualScreenHeight - ActualHeight); + left = Math.Min(left, SystemParameters.VirtualScreenWidth - ActualWidth); + + Top = top; + Left = left; + } + + private void AdjustWindowPosition(ref double top, ref double left) + { + // Adjust window position if it exceeds screen boundaries + top = Math.Max(top, SystemParameters.VirtualScreenTop); + left = Math.Max(left, SystemParameters.VirtualScreenLeft); + top = Math.Min(top, SystemParameters.VirtualScreenHeight - ActualHeight); + left = Math.Min(left, SystemParameters.VirtualScreenWidth - ActualWidth); + } + private double WindowLeft() { 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 - this.ActualWidth) / 2 + dip1.X; + var left = (dip2.X - ActualWidth) / 2 + dip1.X; return left; } @@ -137,7 +159,7 @@ public partial class SettingWindow var screen = Screen.FromPoint(System.Windows.Forms.Cursor.Position); var dip1 = WindowsInteropHelper.TransformPixelsToDIP(this, 0, screen.WorkingArea.Y); var dip2 = WindowsInteropHelper.TransformPixelsToDIP(this, 0, screen.WorkingArea.Height); - var top = (dip2.Y - this.ActualHeight) / 2 + dip1.Y - 20; + var top = (dip2.Y - ActualHeight) / 2 + dip1.Y; return top; } diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs index 6c17e21f0..5756e46ae 100644 --- a/Flow.Launcher/ViewModel/MainViewModel.cs +++ b/Flow.Launcher/ViewModel/MainViewModel.cs @@ -547,20 +547,20 @@ namespace Flow.Launcher.ViewModel private void IncreaseWidth() { Settings.WindowSize += 100; - Settings.WindowLeft -= 50; + Settings.WindowPosition -= (50, 0); OnPropertyChanged(nameof(MainWindowWidth)); } [RelayCommand] private void DecreaseWidth() { - if (MainWindowWidth - 100 < 400 || Settings.WindowSize == 400) + if (MainWindowWidth - 100 < 400 || Math.Abs(Settings.WindowSize - 400) < 0.01) { Settings.WindowSize = 400; } else { - Settings.WindowLeft += 50; + Settings.WindowPosition += (50, 0); Settings.WindowSize -= 100; } diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Flow.Launcher.Plugin.BrowserBookmark.csproj b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Flow.Launcher.Plugin.BrowserBookmark.csproj index 234afe28a..9177813f4 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Flow.Launcher.Plugin.BrowserBookmark.csproj +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Flow.Launcher.Plugin.BrowserBookmark.csproj @@ -95,7 +95,7 @@ - + diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/fr.xaml b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/fr.xaml index ab1d1f4c9..4ff56e85e 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/fr.xaml +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/fr.xaml @@ -151,8 +151,8 @@ Il peut être très lent sans index (qui n'est supporté que dans Everything v1.5+). - Native Context Menu - Display native context menu (experimental) - Below you can specify items you want to include in the context menu, they can be partial (e.g. 'pen wit') or complete ('Open with'). - Below you can specify items you want to exclude from context menu, they can be partial (e.g. 'pen wit') or complete ('Open with') + Menu contextuel natif + Afficher le menu contextuel natif (expérimental) + Ci-dessous, vous pouvez spécifier les éléments que vous souhaitez inclure dans le menu contextuel. Ils peuvent être partiels ('pen wit') ou complets ('Ouvrir avec'). + Vous pouvez spécifier ci-dessous les éléments que vous souhaitez exclure du menu contextuel. Ces éléments peuvent être partiels ('pen wit') ou complets ('Open with'). diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/pt-pt.xaml b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/pt-pt.xaml index c43ea6231..106d75c45 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/pt-pt.xaml +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/pt-pt.xaml @@ -151,8 +151,8 @@ Pode ser muito lento sem índice (que apenas existe em Everything v1.5+) - Native Context Menu - Display native context menu (experimental) - Below you can specify items you want to include in the context menu, they can be partial (e.g. 'pen wit') or complete ('Open with'). - Below you can specify items you want to exclude from context menu, they can be partial (e.g. 'pen wit') or complete ('Open with') + Menu de contexto nativo + Mostrar menu de contexto nativo (experimental) + Aqui pode especificar os itens a incluir no menu de contexto. Podem ser parciais (ex.: 'brir co') ou completos ('Abrir com'). + Aqui pode especificar os itens a excluir do menu de contexto. Podem ser parciais (ex.: 'brir co') ou completos ('Abrir com'). diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/vi.xaml b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/vi.xaml index c8039c677..68c56f584 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/vi.xaml +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/vi.xaml @@ -27,12 +27,12 @@ Tùy chỉnh từ khóa hành động Liên kết truy cập nhanh Cài đặt mọi thứ - Preview Panel + Bảng xem trước Kích thước Date Created Date Modified - Display File Info - Date and time format + Hiển thị thông tin tệp + Định dạng ngày và giờ Tùy Chọn Sắp Xếp Đường dẫn mọi thứ: Khởi chạy ẩn @@ -53,29 +53,29 @@ Đã bật Khi bị tắt, Flow sẽ không thực thi tùy chọn tìm kiếm này và sẽ hoàn nguyên về '*' để giải phóng từ khóa hành động Tất cả mọi thứ - Windows Index - Direct Enumeration - File Editor Path + Chỉ mục Windows + Đếm trực tiếp + Đường dẫn trình soạn thảo tệp Folder Editor Path - Content Search Engine + Công cụ tìm kiếm nội dung Directory Recursive Search Engine - Index Search Engine + Công cụ tìm kiếm chỉ mục Mở tùy chọn lập chỉ mục Windows Thư mục - Find and manage files and folders via Windows Search or Everything + Tìm và quản lý tệp và thư mục thông qua Windows Search hoặc Everything - Ctrl + Enter to open the directory - Ctrl + Enter to open the containing folder + Ctrl + Enter để mở thư mục + Ctrl + Enter để mở thư mục chứa Copy đường dẫn - Copy path of current item to clipboard + Sao chép đường dẫn của mục hiện tại vào clipboard Sao chép - Copy current file to clipboard + Sao chép tập tin hiện tại vào clipboard Copy current folder to clipboard Xóa Permanently delete current file @@ -88,7 +88,7 @@ Open the location that contains current item Mở bằng trình chỉnh sửa: Failed to open file at {0} with Editor {1} at {2} - Open With Shell: + Mở bằng Shell: Failed to open folder {0} with Shell {1} at {2} Loại trừ các thư mục hiện tại và thư mục con khỏi Tìm kiếm chỉ mục Bị loại trừ khỏi Tìm kiếm chỉ mục diff --git a/Plugins/Flow.Launcher.Plugin.Program/Languages/vi.xaml b/Plugins/Flow.Launcher.Plugin.Program/Languages/vi.xaml index 92687641a..8038427ca 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Languages/vi.xaml +++ b/Plugins/Flow.Launcher.Plugin.Program/Languages/vi.xaml @@ -44,10 +44,10 @@ Hãy chọn một nguồn dữ liệu Bạn có chắc chắn là muốn xóa các đặt hàng đã chọn? - Another program source with the same location already exists. + Đã tồn tại một nguồn chương trình khác có cùng vị trí. - Program Source - Edit directory and status of this program source. + Nguồn chương trình + Chỉnh sửa thư mục và trạng thái của nguồn chương trình này. Cập nhật Program Plugin will only index files with selected suffixes and .url files with selected protocols. @@ -73,7 +73,7 @@ Chạy với quyền quản trị Mở thư mục chứa Vô hiệu hóa chương trình này hiển thị - Open target folder + Mở thư mục đích Chương trình Tìm kiếm chương trình trong Flow Launcher diff --git a/Plugins/Flow.Launcher.Plugin.Shell/Languages/vi.xaml b/Plugins/Flow.Launcher.Plugin.Shell/Languages/vi.xaml index 22d909686..1a0d55e66 100644 --- a/Plugins/Flow.Launcher.Plugin.Shell/Languages/vi.xaml +++ b/Plugins/Flow.Launcher.Plugin.Shell/Languages/vi.xaml @@ -2,8 +2,8 @@ Thay thế Win + R - Close Command Prompt after pressing any key - Press any key to close this window... + Đóng Command Prompt sau khi nhấn phím bất kỳ + Nhấn phím bất kỳ để đóng cửa sổ này... Không đóng dấu nhắc lệnh sau khi thực hiện lệnh Luôn chạy với tư cách quản trị viên Xóa lựa chọn đã chọn diff --git a/Plugins/Flow.Launcher.Plugin.WindowsSettings/Properties/Resources.vi-VN.resx b/Plugins/Flow.Launcher.Plugin.WindowsSettings/Properties/Resources.vi-VN.resx index 851470744..1ec616d9d 100644 --- a/Plugins/Flow.Launcher.Plugin.WindowsSettings/Properties/Resources.vi-VN.resx +++ b/Plugins/Flow.Launcher.Plugin.WindowsSettings/Properties/Resources.vi-VN.resx @@ -1132,7 +1132,7 @@ Area Control Panel (legacy settings) - Pen and touch + Bút và cảm ứng Area Control Panel (legacy settings) @@ -1144,15 +1144,15 @@ Area Control Panel (legacy settings) - Performance information and tools + Thông tin hiệu suất và công cụ Area Control Panel (legacy settings) - Permissions and history + Quyền và lịch sử Area Cortana - Personalization (category) + Cá nhân hóa (danh mục) Area Personalization @@ -1160,23 +1160,23 @@ Area Phone - Phone and modem + Điện thoại và modem Area Control Panel (legacy settings) - Phone and modem - Options + Điện thoại và modem - Tùy chọn Area Control Panel (legacy settings) - Phone calls + Cuộc gọi điện thoại Area Privacy - Phone - Default apps + Điện thoại - Ứng dụng mặc định Area System - Picture + Hình ảnh Hình ảnh diff --git a/README.md b/README.md index f163f464e..3dcb85019 100644 --- a/README.md +++ b/README.md @@ -330,23 +330,22 @@ Or download the [early access version](https://github.com/Flow-Launcher/Prerelea ## Sponsors -

- - + + Coderabbit Logo -
- -

- -

+
+
-
-

- +

+ + Appwrite Logo + +
+