Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows 11 style PaneDisplayMode #82

Closed
tobiasht opened this issue Oct 14, 2021 · 3 comments
Closed

Windows 11 style PaneDisplayMode #82

tobiasht opened this issue Oct 14, 2021 · 3 comments

Comments

@tobiasht
Copy link
Contributor

image

I really like the navigation UI seen in the new Windows 11 Store application. This is very similar to the compact display mode, with three minor adjustments, more spacing, space for labels, and does not expand.

Would you be interested in adding PaneDisplayMode.win11 as an additional display mode?

@bdlukaa
Copy link
Owner

bdlukaa commented Oct 15, 2021

I don't think adding a new display mode is a valid request. Natively, on XAML, we only have the ones we have in this package.

I think a better request would maybe be "Custom pane width"? The padding can be custom using
https://github.com/bdlukaa/fluent_ui/blob/master/lib/src/controls/navigation/navigation_view/style.dart#L83

@tobiasht
Copy link
Contributor Author

Yeah, that sounds like a good solution. Didn´t know about the iconPadding parameter. Is there a way we could easily add a label to the PaneDisplayMode.Compact?

@bdlukaa
Copy link
Owner

bdlukaa commented Oct 22, 2021

Added an option to create custom panes:

class CustomNavigationPane extends NavigationPaneWidget {
  @override
  Widget build(BuildContext context, NavigationPaneWidgetData data) {
    return Row(children: [
      SizedBox(width: 400),
      Expanded(child: data.content),
    ]);
  }
}

And use it in your NavigationPane:

NavigationPane(
  ...
  customPane: CustomNavigationPane(),
)

You can create the panel as you wish,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants