code cleanup: move menu-resize handler to menu code