Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Renamed "Favorites" section to "Pinned" #14862

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Files.App/Actions/Sidebar/PinFolderToSidebarAction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public string Description
=> "PinFolderToSidebarDescription".GetLocalizedResource();

public RichGlyph Glyph
=> new(opacityStyle: "ColorIconPinToSidebar");
=> new(opacityStyle: "ColorIcon.PinToSidebar.16x16");

public bool IsExecutable
=> GetIsExecutable();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public string Description
=> "UnpinFolderFromSidebarDescription".GetLocalizedResource();

public RichGlyph Glyph
=> new(opacityStyle: "ColorIconUnpinFromSidebar");
=> new(opacityStyle: "ColorIcon.UnpinFromSidebar.16x16");

public bool IsExecutable
=> GetIsExecutable();
Expand Down
2 changes: 1 addition & 1 deletion src/Files.App/Actions/Start/PinToStartAction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public string Description
=> "PinToStartDescription".GetLocalizedResource();

public RichGlyph Glyph
=> new(opacityStyle: "ColorIconPinToSidebar");
=> new(opacityStyle: "ColorIcon.PinToSidebar.16x16");

public bool IsExecutable =>
context.ShellPage is not null;
Expand Down
2 changes: 1 addition & 1 deletion src/Files.App/Actions/Start/UnpinFromStartAction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public string Description
=> "UnpinFromStartDescription".GetLocalizedResource();

public RichGlyph Glyph
=> new(opacityStyle: "ColorIconUnpinFromSidebar");
=> new(opacityStyle: "ColorIcon.UnpinFromSidebar.16x16");

