From f08a2066a2ea64fcf8412a5ccbfa291ffa4ba343 Mon Sep 17 00:00:00 2001 From: Yair <39923744+yaira2@users.noreply.github.com> Date: Thu, 31 Jul 2025 16:44:31 -0400 Subject: [PATCH] Reword 'add pane' to 'split pane' --- .../ArrangePanesHorizontallyAction.cs | 2 +- .../ArrangePanesVerticallyAction.cs | 2 +- ...tion.cs => SplitPaneHorizontallyAction.cs} | 10 ++-- ...Action.cs => SplitPaneVerticallyAction.cs} | 8 ++-- .../Data/Commands/Manager/CommandCodes.cs | 4 +- .../Data/Commands/Manager/CommandManager.cs | 8 ++-- .../Data/Commands/Manager/ICommandManager.cs | 4 +- .../Settings/GeneralSettingsService.cs | 2 +- src/Files.App/Strings/en-US/Resources.resw | 25 +++++----- src/Files.App/UserControls/TabBar/TabBar.xaml | 48 +++++++++---------- .../ViewModels/Settings/GeneralViewModel.cs | 2 +- src/Files.App/Views/Settings/GeneralPage.xaml | 41 +++++++++------- src/Files.App/Views/ShellPanesPage.xaml.cs | 26 +++++----- 13 files changed, 97 insertions(+), 85 deletions(-) rename src/Files.App/Actions/Navigation/{AddHorizontalPaneAction.cs => SplitPaneHorizontallyAction.cs} (79%) rename src/Files.App/Actions/Navigation/{AddVerticalPaneAction.cs => SplitPaneVerticallyAction.cs} (84%) diff --git a/src/Files.App/Actions/Navigation/ArrangePanesHorizontallyAction.cs b/src/Files.App/Actions/Navigation/ArrangePanesHorizontallyAction.cs index fe222f926084..7651851893ef 100644 --- a/src/Files.App/Actions/Navigation/ArrangePanesHorizontallyAction.cs +++ b/src/Files.App/Actions/Navigation/ArrangePanesHorizontallyAction.cs @@ -15,7 +15,7 @@ public string Description => Strings.ArrangePanesHorizontallyDescription.GetLocalizedResource(); public RichGlyph Glyph - => new(themedIconStyle: "App.ThemedIcons.Panes.Vertical"); + => new(themedIconStyle: "App.ThemedIcons.Panes.Horizontal"); public bool IsOn => MultiPanesContext.ShellPaneArrangement is ShellPaneArrangement.Horizontal; diff --git a/src/Files.App/Actions/Navigation/ArrangePanesVerticallyAction.cs b/src/Files.App/Actions/Navigation/ArrangePanesVerticallyAction.cs index f3f000c80be5..264f1291afe2 100644 --- a/src/Files.App/Actions/Navigation/ArrangePanesVerticallyAction.cs +++ b/src/Files.App/Actions/Navigation/ArrangePanesVerticallyAction.cs @@ -15,7 +15,7 @@ public string Description => Strings.ArrangePanesVerticallyDescription.GetLocalizedResource(); public RichGlyph Glyph - => new(themedIconStyle: "App.ThemedIcons.Panes.Horizontal"); + => new(themedIconStyle: "App.ThemedIcons.Panes.Vertical"); public bool IsOn => MultiPanesContext.ShellPaneArrangement is ShellPaneArrangement.Vertical; diff --git a/src/Files.App/Actions/Navigation/AddHorizontalPaneAction.cs b/src/Files.App/Actions/Navigation/SplitPaneHorizontallyAction.cs similarity index 79% rename from src/Files.App/Actions/Navigation/AddHorizontalPaneAction.cs rename to src/Files.App/Actions/Navigation/SplitPaneHorizontallyAction.cs index b9939bf4d92a..a25e89eb50c3 100644 --- a/src/Files.App/Actions/Navigation/AddHorizontalPaneAction.cs +++ b/src/Files.App/Actions/Navigation/SplitPaneHorizontallyAction.cs @@ -3,28 +3,28 @@ namespace Files.App.Actions { - internal sealed partial class AddHorizontalPaneAction : ObservableObject, IAction + internal sealed partial class SplitPaneHorizontallyAction : ObservableObject, IAction { private readonly IContentPageContext ContentPageContext = Ioc.Default.GetRequiredService(); private readonly IGeneralSettingsService GeneralSettingsService = Ioc.Default.GetRequiredService(); public string Label - => Strings.AddHorizontalPane.GetLocalizedResource(); + => Strings.SplitPaneHorizontally.GetLocalizedResource(); public string Description - => Strings.AddHorizontalPaneDescription.GetLocalizedResource(); + => Strings.SplitPaneHorizontallyDescription.GetLocalizedResource(); public HotKey HotKey => new(Keys.H, KeyModifiers.AltShift); public RichGlyph Glyph - => new(themedIconStyle: "App.ThemedIcons.Panes.Vertical"); + => new(themedIconStyle: "App.ThemedIcons.Panes.Horizontal"); public bool IsExecutable => ContentPageContext.IsMultiPaneAvailable && !ContentPageContext.IsMultiPaneActive; - public AddHorizontalPaneAction() + public SplitPaneHorizontallyAction() { ContentPageContext.PropertyChanged += ContentPageContext_PropertyChanged; } diff --git a/src/Files.App/Actions/Navigation/AddVerticalPaneAction.cs b/src/Files.App/Actions/Navigation/SplitPaneVerticallyAction.cs similarity index 84% rename from src/Files.App/Actions/Navigation/AddVerticalPaneAction.cs rename to src/Files.App/Actions/Navigation/SplitPaneVerticallyAction.cs index df7829da23da..a8e5a5a712fc 100644 --- a/src/Files.App/Actions/Navigation/AddVerticalPaneAction.cs +++ b/src/Files.App/Actions/Navigation/SplitPaneVerticallyAction.cs @@ -3,13 +3,13 @@ namespace Files.App.Actions { - internal sealed partial class AddVerticalPaneAction : ObservableObject, IAction + internal sealed partial class SplitPaneVerticallyAction : ObservableObject, IAction { private readonly IContentPageContext ContentPageContext = Ioc.Default.GetRequiredService(); private readonly IGeneralSettingsService GeneralSettingsService = Ioc.Default.GetRequiredService(); public string Label - => Strings.AddVerticalPane.GetLocalizedResource(); + => Strings.SplitPaneVertically.GetLocalizedResource(); public string Description => Strings.AddVerticalPaneDescription.GetLocalizedResource(); @@ -18,13 +18,13 @@ public HotKey HotKey => new(Keys.V, KeyModifiers.AltShift); public RichGlyph Glyph - => new(themedIconStyle: "App.ThemedIcons.Panes.Horizontal"); + => new(themedIconStyle: "App.ThemedIcons.Panes.Vertical"); public bool IsExecutable => ContentPageContext.IsMultiPaneAvailable && !ContentPageContext.IsMultiPaneActive; - public AddVerticalPaneAction() + public SplitPaneVerticallyAction() { ContentPageContext.PropertyChanged += ContentPageContext_PropertyChanged; } diff --git a/src/Files.App/Data/Commands/Manager/CommandCodes.cs b/src/Files.App/Data/Commands/Manager/CommandCodes.cs index 3d89d1ecc476..7c3cfcb448e0 100644 --- a/src/Files.App/Data/Commands/Manager/CommandCodes.cs +++ b/src/Files.App/Data/Commands/Manager/CommandCodes.cs @@ -212,8 +212,8 @@ public enum CommandCodes // Shell Panes CloseActivePane, FocusOtherPane, - AddVerticalPane, - AddHorizontalPane, + SplitPaneVertically, + SplitPaneHorizontally, ArrangePanesVertically, ArrangePanesHorizontally, diff --git a/src/Files.App/Data/Commands/Manager/CommandManager.cs b/src/Files.App/Data/Commands/Manager/CommandManager.cs index 0ead424a2c80..12e4518885ad 100644 --- a/src/Files.App/Data/Commands/Manager/CommandManager.cs +++ b/src/Files.App/Data/Commands/Manager/CommandManager.cs @@ -213,8 +213,8 @@ public IRichCommand this[HotKey hotKey] public IRichCommand CloseSelectedTab => commands[CommandCodes.CloseSelectedTab]; public IRichCommand CloseActivePane => commands[CommandCodes.CloseActivePane]; public IRichCommand FocusOtherPane => commands[CommandCodes.FocusOtherPane]; - public IRichCommand AddVerticalPane => commands[CommandCodes.AddVerticalPane]; - public IRichCommand AddHorizontalPane => commands[CommandCodes.AddHorizontalPane]; + public IRichCommand SplitPaneVertically => commands[CommandCodes.SplitPaneVertically]; + public IRichCommand SplitPaneHorizontally => commands[CommandCodes.SplitPaneHorizontally]; public IRichCommand ArrangePanesVertically => commands[CommandCodes.ArrangePanesVertically]; public IRichCommand ArrangePanesHorizontally => commands[CommandCodes.ArrangePanesHorizontally]; public IRichCommand OpenFileLocation => commands[CommandCodes.OpenFileLocation]; @@ -420,8 +420,8 @@ public IEnumerator GetEnumerator() => [CommandCodes.CloseSelectedTab] = new CloseSelectedTabAction(), [CommandCodes.CloseActivePane] = new CloseActivePaneAction(), [CommandCodes.FocusOtherPane] = new FocusOtherPaneAction(), - [CommandCodes.AddVerticalPane] = new AddVerticalPaneAction(), - [CommandCodes.AddHorizontalPane] = new AddHorizontalPaneAction(), + [CommandCodes.SplitPaneVertically] = new SplitPaneVerticallyAction(), + [CommandCodes.SplitPaneHorizontally] = new SplitPaneHorizontallyAction(), [CommandCodes.ArrangePanesVertically] = new ArrangePanesVerticallyAction(), [CommandCodes.ArrangePanesHorizontally] = new ArrangePanesHorizontallyAction(), [CommandCodes.OpenFileLocation] = new OpenFileLocationAction(), diff --git a/src/Files.App/Data/Commands/Manager/ICommandManager.cs b/src/Files.App/Data/Commands/Manager/ICommandManager.cs index f1711fb134ec..56d91bdb5732 100644 --- a/src/Files.App/Data/Commands/Manager/ICommandManager.cs +++ b/src/Files.App/Data/Commands/Manager/ICommandManager.cs @@ -195,8 +195,8 @@ public interface ICommandManager : IEnumerable IRichCommand CloseActivePane { get; } IRichCommand FocusOtherPane { get; } - IRichCommand AddVerticalPane { get; } - IRichCommand AddHorizontalPane { get; } + IRichCommand SplitPaneVertically { get; } + IRichCommand SplitPaneHorizontally { get; } IRichCommand ArrangePanesVertically { get; } IRichCommand ArrangePanesHorizontally { get; } diff --git a/src/Files.App/Services/Settings/GeneralSettingsService.cs b/src/Files.App/Services/Settings/GeneralSettingsService.cs index f692a3b416b5..9c3d0e157d72 100644 --- a/src/Files.App/Services/Settings/GeneralSettingsService.cs +++ b/src/Files.App/Services/Settings/GeneralSettingsService.cs @@ -365,7 +365,7 @@ public string UserId public ShellPaneArrangement ShellPaneArrangementOption { - get => (ShellPaneArrangement)Get((long)ShellPaneArrangement.Horizontal); + get => (ShellPaneArrangement)Get((long)ShellPaneArrangement.Vertical); set => Set((long)value); } diff --git a/src/Files.App/Strings/en-US/Resources.resw b/src/Files.App/Strings/en-US/Resources.resw index 7c07b9676f9b..1da99babedc7 100644 --- a/src/Files.App/Strings/en-US/Resources.resw +++ b/src/Files.App/Strings/en-US/Resources.resw @@ -4033,17 +4033,17 @@ Tab actions menu - - Vertical pane + + Split vertically - Add vertical pane + Split pane vertically - - Horizontal pane + + Split horizontally - - Add horizontal pane + + Split pane horizontally Arrange vertically @@ -4057,8 +4057,8 @@ Arrange panes horizontally - - Add pane + + Split pane Show tab actions button in the title bar @@ -4066,8 +4066,11 @@ Arrange panes - - Default pane arrangement + + Default dual pane split direction + + + Dual pane mode Horizontal diff --git a/src/Files.App/UserControls/TabBar/TabBar.xaml b/src/Files.App/UserControls/TabBar/TabBar.xaml index 6fa306a27efe..2e02a641a7d2 100644 --- a/src/Files.App/UserControls/TabBar/TabBar.xaml +++ b/src/Files.App/UserControls/TabBar/TabBar.xaml @@ -143,24 +143,24 @@ - - - - + x:Load="{x:Bind Commands.SplitPaneHorizontally.IsExecutable, Mode=OneWay}" + Text="{helpers:ResourceString Name=SplitPane}"> + + Command="{x:Bind Commands.SplitPaneVertically, Mode=OneWay}" + KeyboardAcceleratorTextOverride="{x:Bind Commands.SplitPaneVertically.HotKeyText, Mode=OneWay}" + Text="{x:Bind Commands.SplitPaneVertically.Label}" + ThemedIconStyle="{x:Bind Commands.SplitPaneVertically.ThemedIconStyle}" /> + + + @@ -170,15 +170,6 @@ x:Load="{x:Bind Commands.CloseActivePane.IsExecutable, Mode=OneWay}" Text="{helpers:ResourceString Name=ArrangePanes}"> - - - + + + diff --git a/src/Files.App/ViewModels/Settings/GeneralViewModel.cs b/src/Files.App/ViewModels/Settings/GeneralViewModel.cs index 11cd979ce6a6..dc1766f79e46 100644 --- a/src/Files.App/ViewModels/Settings/GeneralViewModel.cs +++ b/src/Files.App/ViewModels/Settings/GeneralViewModel.cs @@ -107,8 +107,8 @@ public GeneralViewModel() PagesOnStartupList.CollectionChanged += PagesOnStartupList_CollectionChanged; // ShellPaneArrangement - ShellPaneArrangementTypes.Add(ShellPaneArrangement.Horizontal, Strings.Horizontal.GetLocalizedResource()); ShellPaneArrangementTypes.Add(ShellPaneArrangement.Vertical, Strings.Vertical.GetLocalizedResource()); + ShellPaneArrangementTypes.Add(ShellPaneArrangement.Horizontal, Strings.Horizontal.GetLocalizedResource()); SelectedShellPaneArrangementType = ShellPaneArrangementTypes[UserSettingsService.GeneralSettingsService.ShellPaneArrangementOption]; InitStartupSettingsRecentFoldersFlyout(); diff --git a/src/Files.App/Views/Settings/GeneralPage.xaml b/src/Files.App/Views/Settings/GeneralPage.xaml index 848db39fa124..89ccb8433b25 100644 --- a/src/Files.App/Views/Settings/GeneralPage.xaml +++ b/src/Files.App/Views/Settings/GeneralPage.xaml @@ -177,22 +177,6 @@ - - - - - - - - - - - - - @@ -232,6 +216,31 @@ + + + + + + + + + + + + + + + + + + RootGrid.ColumnDefinitions.IndexOf(x) % 2 == 0); definitions?.ForEach(x => x.Width = new GridLength(1, GridUnitType.Star)); @@ -712,7 +712,7 @@ private void Sizer_ManipulationStarted(object sender, ManipulationStartedRoutedE { this.ChangeCursor( InputSystemCursor.Create( - ShellPaneArrangement is ShellPaneArrangement.Horizontal + ShellPaneArrangement is ShellPaneArrangement.Vertical ? InputSystemCursorShape.SizeWestEast : InputSystemCursorShape.SizeNorthSouth)); }