From 66517fd4bf1ed05bd91a1002cfc9d9a508559131 Mon Sep 17 00:00:00 2001 From: Gadfly Date: Sun, 16 Mar 2025 11:23:42 +0800 Subject: [PATCH] enhance: add tooltips to various UI elements for better accessibility (#1097) * enhance: add tooltips to various UI elements for better accessibility * refactor: simplify user string conversion --- src/Models/User.cs | 5 +++++ src/Views/ChangeCollectionView.axaml | 13 ++++++++++--- src/Views/DiffView.axaml | 2 +- src/Views/Histories.axaml | 11 +++++++++-- src/Views/RevisionFiles.axaml | 2 +- 5 files changed, 26 insertions(+), 7 deletions(-) diff --git a/src/Models/User.cs b/src/Models/User.cs index 850bcf2f..066ab747 100644 --- a/src/Models/User.cs +++ b/src/Models/User.cs @@ -43,6 +43,11 @@ namespace SourceGit.Models return _caches.GetOrAdd(data, key => new User(key)); } + public override string ToString() + { + return $"{Name} <{Email}>"; + } + private static ConcurrentDictionary _caches = new ConcurrentDictionary(); private readonly int _hash; } 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..afe2c1b7 100644 --- a/src/Views/Histories.axaml +++ b/src/Views/Histories.axaml @@ -126,7 +126,11 @@ - + - + - +