Skip to content

Commit

Permalink
Default IsOffscreenBehavior should be based on IsEffectivelyVisible
Browse files Browse the repository at this point in the history
  • Loading branch information
IsaMorphic committed Jan 23, 2025
1 parent 9287158 commit a3df775
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Avalonia.Controls/Automation/IsOffscreenBehavior.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace Avalonia.Automation
public enum IsOffscreenBehavior
{
/// <summary>
/// The AutomationProperty IsOffscreen is calculated based on IsVisible.
/// The AutomationProperty IsOffscreen is calculated based on IsEffectivelyVisible.
/// </summary>
Default,
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ protected override bool IsOffscreenCore()
IsOffscreenBehavior.FromClip => Owner.GetTransformedBounds() is not { } bounds ||
MathUtilities.IsZero(bounds.Clip.Width) ||
MathUtilities.IsZero(bounds.Clip.Height),
_ => !Owner.IsVisible,
_ => !Owner.IsEffectivelyVisible,
};
}

Expand Down

0 comments on commit a3df775

Please sign in to comment.