Centering hexagonal layout on C and adapting layout dims to screen size