code_review: PR #734

* remove unnecessary namespace using
* do NOT set tooltip currently, because CommitDetail.GetParent may cause UI lags and the tooltip DataTemplate is not provided.
* add translations for zh_CN and zh_TW

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo 2024-11-24 11:04:59 +08:00
parent 53220f9a36
commit 457a1e79c7
No known key found for this signature in database
3 changed files with 3 additions and 7 deletions

View file

@ -7,7 +7,6 @@ using Avalonia.Collections;
using Avalonia.Controls;
using Avalonia.Controls.Documents;
using Avalonia.Input;
using Avalonia.Platform.Storage;
using Avalonia.VisualTree;
namespace SourceGit.Views
@ -115,7 +114,7 @@ namespace SourceGit.Views
{
base.OnPointerMoved(e);
if (e.Pointer.Captured == this)
if (Equals(e.Pointer.Captured, this))
{
var relativeSelfY = e.GetPosition(this).Y;
if (relativeSelfY <= 0 || relativeSelfY > Bounds.Height)
@ -155,11 +154,6 @@ namespace SourceGit.Views
ToolTip.SetTip(this, match.Link);
ToolTip.SetIsOpen(this, true);
}
else if (this.FindAncestorOfType<CommitBaseInfo>() is { DataContext: ViewModels.CommitDetail detail } && detail.GetParent(match.Link) is Models.Commit c)
{
ToolTip.SetTip(this, c);
ToolTip.SetIsOpen(this, true);
}
return;
}