From 05e3f0e5b88b56bfa4ccc97fb65a7d752e038ab1 Mon Sep 17 00:00:00 2001 From: Gadfly Date: Sat, 15 Mar 2025 22:13:10 +0800 Subject: [PATCH] enhance: add tooltips to various UI elements for better accessibility --- src/Converters/StringConverters.cs | 3 +++ src/Views/ChangeCollectionView.axaml | 13 ++++++++++--- src/Views/DiffView.axaml | 2 +- src/Views/Histories.axaml | 11 +++++++++-- src/Views/RevisionFiles.axaml | 2 +- 5 files changed, 24 insertions(+), 7 deletions(-) diff --git a/src/Converters/StringConverters.cs b/src/Converters/StringConverters.cs index 5e4608c5..c371b859 100644 --- a/src/Converters/StringConverters.cs +++ b/src/Converters/StringConverters.cs @@ -81,5 +81,8 @@ namespace SourceGit.Converters public static readonly FuncValueConverter ContainsSpaces = new FuncValueConverter(v => v != null && v.Contains(' ')); + + public static readonly FuncValueConverter UserToString = + new FuncValueConverter(v => v == null ? string.Empty : $"{v.Name} <{v.Email}>"); } } diff --git a/src/Views/ChangeCollectionView.axaml b/src/Views/ChangeCollectionView.axaml index 6ce3d033..2b0f5bfa 100644 --- a/src/Views/ChangeCollectionView.axaml +++ b/src/Views/ChangeCollectionView.axaml @@ -39,7 +39,8 @@ + DoubleTapped="OnRowDoubleTapped" + ToolTip.Tip="{Binding FullPath}"> - + - + - + diff --git a/src/Views/Histories.axaml b/src/Views/Histories.axaml index 583e17c1..4bd0d54d 100644 --- a/src/Views/Histories.axaml +++ b/src/Views/Histories.axaml @@ -126,7 +126,11 @@ - + - + - +