Improved panel resize