From 61b697523aba999ec0b5fb2a43addc36cc187ba5 Mon Sep 17 00:00:00 2001 From: Reuben Turner Date: Tue, 28 Feb 2023 16:57:17 -0500 Subject: [PATCH] fix(SidebarItem): use theme's primary color instead of hardcoded value (#374) * fix(SidebarItem): use theme's primary color instead of hardcoded value Fixes #313 * chore: update version, changelog --- CHANGELOG.md | 3 +++ example/pubspec.lock | 2 +- lib/src/layout/sidebar/sidebar_items.dart | 6 +++--- pubspec.yaml | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cefe920e..a058f72c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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` diff --git a/example/pubspec.lock b/example/pubspec.lock index 377bab70..efa2bfa0 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -97,7 +97,7 @@ packages: path: ".." relative: true source: path - version: "1.12.0" + version: "1.12.1" matcher: dependency: transitive description: diff --git a/lib/src/layout/sidebar/sidebar_items.dart b/lib/src/layout/sidebar/sidebar_items.dart index aada626f..f5954951 100644 --- a/lib/src/layout/sidebar/sidebar_items.dart +++ b/lib/src/layout/sidebar/sidebar_items.dart @@ -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, @@ -288,7 +288,7 @@ class _SidebarItem extends StatelessWidget { data: MacosIconThemeData( color: selected ? MacosColors.white - : MacosColors.controlAccentColor, + : theme.primaryColor, size: itemSize.iconSize, ), child: item.leading!, diff --git a/pubspec.yaml b/pubspec.yaml index 9604bd3f..f570970a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -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"