Skip to content

Commit

Permalink
fix: Port IsPaneVisible fix from WinUI (microsoft/microsoft-ui-xaml#6227
Browse files Browse the repository at this point in the history
)
  • Loading branch information
MartinZikmund committed Nov 17, 2021
1 parent e2dafc3 commit d52b71e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1996,7 +1996,7 @@ double GetNewButtonWidths()
var newButtonWidths = GetNewButtonWidths();

templateSettings.PaneToggleButtonWidth = newButtonWidths;
templateSettings.SmallerPaneToggleButtonWidth = newButtonWidths - 8;
templateSettings.SmallerPaneToggleButtonWidth = Math.Max(0.0, newButtonWidths - 8);
}

private void OnBackButtonClicked(object sender, RoutedEventArgs args)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Licensed under the MIT License. See LICENSE in the project root for license information.
// MUX Reference NavigationViewItemPresenter.cpp, commit 465f0d7

using System;
using Uno.UI.Helpers.WinUI;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
Expand Down Expand Up @@ -173,7 +174,7 @@ internal void UpdateCompactPaneLength(double compactPaneLength, bool shouldUpdat
var gridLength = compactPaneLength;

templateSettings.IconWidth = gridLength;
templateSettings.SmallerIconWidth = gridLength - 8;
templateSettings.SmallerIconWidth = Math.Max(0.0, gridLength - 8);
}
}

Expand Down

0 comments on commit d52b71e

Please sign in to comment.