Skip to content

Commit

Permalink
fix: Renamed NavigationPaneThemeData.standard to `NavigationPaneThe…
Browse files Browse the repository at this point in the history
…meData.fromResources` (Fixes #1008)

Removed the `backgroundColor` and `inactiveColor` properties
  • Loading branch information
bdlukaa committed Jan 13, 2024
1 parent f6a16cf commit 57ce1f4
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## [next]

* **MINOR BREAKING** Renamed `NavigationPaneThemeData.standard` to `NavigationPaneThemeData.fromResources`, and removed the `backgroundColor` and `inactiveColor` properties ([#1008](https://github.com/bdlukaa/fluent_ui/issues/1008))

## 4.8.4

* feat: Added Croatian localization support ([#1004](https://github.com/bdlukaa/fluent_ui/pull/1004))
Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ packages:
path: ".."
relative: true
source: path
version: "4.8.3"
version: "4.8.4"
flutter:
dependency: "direct main"
description: flutter
Expand Down
7 changes: 4 additions & 3 deletions lib/src/controls/navigation/navigation_view/style.dart
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,15 @@ class NavigationPaneThemeData with Diagnosticable {
this.paneNavigationButtonIcon,
});

factory NavigationPaneThemeData.standard({
/// The default navigation pane theme data.
///
/// This is initialized on [FluentThemeData] with the required properties.
factory NavigationPaneThemeData.fromResources({
required ResourceDictionary resources,
required Duration animationDuration,
required Curve animationCurve,
required Color backgroundColor,
required Color highlightColor,
required Typography typography,
required Color inactiveColor,
}) {
return NavigationPaneThemeData(
animationDuration: animationDuration,
Expand Down
4 changes: 1 addition & 3 deletions lib/src/styles/theme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -303,14 +303,12 @@ class FluentThemeData with Diagnosticable {
dialogTheme ??= const ContentDialogThemeData();
tooltipTheme ??= const TooltipThemeData();
dividerTheme ??= const DividerThemeData();
navigationPaneTheme = NavigationPaneThemeData.standard(
navigationPaneTheme = NavigationPaneThemeData.fromResources(
resources: resources,
animationCurve: animationCurve,
animationDuration: fastAnimationDuration,
backgroundColor: micaBackgroundColor,
highlightColor: accentColor.defaultBrushFor(brightness),
typography: typography,
inactiveColor: inactiveColor,
).merge(navigationPaneTheme);
radioButtonTheme ??= const RadioButtonThemeData();
sliderTheme ??= const SliderThemeData();
Expand Down

0 comments on commit 57ce1f4

Please sign in to comment.