added @row and @column macros
This commit is contained in:
parent
d47b835020
commit
76cef2caa0
@ -20,6 +20,21 @@ struct ElemDiv {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
macro Ctx.@row(&ctx, Anchor anchor = TOP_LEFT, ...; @body())
|
||||||
|
{
|
||||||
|
ctx.@div(@fit(), @fit(), ROW, anchor: anchor) {
|
||||||
|
@body();
|
||||||
|
}!;
|
||||||
|
}
|
||||||
|
|
||||||
|
macro Ctx.@column(&ctx, Anchor anchor = TOP_LEFT, ...; @body())
|
||||||
|
{
|
||||||
|
ctx.@div(@fit(), @fit(), COLUMN, anchor: anchor) {
|
||||||
|
@body();
|
||||||
|
}!;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// useful macro to start and end a div, capturing the trailing block
|
// useful macro to start and end a div, capturing the trailing block
|
||||||
macro Ctx.@div(&ctx,
|
macro Ctx.@div(&ctx,
|
||||||
Size width = @grow, Size height = @grow,
|
Size width = @grow, Size height = @grow,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user