vertical and horizontal lines, @row and @column return their ids like @div

This commit is contained in:
Alessandro Mauri 2025-10-26 17:48:42 +01:00
parent 4f7fa7d50c
commit 18a86e8aab
2 changed files with 47 additions and 7 deletions

View file

@ -20,21 +20,21 @@ struct ElemDiv {
macro Ctx.@center(&ctx, LayoutDirection dir = ROW, ...; @body())
{
ctx.@div(@grow(), @grow(), dir, CENTER) {
return ctx.@div(@grow(), @grow(), dir, CENTER) {
@body();
}!;
}
macro Ctx.@row(&ctx, Anchor anchor = TOP_LEFT, ...; @body())
{
ctx.@div(@fit(), @fit(), ROW, anchor: anchor) {
return ctx.@div(@fit(), @fit(), ROW, anchor: anchor) {
@body();
}!;
}
macro Ctx.@column(&ctx, Anchor anchor = TOP_LEFT, ...; @body())
{
ctx.@div(@fit(), @fit(), COLUMN, anchor: anchor) {
return ctx.@div(@fit(), @fit(), COLUMN, anchor: anchor) {
@body();
}!;
}