fix SwapView height calculation, fixes #17050,#15761 thx sbrunot
(cherry picked from commit 426bb8150933d925816df9ca0195639802095b1a)