Hi
I’m having a go at using a Grid for my plugin layout. I wanted to use template areas to divide up the screen into 4 parts, each with different sizes. According to this website CSS allows you to span across rows by using the same name in different template area strings:
grid-template-areas:
'header header header header header'
'menu main main main right right'
'menu footer footer footer footer';
but I get an assertion if I try something similar with my Grid:
Grid grid;
using Track = Grid::TrackInfo;
grid.templateRows = { Track(1_fr), Track(2_fr)};
grid.templateColumns = { Track(2_fr), Track(1_fr), Track(3_fr) };
grid.templateAreas = { "input control preset",
"input control editor" };
grid.items = { GridItem(inputPanel).withArea("input"),
GridItem(masterControlPanel).withArea("control"),
GridItem(presetChooserPanel).withArea("preset"),
GridItem(presetEditorPanel).withArea("editor") };
grid.performLayout(r);
I’ve got it to work with GridItem::Span as in the JUCE Grid demo, but is there any way to make template areas work as above?
Thanks,
Matt
