Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Squared border on 5.x looks bad #1460

Closed
cxa opened this issue Sep 26, 2022 · 19 comments
Closed

Squared border on 5.x looks bad #1460

cxa opened this issue Sep 26, 2022 · 19 comments

Comments

@cxa
Copy link

cxa commented Sep 26, 2022

pre 5.x:

Screen Shot 2022-09-26 at 09 08 00

after 5.x:

Screen Shot 2022-09-26 at 09 08 13

Just look at the corners, can we restore previous behavior?

@cxa cxa changed the title Squared borders on 5.x is bad Squared border on 5.x looks bad Sep 26, 2022
@koekeishiya
Copy link
Owner

koekeishiya commented Sep 26, 2022

No, it is not possible to restore the previous behaviour. See the issues linked to #1430 for history. This is one of these cases where no matter what I do, some people are not satisfied.

@FelixKratz
Copy link

FelixKratz commented Sep 26, 2022

It would be possible to make it look a bit better by drawing the border at double width and draw one border width outside of the frame and one border width inside of the frame. This also looks better for rounded borders, since you can then set the border radius to 9, which exactly matches the systems border curvature: https://github.com/FelixKratz/yabai/commit/4a9b6ca5367b5068b55c64e01dc70e7fe36c3f6a

Screen Shot 2022-09-26 at 10 09 04
Screen Shot 2022-09-26 at 10 15 53

@koekeishiya
Copy link
Owner

That doesn't look particularly good when combined with window opacity, in my opinion.

@FelixKratz
Copy link

Another approach would be to just fill in the characteristic system border radius up to the supplied border radius with a mask. This would fill out only the edges of the border.

@koekeishiya
Copy link
Owner

Well, that ties in to my previous caveat with the new border system in general (mentioned in several of the linked issues); there is no way to accurately determine the corner radius/mask of a window. Sure, most windows use the same, but from my experience it varies between applications, so there is always going to be something that looks "off".
This is exactly why until now I have opted for the square-borders approach.

It really is a pick-your-poison situation imo.

@koekeishiya
Copy link
Owner

koekeishiya commented Sep 26, 2022

So it might be possible to detect the corner radius by taking a screen capture of the window upon border creation and simply iterate through the pixels and check which pixels are basically fully transparent, and adjust the corner radius automatically based on this.

@diocletiann
Copy link

diocletiann commented Sep 26, 2022

Can you force windows to render in legacy fullscreen mode? It would automatically give you square corners, and in many cases auto hide the title bar. Apps that allow this natively look great!

@marcelarie
Copy link

I would like this to roll back to the old look too :)

@ccapndave
Copy link

It would be possible to make it look a bit better by drawing the border at double width and draw one border width outside of the frame and one border width inside of the frame. This also looks better for rounded borders, since you can then set the border radius to 9, which exactly matches the systems border curvature: FelixKratz@4a9b6ca

Screen Shot 2022-09-26 at 10 09 04 Screen Shot 2022-09-26 at 10 15 53

I would love to have the option of "inside" borders but for a different reason; I want to know which window is selected but I don't like having gaps between windows. Therefore I'd like to be able to configure a 1px "inside" red border and 0 window gaps.

@brorbw
Copy link

brorbw commented Sep 28, 2022

That doesn't look particularly good when combined with window opacity, in my opinion.

This might be an unpopular opinion but it seems like more people are using the borders than there are people using transparency.

@24unix
Copy link

24unix commented Sep 28, 2022

Transparency ist the main reason for me to use yabai.

@brorbw
Copy link

brorbw commented Sep 28, 2022

@24unix so you don't use borders or any of the other features of yabai?

@24unix
Copy link

24unix commented Sep 28, 2022

@brorbw No borders. Three displays. The middle with bsp, the external with float. But without transparency I wouldn't use yabai, bsp is not so important to me.

@brorbw
Copy link

brorbw commented Sep 28, 2022

Fair enough - I didn't expect anyone to use a tiling window manager and then only use it for transparency. Guess my ignorance got the better of me. That being said. Personally I don't like the rounded corners and I would like it to go back to the way it was before. I don't care about the transparency nor the animations.

@koekeishiya
Copy link
Owner

#984 #715 #801 there is a wide range of opinions regarding this topic; as I said before this is a pick-your-poison situation. For now, make a fork and adjust the border to your liking.

@brorbw
Copy link

brorbw commented Sep 28, 2022

The ability to pick inside or outside borders. Maybe even automatic if border_radiusis 0 🤷🏻

@brorbw
Copy link

brorbw commented Sep 28, 2022

May I add that the round borders don't look particularly good on square windows
Screenshot 2022-09-28 at 19 07 52

@cxa
Copy link
Author

cxa commented Mar 18, 2023

For anyone who interest in my alt square border fork, check out https://github.com/cxa/yabai

@cxa cxa closed this as completed Mar 18, 2023
@azinsharaf
Copy link

For anyone who interest in my alt square border fork, check out https://github.com/cxa/yabai

What OS version are you using? I read that Apple has added round corner and there is not a simple way to change it to squared corner. Is it right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants