[Feat] Custom margin settings - #915
Conversation
|
Check this #867 We already added a margin settings. For now it uses the spacing scale from the DS token but we don't have yet a way to change that scale. |
|
This PR builds on that one. It still allows specifying the margin as in #867, but also allows specifying it in pixels. To make the implementation simpler I removed margin scaling since I think most users would want to work with physical pixels, not scaled pixels; if you want, I can add scaling for just the space size margins, but I think it won't matter to most users. |
|
I would still need to update the docs as in #867, so I've made this PR a draft for now. Please let me know if this is something you would want to merge and I'll update the docs and make any requested changes. |
|
I updated the documentation. Please let me know if there is anything you'd like done differently. |
| BarSurface::Solid => 8., | ||
| BarSurface::Transparent => 0., | ||
| BarSurface::Solid => 0., | ||
| BarSurface::Transparent => 8., |
There was a problem hiding this comment.
I had changed the transparent to be 8 because I removed the padding, but I think the solid should still be 8, so I could probably remove this match and make HEIGHT = 26 instead. I'll push some changes soon.
| Position::Top => top, | ||
| Position::Bottom => bottom, | ||
| Position::Top => bottom, | ||
| Position::Bottom => top, |
There was a problem hiding this comment.
This is because the exclusive zone pushes other windows away from the bar, so when the bar is on the bottom it is the top margin that determines the exclusive zone and vice versa. I've retested this and it seems to work as expected.
Closes #351
This allows for custom margin size in pixels without breaking the old margin system, although it removes the scaling that was applied to the old margins.
Samples with config:
edit: wrote out the margins for easier parsing.
P.S. I've really enjoyed Ashell, thank you for making it.