refactor Layout and Widget
Merge pull request #6904 from andyque/refactorUIFramework

refactor Layout and Widget