Fill-in drawing characters and center the content #273

Closed
opened 10 months ago by sv · 4 comments
sv commented 10 months ago

When size of the foot window isn't equal to a multiple of characters, gaps appear along the edges.

For example, the right edge here:

image

Would it be possible to "extend" drawing for a subset of box-drawing glyphs and center the content? U2500 and U2580 should suffice.

There was rather popular st patch addressing the same problem: https://st.suckless.org/patches/anysize/

When size of the `foot` window isn't equal to a multiple of characters, gaps appear along the edges. For example, the right edge here: ![image](/attachments/468830cf-0865-47be-9bff-993cf3d261c6) Would it be possible to "extend" drawing for a subset of box-drawing glyphs and center the content? [U2500](https://www.unicode.org/charts/PDF/U2500.pdf) and [U2580](https://www.unicode.org/charts/PDF/U2580.pdf) should suffice. There was rather popular `st` patch addressing the same problem: https://st.suckless.org/patches/anysize/
152 KiB
Owner

Would it be possible to "extend" drawing for a subset of box-drawing glyphs

This is unfortunately not possible. Mainly because the glyphs are generated once, for the normal cell size. Adding custom glyphs for the wider cells at the right/bottom margins isn't possible. At least I can't see a reasonable way to do that.

And widening the cells is what we would have to do; otherwise cells painted with different background color will look bad.

and center the content?

This we can do. The current behavior was chosen since doing an interactive resize of a floating window (or in a stacking wm) with the content constantly being centered makes it (the content) jump around which is visually jarring.

But adding an option that controls whether the content is centered or not sounds reasonable.

There was rather popular st patch addressing the same problem: https://st.suckless.org/patches/anysize/

As far as I can tell, that patch only allow the margins to be of any size (instead of snapping the window size to the cell grid), and centers the content. But it doesn't "extend" any glyphs?

> Would it be possible to "extend" drawing for a subset of box-drawing glyphs This is unfortunately not possible. Mainly because the glyphs are generated once, for the normal cell size. Adding custom glyphs for the wider cells at the right/bottom margins isn't possible. At least I can't see a reasonable way to do that. And widening the cells is what we would have to do; otherwise cells painted with different background color will look bad. > and center the content? This we can do. The current behavior was chosen since doing an interactive resize of a floating window (or in a stacking wm) with the content constantly being centered makes it (the content) jump around which is visually jarring. But adding an option that controls whether the content is centered or not sounds reasonable. > There was rather popular st patch addressing the same problem: https://st.suckless.org/patches/anysize/ As far as I can tell, that patch only allow the margins to be of any size (instead of snapping the window size to the cell grid), and centers the content. But it doesn't "extend" any glyphs?
Poster

adding an option that controls whether the content is centered or not sounds reasonable.

Sounds great! Perhaps via something like pad=center in foot.ini?

As far as I can tell, that patch only allow the margins to be of any size (instead of snapping the window size to the cell grid), and centers the content. But it doesn't "extend" any glyphs?

Correct. I do remember having this setup with i3+st though, shall try to find the an st config and try to diff the applied patches.

> adding an option that controls whether the content is centered or not sounds reasonable. Sounds great! Perhaps via something like `pad=center` in foot.ini? > As far as I can tell, that patch only allow the margins to be of any size (instead of snapping the window size to the cell grid), and centers the content. But it doesn't "extend" any glyphs? Correct. I do remember having this setup with i3+st though, shall try to find the an `st` config and try to diff the applied patches.
Owner

Sounds great! Perhaps via something like pad=center in foot.ini?

I think we'll keep the current pad setting as is - you may want padding and center the content.

So a new option. Perhaps pad-type or maybe not a new option; pad=2x5 center...

> Sounds great! Perhaps via something like pad=center in foot.ini? I think we'll keep the current `pad` setting as is - you may want padding **and** center the content. So a new option. Perhaps `pad-type` or maybe _not_ a new option; `pad=2x5 center`...
Poster

or maybe not a new option; pad=2x5 center

That's clever.

> or maybe not a new option; pad=2x5 center That's clever.
dnkl closed this issue 10 months ago
dnkl referenced this issue from a commit 10 months ago
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.