public UnpinFromStartAction()
{
Expand Down
4 changes: 2 additions & 2 deletions src/Files.App/ResourceDictionaries/PathIcons.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -1448,7 +1448,7 @@
</Setter>
</Style>

<Style x:Key="ColorIconPinToSidebar" TargetType="local:OpacityIcon">
<Style x:Key="ColorIcon.PinToSidebar.16x16" TargetType="local:OpacityIcon">
yaira2 marked this conversation as resolved.
Show resolved Hide resolved
<Setter Property="Template">
<Setter.Value>
<ControlTemplate>
Expand Down Expand Up @@ -1489,7 +1489,7 @@
</Setter>
</Style>

<Style x:Key="ColorIconUnpinFromSidebar" TargetType="local:OpacityIcon">
<Style x:Key="ColorIcon.UnpinFromSidebar.16x16" TargetType="local:OpacityIcon">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate>
Expand Down
2 changes: 1 addition & 1 deletion src/Files.App/Strings/en-US/Resources.resw
Original file line number Diff line number Diff line change
Expand Up @@ -1158,7 +1158,7 @@
<data name="DrivesWidgetOptionsFlyoutMapNetDriveMenuItem.Text" xml:space="preserve">
<value>Map network drive</value>
</data>
<data name="SidebarPinned" xml:space="preserve">
<data name="Pinned" xml:space="preserve">
<value>Pinned</value>
</data>
<data name="SidebarLibraries" xml:space="preserve">
Expand Down
4 changes: 2 additions & 2 deletions src/Files.App/UserControls/Widgets/DrivesWidget.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public override List<ContextMenuFlyoutItemViewModel> GetItemMenuItems(WidgetCard
Text = "PinToSidebar".GetLocalizedResource(),
OpacityIcon = new OpacityIconModel()
{
OpacityIconStyle = "ColorIconPinToSidebar",
OpacityIconStyle = "ColorIcon.PinToSidebar.16x16",
},
Command = PinToSidebarCommand,
CommandParameter = item,
Expand All @@ -159,7 +159,7 @@ public override List<ContextMenuFlyoutItemViewModel> GetItemMenuItems(WidgetCard
Text = "UnpinFromSidebar".GetLocalizedResource(),
OpacityIcon = new OpacityIconModel()
{
OpacityIconStyle = "ColorIconUnpinFromSidebar",
OpacityIconStyle = "ColorIcon.UnpinFromSidebar.16x16",
},
Command = UnpinFromSidebarCommand,
CommandParameter = item,
Expand Down
4 changes: 2 additions & 2 deletions src/Files.App/UserControls/Widgets/FileTagsWidget.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ public override List<ContextMenuFlyoutItemViewModel> GetItemMenuItems(WidgetCard
Text = "PinToSidebar".GetLocalizedResource(),
OpacityIcon = new OpacityIconModel()
{
OpacityIconStyle = "ColorIconPinToSidebar",
OpacityIconStyle = "ColorIcon.PinToSidebar.16x16",
},
Command = PinToSidebarCommand,
CommandParameter = item,
Expand All @@ -218,7 +218,7 @@ public override List<ContextMenuFlyoutItemViewModel> GetItemMenuItems(WidgetCard
Text = "UnpinFromSidebar".GetLocalizedResource(),
OpacityIcon = new OpacityIconModel()
{
OpacityIconStyle = "ColorIconUnpinFromSidebar",
OpacityIconStyle = "ColorIcon.UnpinFromSidebar.16x16",
},
Command = UnpinFromSidebarCommand,
CommandParameter = item,
Expand Down
4 changes: 2 additions & 2 deletions src/Files.App/UserControls/Widgets/QuickAccessWidget.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public override List<ContextMenuFlyoutItemViewModel> GetItemMenuItems(WidgetCard
Text = "PinToSidebar".GetLocalizedResource(),
OpacityIcon = new OpacityIconModel()
{
OpacityIconStyle = "ColorIconPinToSidebar",
OpacityIconStyle = "ColorIcon.PinToSidebar.16x16",
},
Command = PinToSidebarCommand,
CommandParameter = item,
Expand All @@ -112,7 +112,7 @@ public override List<ContextMenuFlyoutItemViewModel> GetItemMenuItems(WidgetCard
Text = "UnpinFromSidebar".GetLocalizedResource(),
OpacityIcon = new OpacityIconModel()
{
OpacityIconStyle = "ColorIconUnpinFromSidebar",
OpacityIconStyle = "ColorIcon.UnpinFromSidebar.16x16",
},
Command = UnpinFromSidebarCommand,
CommandParameter = item,
Expand Down
8 changes: 4 additions & 4 deletions src/Files.App/ViewModels/UserControls/SidebarViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ await lib.CheckDefaultSaveFolderAccess() &&
}
}

section.IsExpanded = Ioc.Default.GetRequiredService<SettingsViewModel>().Get(section.Text == "SidebarPinned".GetLocalizedResource(), $"section:{section.Text.Replace('\\', '_')}");
section.IsExpanded = Ioc.Default.GetRequiredService<SettingsViewModel>().Get(section.Text == "Pinned".GetLocalizedResource(), $"section:{section.Text.Replace('\\', '_')}");
section.PropertyChanged += Section_PropertyChanged;
}

Expand Down Expand Up @@ -448,7 +448,7 @@ private async Task<LocationItem> CreateSectionAsync(SectionType sectionType)
break;
}

section = BuildSection("SidebarPinned".GetLocalizedResource(), sectionType, new ContextMenuOptions { ShowHideSection = true }, false);
section = BuildSection("Pinned".GetLocalizedResource(), sectionType, new ContextMenuOptions { ShowHideSection = true }, false);
icon = new BitmapImage(new Uri(Constants.FluentIconsPaths.StarIcon));
section.IsHeader = true;

Expand Down Expand Up @@ -1005,7 +1005,7 @@ private List<ContextMenuFlyoutItemViewModel> GetLocationItemMenuItems(INavigatio
Text = "PinToSidebar".GetLocalizedResource(),
OpacityIcon = new OpacityIconModel()
{
OpacityIconStyle = "ColorIconPinToSidebar",
OpacityIconStyle = "ColorIcon.PinToSidebar.16x16",
},
Command = PinItemCommand,
ShowItem = isDriveItem && !isDriveItemPinned
Expand All @@ -1015,7 +1015,7 @@ private List<ContextMenuFlyoutItemViewModel> GetLocationItemMenuItems(INavigatio
Text = "UnpinFromSidebar".GetLocalizedResource(),
OpacityIcon = new OpacityIconModel()
{
OpacityIconStyle = "ColorIconUnpinFromSidebar",
OpacityIconStyle = "ColorIcon.UnpinFromSidebar.16x16",
},
Command = UnpinItemCommand,
ShowItem = options.ShowUnpinItem || isDriveItemPinned
Expand Down
2 changes: 1 addition & 1 deletion src/Files.App/Views/MainPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@


<MenuFlyout x:Key="SidebarContextMenu">
<ToggleMenuFlyoutItem IsChecked="{x:Bind SidebarAdaptiveViewModel.ShowPinnedFoldersSection, Mode=TwoWay}" Text="{helpers:ResourceString Name=SidebarPinned}" />
<ToggleMenuFlyoutItem IsChecked="{x:Bind SidebarAdaptiveViewModel.ShowPinnedFoldersSection, Mode=TwoWay}" Text="{helpers:ResourceString Name=Pinned}" />
<ToggleMenuFlyoutItem IsChecked="{x:Bind SidebarAdaptiveViewModel.ShowLibrarySection, Mode=TwoWay}" Text="{helpers:ResourceString Name=SidebarLibraries}" />
<ToggleMenuFlyoutItem IsChecked="{x:Bind SidebarAdaptiveViewModel.ShowDrivesSection, Mode=TwoWay}" Text="{helpers:ResourceString Name=Drives}" />
<ToggleMenuFlyoutItem IsChecked="{x:Bind SidebarAdaptiveViewModel.ShowCloudDrivesSection, Mode=TwoWay}" Text="{helpers:ResourceString Name=SidebarCloudDrives}" />
Expand Down
Loading