Layer toolbox: refine resize

This fixes the issue with the resize cursor sometimes not appearing.

Button reflow at the bottom has also been improved, especially when the
box is resized near its minimum width.