macosui / macos_window_utils.dart

macos_window_utils is a Flutter package that provides a set of methods for modifying the NSWindow of a Flutter application on macOS.
https://pub.dev/packages/macos_window_utils
MIT License
49 stars 9 forks source link

Create a TrafficLightsSafeArea widget #30

Open matthew-carroll opened 1 year ago

matthew-carroll commented 1 year ago

This library has TitlebarSafeArea, which pushes content down below the title bar.

I'm displaying tabs in the title bar area and I need the tabs to avoid the traffic lights, but not by pushing the content down. Instead, I need to push the content to the right of the traffic lights, but remain at the top of the screen.

Consider offering a TrafficLightsSafeArea for this purpose. Or, consider adding a property to TitlebarSafeArea that toggles between pushing content down, vs pushing content away from the traffic lights within the title bar.

I filed an equivalent issue in macos_ui before seeing that this package already has a TitlebarSafeArea: https://github.com/macosui/macos_ui/issues/437

I'll let the maintainers hash out where that belongs.

Adrian-Samoticha commented 1 year ago

This may, in fact, be possible by retrieving the frame of the traffic light buttons to get their positions. I’ll look into this on occasion.

GroovinChip commented 1 year ago

@Adrian-Samoticha this may be helpful in resolving https://github.com/macosui/macos_ui/issues/371