vertical and horizontal lines, @row and @column return their ids like @div
This commit is contained in:
parent
4f7fa7d50c
commit
18a86e8aab
2 changed files with 47 additions and 7 deletions
|
|
@ -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();
|
||||
}!;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue