minbrowser / min

A fast, minimal browser that protects your privacy
https://minbrowser.org/
Apache License 2.0
7.72k stars 684 forks source link

Modify Mac draggable region for Electron 24 #2250

Closed PalmerAL closed 1 year ago

PalmerAL commented 1 year ago

In Electron 24, we can't have a region that is both draggable and clickable: https://github.com/electron/electron/issues/37789. This makes it impossible to drag the window on macOS with the existing titlebar design.

Windows and Linux currently have the same limitation; we solve it there by shifting the titlebar down and adding empty space above (see previous discussion: https://github.com/minbrowser/min/issues/630). But no other apps do the same thing on macOS, so it would look odd to do it there.

My current idea (which this PR implements) is to do this, where the draggable regions are in red:

Screenshot 2023-05-30 at 10 19 03 PM

Although the space to the right of the window controls looks slightly odd, and it's not obvious what's draggable:

Screenshot 2023-05-30 at 10 22 19 PM

If anyone has feedback or other ideas, please let me know!

PalmerAL commented 1 year ago

I'm going to merge this and make a beta release to get more feedback, and then we can adjust it again before the final release.