diff --git a/Changelog.md b/Changelog.md index 5198edd10..6119d29b7 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,5 +1,13 @@ # Changelog for Fluent.Ribbon +## 9.0.4 + +- ### Bug fixes + + - [#1014](../../issues/1014) - Ribbon menu not fully displayed after minimized + - `IconPresenter` must not be focusable + - Fixed mouse over and keyboard focus colors of ComboBox + ## 9.0.3 - ### Bug fixes diff --git a/Fluent.Ribbon/Controls/RibbonTabControl.cs b/Fluent.Ribbon/Controls/RibbonTabControl.cs index e767223b1..74919abf0 100644 --- a/Fluent.Ribbon/Controls/RibbonTabControl.cs +++ b/Fluent.Ribbon/Controls/RibbonTabControl.cs @@ -936,16 +936,18 @@ private void OnRibbonTabPopupOpening() var dpiScaleX = VisualTreeHelper.GetDpi(this).DpiScaleX; #endif - var inWindowRibbonWidth = monitorInfo.rcWork.Right - Math.Max(monitorInfo.rcWork.Left, tabControlUpperLeftOnScreen.X); + var inWindowRibbonWidth = (monitorInfo.rcWork.Right - Math.Max(monitorInfo.rcWork.Left, tabControlUpperLeftOnScreen.X)) / dpiScaleX; var actualWidth = this.ActualWidth; + + // Constraint when left upper corner is outside the current monitor if (tabControlUpperLeftOnScreen.X < monitorInfo.rcWork.Left) { - actualWidth -= (monitorInfo.rcWork.Left - tabControlUpperLeftOnScreen.X) / widthFactor; + actualWidth -= (monitorInfo.rcWork.Left - tabControlUpperLeftOnScreen.X) / dpiScaleX; } // Set width and prevent negative values - this.DropDownPopup.Width = Math.Max(0, Math.Min(actualWidth, inWindowRibbonWidth) / dpiScaleX); + this.DropDownPopup.Width = Math.Max(0, Math.Min(actualWidth, inWindowRibbonWidth)); } return new[]