diff --git a/CHANGELOG.md b/CHANGELOG.md index 0181e334..33953df1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## [1.7.3] +* Fixed an issue where the `title` property of `TitleBar` did not apply a fitting `DefaultTextStyle` + +## [1.7.2] +* Add padding as parameter to MacosTabView constructor. + ## [1.7.1] * Fixed an issue where end sidebar window breakpoints were not respected diff --git a/example/pubspec.lock b/example/pubspec.lock index f9a68fd6..cb284195 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -87,7 +87,7 @@ packages: path: ".." relative: true source: path - version: "1.7.1" + version: "1.7.3" matcher: dependency: transitive description: diff --git a/lib/src/indicators/relevance_indicator.dart b/lib/src/indicators/relevance_indicator.dart index faa74202..fa4d6e19 100644 --- a/lib/src/indicators/relevance_indicator.dart +++ b/lib/src/indicators/relevance_indicator.dart @@ -20,7 +20,7 @@ class RelevanceIndicator extends StatelessWidget { this.barHeight = 20, this.barWidth = 0.8, this.selectedColor = CupertinoColors.label, - this.unselectedolor = CupertinoColors.secondaryLabel, + this.unselectedColor = CupertinoColors.secondaryLabel, this.semanticLabel, }) : assert(value >= 0 && value <= amount), assert(amount > 0), @@ -46,7 +46,7 @@ class RelevanceIndicator extends StatelessWidget { /// The color of each bar when it's not selected. [CupertinoColors.secondaryLabel] /// is used by default - final Color unselectedolor; + final Color unselectedColor; /// The semantic label used by screen readers. final String? semanticLabel; @@ -59,7 +59,7 @@ class RelevanceIndicator extends StatelessWidget { properties.add(DoubleProperty('barHeight', barHeight)); properties.add(DoubleProperty('barWidth', barWidth)); properties.add(ColorProperty('selectedColor', selectedColor)); - properties.add(ColorProperty('unselectedColor', unselectedolor)); + properties.add(ColorProperty('unselectedColor', unselectedColor)); properties.add(StringProperty('semanticLabel', semanticLabel)); } @@ -79,7 +79,7 @@ class RelevanceIndicator extends StatelessWidget { width: barWidth, margin: EdgeInsets.only(right: index + 1 == amount ? 0 : 2.5), color: MacosDynamicColor.resolve( - selected ? selectedColor : unselectedolor, + selected ? selectedColor : unselectedColor, context, ), ); diff --git a/lib/src/layout/tab_view/tab_view.dart b/lib/src/layout/tab_view/tab_view.dart index c12375c2..03d9b91b 100644 --- a/lib/src/layout/tab_view/tab_view.dart +++ b/lib/src/layout/tab_view/tab_view.dart @@ -43,6 +43,7 @@ class MacosTabView extends StatefulWidget { required this.tabs, required this.children, this.position = MacosTabPosition.top, + this.padding = const EdgeInsets.all(12.0), }) : assert(controller.length == children.length && controller.length == tabs.length); @@ -60,6 +61,11 @@ class MacosTabView extends StatefulWidget { /// The placement of the [tabs], typically [MacosTabPosition.top]. final MacosTabPosition position; + /// The padding of the tab view widget. + /// + /// Defaults to `EdgeInsets.all(12.0)`. + final EdgeInsetsGeometry padding; + @override State createState() => _MacosTabViewState(); } @@ -153,7 +159,7 @@ class _MacosTabViewState extends State { alignment: Alignment.center, children: [ Padding( - padding: const EdgeInsets.all(12.0), + padding: widget.padding, child: DecoratedBox( decoration: BoxDecoration( color: brightness.resolve( diff --git a/lib/src/layout/title_bar.dart b/lib/src/layout/title_bar.dart index 49bd7d36..249c6ebb 100644 --- a/lib/src/layout/title_bar.dart +++ b/lib/src/layout/title_bar.dart @@ -120,7 +120,7 @@ class TitleBar extends StatelessWidget { gradient: decoration?.gradient, ), child: NavigationToolbar( - middle: title, + middle: _title, centerMiddle: centerTitle, middleSpacing: 8, ), diff --git a/pubspec.yaml b/pubspec.yaml index 53cd6f60..e5238f72 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.7.1 +version: 1.7.3 homepage: "https://macosui.dev" repository: "https://github.com/GroovinChip/macos_ui"