Skip to content

Commit

Permalink
Merge pull request #7487 from MartinZikmund/dev/mazi/navigationview-v…
Browse files Browse the repository at this point in the history
…isibility-fix

fix: Port IsPaneVisible fix from WinUI
  • Loading branch information
mergify[bot] authored Nov 17, 2021
2 parents d05b6b7 + d52b71e commit 6105d1f
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 6105d1f

Please sign in to comment.