zed icon indicating copy to clipboard operation
zed copied to clipboard

macOS: Fix center window with fixed bounds size

Open Quadriphobs1 opened this issue 1 year ago • 2 comments

This PR fixes window showing up in the center of the monitor when center: true option is provided.

The idea is to set the window_wize when creating the window using native_window.initWithContentRect_styleMask_backing_defer_screen_()

Before:

SCR-20240227-qokf

After:

SCR-20240227-qlmg

Release Notes:

  • N/A

Quadriphobs1 avatar Feb 27 '24 10:02 Quadriphobs1

Thanks for this! I accidentally broke this a while back.

Can you please run cargo fmt on your code to keep the linter happy, then I will merge.

ConradIrwin avatar Mar 01 '24 22:03 ConradIrwin

Thanks for taking a look.

I have run cargo fmt and push the changes, can you confirm if there is anymore lint error.

Quadriphobs1 avatar Mar 02 '24 05:03 Quadriphobs1

Looks good, thanks!

ConradIrwin avatar Mar 05 '24 00:03 ConradIrwin