Skip to content

Commit 057b1b8

Browse files
authored
fix: ToolBar title not avoiding traffic lights when no sidebar is present (#441)
* fix: `ToolBar` not avoiding traffic lights when no sidebar is present * tweak changelog
1 parent 044af12 commit 057b1b8

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## [2.0.0-beta.4]
2+
🛠️ Fixed 🛠️
3+
* `ToolBar`s in use where a `SideBar` is not present will now have their title's avoid the traffic lights (native window controls).
4+
15
## [2.0.0-beta.3]
26
✨ New ✨
37
* Added support for `weekdayAbbreviations` and `monthAbbreviations` to `MacosDatePicker`.

example/pubspec.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ packages:
9797
path: ".."
9898
relative: true
9999
source: path
100-
version: "2.0.0-beta.3"
100+
version: "2.0.0-beta.4"
101101
macos_window_utils:
102102
dependency: transitive
103103
description:

lib/src/layout/window.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,10 @@ class _MacosWindowState extends State<MacosWindow> {
226226
final height = constraints.maxHeight;
227227
final isAtBreakpoint = width <= (sidebar?.windowBreakpoint ?? 0);
228228
final isAtEndBreakpoint = width <= (endSidebar?.windowBreakpoint ?? 0);
229-
final canShowSidebar = _showSidebar && !isAtBreakpoint;
230-
final canShowEndSidebar = _showEndSidebar && !isAtEndBreakpoint;
229+
final canShowSidebar =
230+
_showSidebar && !isAtBreakpoint && sidebar != null;
231+
final canShowEndSidebar =
232+
_showEndSidebar && !isAtEndBreakpoint && endSidebar != null;
231233
final visibleSidebarWidth = canShowSidebar ? _sidebarWidth : 0.0;
232234
final visibleEndSidebarWidth =
233235
canShowEndSidebar ? _endSidebarWidth : 0.0;

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: macos_ui
22
description: Flutter widgets and themes implementing the current macOS design language.
3-
version: 2.0.0-beta.3
3+
version: 2.0.0-beta.4
44
homepage: "https://macosui.dev"
55
repository: "https://github.com/GroovinChip/macos_ui"
66

0 commit comments

Comments
 (0)