refactor Button restrict capInsetSize logic and cleanup ui coding style
Merge pull request #9519 from andyque/addNewRequirements

refactor Button restrict capInsetSize logic and cleanup ui coding style