Revert the reverted "Revert "better about dialog layout""

This reverts commit 176435646f12a13a87202172e53970906a545174.