update layout according to inlining