[cyril] moved more layout related code into HexaLayout.