Fix Icon Hover bug

This commit is contained in:
chinboy
2025-11-20 19:24:08 +08:00
parent f160bea6fc
commit 1b5f1d35cd
+7 -1
View File
@@ -11,12 +11,13 @@ using Avalonia.Data;
using Avalonia.Interactivity;
using Avalonia.LogicalTree;
using Avalonia.Media;
using Avalonia.Rendering;
using Avalonia.Styling;
using Avalonia.Threading;
namespace AtomUI.Controls;
public class Icon : PathIcon, IMotionAwareControl
public class Icon : PathIcon, ICustomHitTest, IMotionAwareControl
{
protected override Type StyleKeyOverride { get; } = typeof(Icon);
@@ -643,4 +644,9 @@ public class Icon : PathIcon, IMotionAwareControl
var size = new Size(shapeSize.Width * sx, shapeSize.Height * sy);
return (size, translate);
}
public bool HitTest(Point point)
{
return true;
}
}