Adding a few more alignment widgets
Closed this issue · 2 comments
JustinBraben commented
Been working on a project using libvaxis and made some functions to make child windows aligned to each corner of the window.
bottomRight sample:
pub fn bottomRight(parent: Window, cols: usize, rows: usize) Window {
const y_off = parent.height -| rows;
const x_off = parent.width -| cols;
return parent.child(.{
.x_off = x_off,
.y_off = y_off,
.width = .{ .limit = cols },
.height = .{ .limit = rows }
});
}
Was wondering if I could make a PR adding them to the alignment widget? Optionally I can also create an example that uses them.
rockorager commented
A PR for this would be great. No need for an example though, it's usage is
pretty obvious.
Thanks!
…--
Tim
rockorager commented
Fixed in 7df8ca6