Skip to content

Commit faa76b6

Browse files
committed
Init
1 parent d7e0e9d commit faa76b6

File tree

11 files changed

+27
-9
lines changed

11 files changed

+27
-9
lines changed

src/Files.App.Controls/BreadcrumbBar/BreadcrumbBar.Properties.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,8 @@ public partial class BreadcrumbBar : Control
2121

2222
[GeneratedDependencyProperty]
2323
public partial string? RootItemToolTip { get; set; }
24+
25+
[GeneratedDependencyProperty]
26+
public partial string? RootItemChevronToolTip { get; set; }
2427
}
2528
}

src/Files.App.Controls/BreadcrumbBar/BreadcrumbBar.xaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
x:Name="PART_RootBreadcrumbBarItem"
5757
Grid.Column="0"
5858
Padding="{StaticResource BreadcrumbBarRootItemPadding}"
59+
ChevronToolTip="{TemplateBinding RootItemChevronToolTip}"
5960
CornerRadius="{StaticResource BreadcrumbBarRootItemCornerRadius}"
6061
ItemToolTip="{TemplateBinding RootItemToolTip}">
6162
<ContentPresenter Content="{Binding RootItem, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />

src/Files.App.Controls/BreadcrumbBar/BreadcrumbBarItem.Properties.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ public partial class BreadcrumbBarItem
1414
public partial bool IsLastItem { get; set; }
1515

1616
[GeneratedDependencyProperty]
17-
public partial string ItemToolTip { get; set; }
17+
public partial string? ItemToolTip { get; set; }
1818

1919
[GeneratedDependencyProperty]
20-
public partial string ChevronToolTip { get; set; }
20+
public partial string? ChevronToolTip { get; set; }
2121

2222
partial void OnIsEllipsisChanged(bool newValue)
2323
{

src/Files.App/Data/Items/PathBoxItem.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,7 @@ public sealed class PathBoxItem
88
public string? Title { get; set; }
99

1010
public string? Path { get; set; }
11+
12+
public string? ChevronToolTip { get; set; }
1113
}
1214
}

src/Files.App/Strings/en-US/Resources.resw

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4259,7 +4259,7 @@
42594259
<value>Show collapsed path breadcrumbs</value>
42604260
</data>
42614261
<data name="BreadcrumbBarChevronButtonToolTip" xml:space="preserve">
4262-
<value>Show child folders</value>
4262+
<value>Show folders in {0}</value>
42634263
</data>
42644264
<data name="NoCommandsFound" xml:space="preserve">
42654265
<value>There are no commands containing {0}</value>

src/Files.App/UserControls/NavigationToolbar.xaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,7 @@
366366
ItemDropDownFlyoutClosed="BreadcrumbBar_ItemDropDownFlyoutClosed"
367367
ItemDropDownFlyoutOpening="BreadcrumbBar_ItemDropDownFlyoutOpening"
368368
ItemsSource="{x:Bind ViewModel.PathComponents, Mode=OneWay}"
369+
RootItemChevronToolTip="View folders in Home"
369370
RootItemToolTip="{helpers:ResourceString Name=Home}">
370371
<controls:BreadcrumbBar.RootItem>
371372
<Image
@@ -379,7 +380,7 @@
379380
AllowDrop="True"
380381
AutomationProperties.AccessibilityView="Content"
381382
AutomationProperties.Name="{x:Bind Title, Mode=OneWay}"
382-
ChevronToolTip="{helpers:ResourceString Name=BreadcrumbBarChevronButtonToolTip}"
383+
ChevronToolTip="{x:Bind ChevronToolTip, Mode=OneWay}"
383384
Content="{x:Bind Title, Mode=OneWay}"
384385
DataContext="{x:Bind}"
385386
DragLeave="BreadcrumbBarItem_DragLeave"

src/Files.App/Utils/Storage/Helpers/StorageFileExtensions.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,8 @@ public static async Task<List<PathBoxItem>> GetDirectoryPathComponentsWithDispla
152152
if (!string.IsNullOrEmpty(folder?.DisplayName))
153153
item.Title = folder.DisplayName;
154154
}
155+
156+
item.ChevronToolTip = string.Format(Strings.BreadcrumbBarChevronButtonToolTip.GetLocalizedResource(), item.Title);
155157
}
156158

157159
return pathBoxItems;
@@ -321,7 +323,8 @@ private static PathBoxItem GetPathItem(string component, string path)
321323
return new PathBoxItem()
322324
{
323325
Title = title,
324-
Path = path
326+
Path = path,
327+
ChevronToolTip = string.Format(Strings.BreadcrumbBarChevronButtonToolTip.GetLocalizedResource(), title),
325328
};
326329
}
327330

src/Files.App/Views/HomePage.xaml.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ protected override async void OnNavigatedTo(NavigationEventArgs e)
6969
{
7070
Title = componentLabel,
7171
Path = tag,
72+
ChevronToolTip = string.Format(Strings.BreadcrumbBarChevronButtonToolTip.GetLocalizedResource(), componentLabel),
7273
};
7374

7475
AppInstance.ToolbarViewModel.PathComponents.Add(item);

src/Files.App/Views/ReleaseNotesPage.xaml.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ protected override async void OnNavigatedTo(NavigationEventArgs e)
6868
{
6969
Title = componentLabel,
7070
Path = tag,
71+
ChevronToolTip = string.Format(Strings.BreadcrumbBarChevronButtonToolTip.GetLocalizedResource(), componentLabel),
7172
};
7273

7374
AppInstance.ToolbarViewModel.PathComponents.Add(item);

src/Files.App/Views/Shells/BaseShellPage.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,13 @@ public async Task UpdatePathUIToWorkingDirectoryAsync(string newWorkingDir, stri
481481
// Clear the path UI
482482
ToolbarViewModel.PathComponents.Clear();
483483
ToolbarViewModel.IsSingleItemOverride = true;
484-
ToolbarViewModel.PathComponents.Add(new PathBoxItem() { Path = null, Title = singleItemOverride });
484+
ToolbarViewModel.PathComponents.Add(
485+
new()
486+
{
487+
Path = null,
488+
Title = singleItemOverride,
489+
ChevronToolTip = string.Format(Strings.BreadcrumbBarChevronButtonToolTip.GetLocalizedResource(), singleItemOverride),
490+
});
485491
}
486492
}
487493

0 commit comments

Comments
 (0)