using System;
using System.Runtime.CompilerServices;
using Avalonia;
using Avalonia.Controls;
using Avalonia.Controls.Primitives;
using Avalonia.LogicalTree;
using Avalonia.Threading;
using Avalonia.VisualTree;
namespace QuiverLauncher.Services;
///
/// Keeps MenuItem submenus inside the Quiver window and overlaps them with the parent
/// so the pointer never crosses a dead gap.
/// Fluent's default HorizontalOffset (-4) overlaps when the popup opens to the right,
/// but opens a gap when the submenu is placed on the left.
///
public static class MenuSubmenuOverlap
{
public const double OverlapPixels = 5;
public const double FallbackSubmenuWidth = 180;
public static readonly AttachedProperty EnableProperty =
AvaloniaProperty.RegisterAttached