I’ve seen a couple of nice presets based on the old Windows Mobile “Metro” interface recently.
I was curious, so I made the basic structure and formulas, and thought others here might want that to create their own. I’ve not created my new preset yet, but this seems to work…
GLOBALS:
vCols - type: text, value: 4
vPad - type: text, value: 10
vWidth - type: text, value: $mu(floor, (si(rwidth)-((gv(vCols)-1)*gv(vPad)))/gv(vCols))$
v1Wide - type: text, value: $mu(floor, (gv(vWidth)*1)+(gv(vPad)*0))$
v2Wide - type: text, value: $mu(floor, (gv(vWidth)*2)+(gv(vPad)*1))$
v3Wide - type: text, value: $mu(floor, (gv(vWidth)*3)+(gv(vPad)*2))$
v4Wide - type: text, value: $mu(floor, (gv(vWidth)*4)+(gv(vPad)*3))$
STRUCTURE: (create each of these objects in the line above it)
Stack Group: name: “Structure”,
-- Stacking: Vertical Left
-- Anchor: Top Left
Stack Group: name: “Tile Row”,
-- Stacking: Horizontal Left
Stack Group: name: “Sub Col”,
-- Stacking: Vertical Left
Stack Group: name: “Sub Row”,
-- Stacking: Horizontal Top
Overlap Group: name: “Tile”,
-- RPadding: $gv(vPad)$
-- BPadding: $gv(vPad)$
Shape: name: “Background”,
-- Anchor: Top Left
-- Shape: Rectangle
-- Width: $(gv(v1Wide)-((si(mcount,1)-1)*gv(vPad)))/si(mcount,1)$
-- Height: $(gv(v1Wide)-((si(mcount,1)-1)*gv(vPad)))/si(mcount,1)$
Then make a copy of the “Sub Col” stack group (which copies everything below it too) and paste it into the “Tile Row” stack. Do that for as many cols as you want to have. In mine I have 4x “Sub Col” stacks in each “Tile Row”.
You can also create a copy of a “Tile” overlap group into any “Sub Row” stack, to create the smaller tiles.
If you want a Tile that occupies more than 1 column you can use a very slightly different formula for the tile background shape, like this:
-- Double Width: $(gv(v2Wide)-((si(mcount,1)-1)*gv(vPad)))/si(mcount,1)$
-- Triple Width: $(gv(v3Wide)-((si(mcount,1)-1)*gv(vPad)))/si(mcount,1)$
-- Quadruple Width: $(gv(v4Wide)-((si(mcount,1)-1)*gv(vPad)))/si(mcount,1)$
And finally, make more copies of the “Tile Row” stack group within the “Structure” stack group to create more rows of tiles.
You can change the global values to vary the number of columns you want (vCols) and the width of padding around the tiles (vPad). If you have more “Sub Col” stacks than your vCols value the extra Sub Cols won’t be visible.
This just creates a bunch of blank tiles. You’ll want to add text, and/or icons, and a touch action to each “Tile” overlap group.
TIP: Get your default Tile layout (icons, font, text size, alignment etc) sorted before you copy the “Tile” stack, otherwise you have to do that for each individually.