Skip to content

Commit

Permalink
NavigationAppBar.title is expanded to fit the entire width on top m…
Browse files Browse the repository at this point in the history
…ode (Fixes #902)
  • Loading branch information
bdlukaa committed Jul 29, 2023
1 parent 222e917 commit a494861
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
- Added `FluentThemeData.selectionColor`, which defaults to the accent color normal shade ([#897](https://github.com/bdlukaa/fluent_ui/issues/897))
- Flyout reverse transition duration is properly set ([#893](https://github.com/bdlukaa/fluent_ui/issues/893))
- Remove view padding when app bar is provided ([#884](https://github.com/bdlukaa/fluent_ui/issues/884))
- `NavigationAppBar.title` is expanded to fit the entire width on top mode ([#902](https://github.com/bdlukaa/fluent_ui/issues/902))

## 4.7.0

Expand Down
13 changes: 8 additions & 5 deletions lib/src/controls/navigation/navigation_view/view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -918,11 +918,14 @@ class _NavigationAppBar extends StatelessWidget {
late Widget result;
switch (displayMode) {
case PaneDisplayMode.top:
result = Row(children: [
leading,
if (additionalLeading != null) additionalLeading!,
title,
if (appBar.actions != null) Expanded(child: appBar.actions!)
result = Stack(children: [
Row(children: [
leading,
if (additionalLeading != null) additionalLeading!,
Expanded(child: title),
]),
if (appBar.actions != null)
PositionedDirectional(end: 0, child: appBar.actions!),
]);
break;
case PaneDisplayMode.minimal:
Expand Down

0 comments on commit a494861

Please sign in to comment.