From 95f07a9f9687adc93c0783defd1aebba7fbf47d8 Mon Sep 17 00:00:00 2001 From: Max Katz Date: Wed, 23 Sep 2020 01:04:03 -0400 Subject: [PATCH 1/2] Only specific buttons should have pressing animation --- src/Avalonia.Themes.Fluent/Button.xaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Avalonia.Themes.Fluent/Button.xaml b/src/Avalonia.Themes.Fluent/Button.xaml index 021c6eae1d..8522c933ae 100644 --- a/src/Avalonia.Themes.Fluent/Button.xaml +++ b/src/Avalonia.Themes.Fluent/Button.xaml @@ -77,7 +77,7 @@ - - From 1430bf86e32b820aac26a159c3ee98a33b58f5dc Mon Sep 17 00:00:00 2001 From: Steven Kirk Date: Wed, 23 Sep 2020 12:13:38 +0200 Subject: [PATCH 2/2] Use screen bounds Bottom instead of Height. Secondard screens on Windows can have a Y offset (i.e. `bounds.Y != 0`) if they're offset vertically from the primary screen, and when this was the case the popup wasn't getting properly constrained as the bottom is not equal to the height. Fixes #4726 --- .../Primitives/PopupPositioning/ManagedPopupPositioner.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Avalonia.Controls/Primitives/PopupPositioning/ManagedPopupPositioner.cs b/src/Avalonia.Controls/Primitives/PopupPositioning/ManagedPopupPositioner.cs index 8c464c7aad..7f1dbdf592 100644 --- a/src/Avalonia.Controls/Primitives/PopupPositioning/ManagedPopupPositioner.cs +++ b/src/Avalonia.Controls/Primitives/PopupPositioning/ManagedPopupPositioner.cs @@ -221,7 +221,7 @@ namespace Avalonia.Controls.Primitives.PopupPositioning if (!FitsInBounds(unconstrainedRect, PopupAnchor.Bottom)) { - unconstrainedRect = unconstrainedRect.WithHeight(bounds.Height - unconstrainedRect.Y); + unconstrainedRect = unconstrainedRect.WithHeight(bounds.Bottom - unconstrainedRect.Y); } if (IsValid(unconstrainedRect))