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

Add a chevronSize parameter for the BreadcrumbBar widget #1111

Closed
Raafa19 opened this issue Aug 31, 2024 · 1 comment
Closed

Add a chevronSize parameter for the BreadcrumbBar widget #1111

Raafa19 opened this issue Aug 31, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@Raafa19
Copy link

Raafa19 commented Aug 31, 2024

Is your feature request related to a problem? Please describe.
Hi, when it comes to using the BreadcrumbBar widget, in places where the text size is different than the default (example: PageHeader), the chevron icon size remains 8px. It looks kinda weird.

Describe the solution you'd like
Little modification to the BreadcrumbBar widget, adding a chevronSize parameter.

Describe alternatives you've considered
The next would be the implementation:

  /// Size of the chevron icon
  final double? chevronSize;

  /// Creates a breadcrumb bar.
  const BreadcrumbBar({
    super.key,
    required this.items,
    this.chevronSize,
    this.overflowButtonBuilder = _defaultOverflowButtonBuilder,
    this.onItemPressed,
  });

The chevron widget:

final chevron = Padding(
      padding: const EdgeInsetsDirectional.symmetric(horizontal: 6.0),
      child: Icon(
        textDirection == TextDirection.ltr
            ? FluentIcons.chevron_right
            : FluentIcons.chevron_left,
        size: widget.chevronSize ?? 8.0,
        color: theme.resources.textFillColorPrimary,
      ),
    );

Additional context
Example header (default 8px)
imagen

Example header (12px)
imagen

The same argument could be said to the more icon, but it doesn't seem necessary.

@Raafa19 Raafa19 changed the title Add a chevronSize parameter for the BreadcrumbBar widget Add a chevronSize parameter for the BreadcrumbBar widget Aug 31, 2024
@bdlukaa bdlukaa added the enhancement New feature or request label Sep 3, 2024
@bdlukaa
Copy link
Owner

bdlukaa commented Sep 3, 2024

I think we can automatically adjust the icon size according to the text font size.

The default icon size in the native implementation is 12.
https://github.com/microsoft/microsoft-ui-xaml/blob/aeed4c19e2fc7c2c093216a51b651f2f0890c930/src/controls/dev/Breadcrumb/BreadcrumbBar_themeresources.xaml#L33

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

No branches or pull requests

2 participants