Recalculate height after adding vertical scrollbar

We need to recalculate height after adding vertical scrollbar. This changes content width and content may wrap.

P.S. This is a quick and dirty hack made by code duplication. I suggest some refactoring, but sadly don't have time for that at the moment, sorry.