Auto-adjust of framesize after open/close