优化resize panel