mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 04:34:59 +00:00
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:
parent
53220f9a36
commit
457a1e79c7
3 changed files with 3 additions and 7 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue