mirror of
https://github.com/AtomUI/AtomUI.git
synced 2026-10-22 00:46:48 +08:00
Fix Icon Hover bug
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user