Skip to content

Commit

Permalink
Merge branch 'main' into format_bitrate
Browse files Browse the repository at this point in the history
  • Loading branch information
QuaintMako authored Jan 27, 2023
2 parents daede97 + e9df282 commit 21cd16e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
17 changes: 11 additions & 6 deletions src/Files.App/Filesystem/ListedItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.IO;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Windows.Storage;
Expand Down Expand Up @@ -46,12 +47,16 @@ public string ItemTooltipText
{
get
{
return $"{"ToolTipDescriptionName".GetLocalizedResource()} {Name}{Environment.NewLine}" +
$"{"ToolTipDescriptionType".GetLocalizedResource()} {itemType}{Environment.NewLine}" +
$"{"ToolTipDescriptionDate".GetLocalizedResource()} {ItemDateModified}" +
(SyncStatusUI.LoadSyncStatus
? $"{Environment.NewLine}{"syncStatusColumn/Header".GetLocalizedResource()}: {syncStatusUI.SyncStatusString}"
: string.Empty);
var tooltipBuilder = new StringBuilder();
tooltipBuilder.AppendLine($"{"ToolTipDescriptionName".GetLocalizedResource()} {Name}");
tooltipBuilder.AppendLine($"{"ToolTipDescriptionType".GetLocalizedResource()} {itemType}");
tooltipBuilder.Append($"{"ToolTipDescriptionDate".GetLocalizedResource()} {ItemDateModified}");
if(!string.IsNullOrWhiteSpace(FileSize))
tooltipBuilder.Append($"{Environment.NewLine}{"ToolTipDescriptionSize".GetLocalizedResource()} {FileSize}");
if(SyncStatusUI.LoadSyncStatus)
tooltipBuilder.Append($"{Environment.NewLine}{"syncStatusColumn/Header".GetLocalizedResource()}: {syncStatusUI.SyncStatusString}");

return tooltipBuilder.ToString();
}
}

Expand Down
3 changes: 3 additions & 0 deletions src/Files.App/Strings/en-US/Resources.resw
Original file line number Diff line number Diff line change
Expand Up @@ -2886,4 +2886,7 @@
<data name="DoubleClickBlankSpaceToGoUp" xml:space="preserve">
<value>Double click on a blank space to go up one directory</value>
</data>
<data name="ToolTipDescriptionSize" xml:space="preserve">
<value>Size:</value>
</data>
</root>
2 changes: 1 addition & 1 deletion src/Files.App/Views/LayoutModes/ColumnViewBase.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@
CornerRadius="{StaticResource ControlCornerRadius}"
IsRightTapEnabled="True"
Loaded="Grid_Loaded"
ToolTipService.ToolTip="{x:Bind Name, Mode=OneWay}">
ToolTipService.ToolTip="{x:Bind ItemTooltipText, Mode=OneWay}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="24" />
<ColumnDefinition Width="*" />
Expand Down

0 comments on commit 21cd16e

Please sign in to comment.