-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
feat: Add gradient borders #22
Conversation
|
I was thinking in terms of configuration syntax it would be sufficient to have something like this for now where we only allow diagonal gradients but can easily extend support to further gradient configurations: borders active_color=gradient(top_right=<color_hex>,bottom_left=<color_hex>)
borders active_color=gradient(top_left=<color_hex>,bottom_right=<color_hex>) which would of course also work for the In the future, further special colors could be supported with this system as well, i.e. For the moment the sscanf method is sufficient, it can easily be extended to support even this more complex configuration syntax. |
@FelixKratz Can you explain why this is? Lines 118 to 120 in 09ec919
Currently |
I will probably change the type/field names of the new stuff I introduced, if you have suggestions let me know. |
I have made a cleanup pass through the code, fixed some memory leaks, changed some some things around, implemented the directionality and fixed the double wide square gradient borders. Once you sign off on those changes I will merge. |
Looks great! Thanks for doing all that. One thing: the current syntax is not nice for adding arbitrary number of gradient color "stops"—not sure if you wanted to think more about that (e.g., red one corner -> green in the middle -> blue other corner) or if the current approach is fine. |
Thanks! |
Very initial, incomplete, hardcoded HACK as of right now.
Creates a gradient that is clipped to the stroke path as described in the SO thread in #19.
I also noticed frame dropping with Yabai resizing (i.e., it would only have maybe 3 intermediate frames that animate in a choppy manner) (fixed by restarting Yabai) which may or may not be related to this.