-
Notifications
You must be signed in to change notification settings - Fork 139
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
Add a titlebar #255
base: master
Are you sure you want to change the base?
Add a titlebar #255
Conversation
Force pushed because I fixed a bug in the first commit and rebased. |
817adbe
to
e0d6563
Compare
Thanks for the patch! I'm wondering if this feature is worth the added complexity... |
Fixed up some quirks with border radius. I'm not aware of any other bugs, after using this for around a week and testing a bit. I do think this is worth it, it fits really well with sway, imo. |
Would there be a nice way to de-duplicate some of the rendering logic? |
I will try, but I'm very much a beginner at C. For the most part I avoided touching what I didn't need to xD |
Another edge case done, I will try now deduplicating the config.c. |
@emersion does this last commit look any good? It compiles and runs fine, but I really don't know much about styling, naming, etc. |
This will add support for three new keys: - title-format - title-padding - title-color These are stored respectively: - style->title_format - style->title_padding - style->colors.title
This adds a titlebar to individual notifications. It will only render if titlebar-format is set in the config, and if there is text to render in it. Otherwise, the notification will render the same as it used to before this.
This way when border radius is enabled, the bottom (outside) corners of the titlebar will be filled with the progress bar.
@mendelmaleh Perhaps this will help regarding the styling: https://github.com/swaywm/sway/blob/master/CONTRIBUTING.md |
I'm on the fence wrt. this PR: I'm not sure we should add this extra functionality. I don't want to maintain software with too many features, and this opens the door to other UI elements like footer/sidebars/etc. |
I wonder, would it be sufficient to instead allow specifying a gradient with multiple stops that get passed straight to cairo? That would avoid adding (much) extra work on the mako side, and you can create a hard edge that appears to be a title bar if you wish. |
I think this is unnecessary. Now the PR has been open almost two years and there's been little interest in it. |
I feel like this merge request can be closed after 2 years of no activity as well. @emersion |
Probably safe to close this now? |
I wanted mako to match the sway window aesthetics, so I added a titlebar. To enable it
title-format
needs to be set in the config.It will only render if that option is set and there is text to show, otherwise the notification will look like it used to before this.