Revert "Partial fix of a bug concerning scrollbar"

This commit breaks resizing of panels with a scrollbar if they contain
multiple elements. The original commit also admits that the fix
was only partial, as the widget borders did not draw properly.

This reverts commit 5eb143aae2b200429c9181647be855f1f5a4b565.