Issue #5941: refactor UILayout for new renderer

refactor UILayout for new renderer