Use layout attributes on header-panel example

I've added layout attributes to this example to make it a bit tidier. @ebidel @arthurevans wdyt?
Visually it should look the same