Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## [2.2.1]
### 🔄 Updated 🔄
* Wrap toolbar items with `MacosToolbarPassthrough` to prevent window move or resize when interacting with toolbar items.

## [2.2.0+3]
* Address DCM lints:
* Prefer `const BorderRadius.all`
Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ packages:
path: ".."
relative: true
source: path
version: "2.2.0+3"
version: "2.2.1"
macos_window_utils:
dependency: transitive
description:
Expand Down
3 changes: 2 additions & 1 deletion lib/src/buttons/toolbar/toolbar_icon_button.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'package:macos_ui/macos_ui.dart';
import 'package:macos_ui/src/library.dart';
import 'package:macos_window_utils/widgets/macos_toolbar_passthrough.dart';

/// An icon button suitable for the toolbar.
class ToolBarIconButton extends ToolbarItem {
Expand Down Expand Up @@ -99,7 +100,7 @@ class ToolBarIconButton extends ToolbarItem {
if (tooltipMessage != null) {
iconButton = MacosTooltip(message: tooltipMessage!, child: iconButton);
}
return iconButton;
return MacosToolbarPassthrough(child: iconButton);
} else {
return ToolbarOverflowMenuItem(label: label, onPressed: onPressed);
}
Expand Down
3 changes: 2 additions & 1 deletion lib/src/buttons/toolbar/toolbar_pulldown_button.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'package:macos_ui/macos_ui.dart';
import 'package:macos_ui/src/library.dart';
import 'package:macos_window_utils/widgets/macos_toolbar_passthrough.dart';

/// A pulldown button suitable for the toolbar.
class ToolBarPullDownButton extends ToolbarItem {
Expand Down Expand Up @@ -72,7 +73,7 @@ class ToolBarPullDownButton extends ToolbarItem {
child: pulldownButton,
);
}
return pulldownButton;
return MacosToolbarPassthrough(child: pulldownButton);
} else {
// We should show a submenu for the pulldown button items.
final subMenuKey = GlobalKey<ToolbarPopupState>();
Expand Down
3 changes: 2 additions & 1 deletion lib/src/layout/toolbar/custom_toolbar_item.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'package:macos_ui/macos_ui.dart';
import 'package:macos_ui/src/library.dart';
import 'package:macos_window_utils/widgets/macos_toolbar_passthrough.dart';

/// A custom widget for the toolbar.
class CustomToolbarItem extends ToolbarItem {
Expand Down Expand Up @@ -66,7 +67,7 @@ class CustomToolbarItem extends ToolbarItem {
if (tooltipMessage != null) {
widget = MacosTooltip(message: tooltipMessage!, child: widget);
}
return widget;
return MacosToolbarPassthrough(child: widget);
} else {
return (inOverflowedBuilder != null)
? inOverflowedBuilder!(context)
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: 2.2.0+3
version: 2.2.1
homepage: "https://macosui.dev"
repository: "https://github.com/GroovinChip/macos_ui"

Expand Down
Loading