Skip to content

Commit

Permalink
fix(SidebarItem): use theme's primary color instead of hardcoded value (
Browse files Browse the repository at this point in the history
#374)

* fix(SidebarItem): use theme's primary color instead of hardcoded value

Fixes #313

* chore: update version, changelog
  • Loading branch information
GroovinChip committed Apr 6, 2023
1 parent 036601c commit 61b6975
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## [1.12.1]
* Fix SidebarItem's leading icons not respecting the theme's primary color

## [1.12.0]
✨ New widget: `SliverToolBar`

Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ packages:
path: ".."
relative: true
source: path
version: "1.12.0"
version: "1.12.1"
matcher:
dependency: transitive
description:
Expand Down
6 changes: 3 additions & 3 deletions lib/src/layout/sidebar/sidebar_items.dart
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ class SidebarItems extends StatelessWidget {
assert(debugCheckHasMacosTheme(context));
assert(currentIndex < _allItems.length);
final theme = MacosTheme.of(context);
return IconTheme.merge(
data: const IconThemeData(size: 20),
return MacosIconTheme.merge(
data: const MacosIconThemeData(size: 20),
child: _SidebarItemsConfiguration(
selectedColor: selectedColor ?? theme.primaryColor,
unselectedColor: unselectedColor ?? MacosColors.transparent,
Expand Down Expand Up @@ -288,7 +288,7 @@ class _SidebarItem extends StatelessWidget {
data: MacosIconThemeData(
color: selected
? MacosColors.white
: MacosColors.controlAccentColor,
: theme.primaryColor,
size: itemSize.iconSize,
),
child: item.leading!,
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: macos_ui
description: Flutter widgets and themes implementing the current macOS design language.
version: 1.12.0
version: 1.12.1
homepage: "https://macosui.dev"
repository: "https://github.com/GroovinChip/macos_ui"

Expand Down

0 comments on commit 61b6975

Please sign in to comment.