macos_ui
macos_ui copied to clipboard
Toolbar fidelity issues
The trailing icon becomes darker when clicked. On macOS it becomes lighter. Dragging the trailing icon doesn't drag the toolbar on macOS. Double clicking the trailing icon doesn't minimize the screen on macOS.
https://user-images.githubusercontent.com/351125/200045237-fbcc1a82-3aca-4773-beb2-1b5776ed1be9.mov
Hi @bernaferrari! Thanks for filing this issue.
Toolbar behavior is unfortunately pretty complex. We can certainly address the icon color discrepancy; as for the dragging/clicking issue, it will require deeper research.
You probably want some form of absorb pointer.
You probably want some form of absorb pointer.
I believe we have experimented with AbsorbPointer in this regard. @whiplashoo Can you confirm this?
@bernaferrari There is an issue for the double clicking behaviour in #308
Solving this, might as well solve the draging behaviour you mention. Currently the toolbar is completely handled by the native side. I guess we need to handle part of it from the Flutter side instead to solve both issues. The experiments @whiplashoo made didn't seem to work. See https://github.com/GroovinChip/macos_ui/issues/308#issuecomment-1270448273.
@GroovinChip You might want to use / or get inspired by https://github.com/leanflutter/window_manager or https://github.com/bitsdojo/bitsdojo_window.
Yes, it wouldn't work as the double click event gets captured by the native NSToolbar, which we use to have all the minimizing-maximizing native-like behavior of the toolbar. Blocking this in Flutter with widgets wouldn't work.
The window_manager plugin looks promising, will have a look when I find time
@whiplashoo using https://github.com/leanflutter/window_manager/pull/290 you could disable window zoom on button clicks and start a timer to re-enable it 300ms later.