Better resize method (Inspired by SKUI)