wezterm icon indicating copy to clipboard operation
wezterm copied to clipboard

disable rounded corners macos

Open jakenvac opened this issue 3 years ago • 4 comments

Hi, I've seen discussion about making the macos build preserve the rounded corners when the title bar is disabled here: #1034, I'm assuming the squared corners were originally considered a bug?

Is it possible to restore the squared corners in macos via a setting? If not, I think it would be a good idea to extend the window decorations setting to include a corners option.

jakenvac avatar Jun 26 '22 06:06 jakenvac

Yeah, all the windows are rounded on macOS, so I considered it a bug. I'll accept a PR for something around this. I'm not super sure what the config should look like. Maybe add a MACOS_SQUARE_CORNERS to window decorations?

wez avatar Jul 19 '22 02:07 wez

I think we can introduce SQUARE_CORNER. The existing flags NONE, TITLE, RESIZE and TITLE | RESIZE can be preserved, i.e., the rounded corner is the default. If users need the square corner, they can just append it to the corresponding flags. E.g., NONE | SQUARE_CORNER, RESIZE | SQUARE_CORNER, etc.

rockyzhang24 avatar Jul 29 '22 06:07 rockyzhang24

An issue with just using SQUARE_CORNER is that it implies that not specifying it will give something other than square corners, but most systems only have square corners, and there is not a portable way to know or specify which should be used.

I think MACOS_FORCE_SQUARE_CORNERS is a more appropriately scoped name and effect.

wez avatar Jul 29 '22 11:07 wez

Oh yes, exactly. MACOS_FORCE_SQUARE_CORNERS is proper flag. I second it.

rockyzhang24 avatar Jul 29 '22 15:07 rockyzhang24

Another vote for MACOS_FORCE_SQUARE_CORNERS flag. Afraid I have zero Rust chops to help out though, sorry!

benfrain avatar Jan 31 '23 11:01 benfrain

FWIW, I think this is more a matter of figuring out how to get macos to disable rounded corners with OpenGL and Metal views.

These are relevant questions with no obvious answer:

  • https://stackoverflow.com/questions/38986010/when-exactly-does-an-nswindow-get-rounded-corners
  • https://stackoverflow.com/questions/47173374/how-to-get-square-lower-corners-in-an-nswindow

https://github.com/lukakerr/NSWindowStyles#6-vibrant-background-with-custom-border-radius-and-no-titlebar might be adaptable for this purpose by setting the corner radius to 0.

I don't have time to actually sit down and play with this; I just happened to be looking at window_decorations tonight as part of #2669

wez avatar Feb 01 '23 05:02 wez

Is there a way to made look wez like iterm? Without title bar but with close/expand buttons? Like this:

image

karambaq avatar Mar 21 '23 08:03 karambaq

@karambaq not yet, but keep you eye on this PR:

  • https://github.com/wez/wezterm/pull/2722

wez avatar Mar 21 '23 14:03 wez

hey @wez any update on the corner radius setting?

ekattsim avatar Nov 01 '23 07:11 ekattsim