macosui/macos_window_utils.dart

Create a TrafficLightsSafeArea widget

matthew-carroll opened this issue · 2 comments

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: macosui/macos_ui#437

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

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.

@Adrian-Samoticha this may be helpful in resolving macosui/macos_ui#371