Merge "Adjust layout to avoid clipping." into jb-dev