normalize only swaps the sides if width() or height() is < 0, but we need it to happen when it is <=0 because with QRect's normalized method we get negative geometry and that causes a bug when we position the buttons.