Skip to content

Commit

Permalink
Merge pull request #281 from WinXaito/pane_header_height
Browse files Browse the repository at this point in the history
Pane header height
  • Loading branch information
WinXaito authored Apr 11, 2022
2 parents e8aad26 + 4b056fa commit f858bda
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Date format: DD/MM/YYYY
## [3.10.3]

- Do not use duplicated `Scrollbar`s ([#279](https://github.com/bdlukaa/fluent_ui/pull/279/))
- Allow custom height on `NavigationPane` header. ([#260](https://github.com/bdlukaa/fluent_ui/pull/260/))
- Allow to define the minimal tab width ([#282](https://github.com/bdlukaa/fluent_ui/pull/282/))

## [3.10.2] - [09/04/2022]
Expand Down
9 changes: 8 additions & 1 deletion lib/src/controls/navigation/navigation_view/pane.dart
Original file line number Diff line number Diff line change
Expand Up @@ -322,12 +322,19 @@ class NavigationPaneSize {
/// maxWidth must be greater or equal than minWidth.
final double? openMaxWidth;

/// The height of the header in NavigationPane.
///
/// Only used when NavigationPane mode is open.
/// If the value is null, [_kOneLineTileHeight] is used.
final double? headerHeight;

const NavigationPaneSize({
this.topHeight,
this.compactWidth,
this.openWidth,
this.openMinWidth,
this.openMaxWidth,
this.headerHeight,
}) : assert(
openMinWidth == null ||
openMaxWidth == null ||
Expand Down Expand Up @@ -678,7 +685,7 @@ class _OpenNavigationPaneState extends State<_OpenNavigationPane>
margin: widget.pane.autoSuggestBox != null
? EdgeInsets.zero
: topPadding,
height: kOneLineTileHeight,
height: widget.pane.size?.headerHeight ?? kOneLineTileHeight,
child: () {
if (widget.pane.header != null) {
return Row(children: [
Expand Down

0 comments on commit f858bda

Please sign in to comment.