Skip to content

Commit

Permalink
NavView IsPaneVisible Fix (#6227)
Browse files Browse the repository at this point in the history
* ensure templatesettings > 0

* re-enable failed tests
  • Loading branch information
karkarl authored Nov 5, 2021
1 parent 94c2d04 commit 3f6310d
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dev/NavigationView/NavigationView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1820,7 +1820,7 @@ void NavigationView::UpdatePaneButtonsWidths()
}();

templateSettings->PaneToggleButtonWidth(newButtonWidths);
templateSettings->SmallerPaneToggleButtonWidth(newButtonWidths - 8);
templateSettings->SmallerPaneToggleButtonWidth(std::max(0.0, newButtonWidths - 8));
}

void NavigationView::OnBackButtonClicked(const winrt::IInspectable& sender, const winrt::RoutedEventArgs& args)
Expand Down
2 changes: 1 addition & 1 deletion dev/NavigationView/NavigationViewItemPresenter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ void NavigationViewItemPresenter::UpdateCompactPaneLength(double compactPaneLeng
const auto gridLength = compactPaneLength;

templateSettings->IconWidth(gridLength);
templateSettings->SmallerIconWidth(gridLength - 8);
templateSettings->SmallerIconWidth(std::max(0.0, gridLength - 8));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,6 @@ public void PaneDisplayModeLeftLeftCompactLeftMinimalTest()
}

[TestMethod]
[TestProperty("Ignore", "True")] // Disabled as per tracking issue #3125 and internal issue 19342138
public void EnsurePaneCanBeHidden()
{
using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView Test" }))
Expand All @@ -589,7 +588,6 @@ public void EnsurePaneCanBeHidden()
}

[TestMethod]
[TestProperty("Ignore", "True")] // Disabled as per tracking issue #3125 and internal issue 19342138
public void EnsurePaneCanBeHiddenWithFixedWindowSize()
{
using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView Test" }))
Expand Down

0 comments on commit 3f6310d

Please sign in to comment.