Document widget resize method