Isolate code common to the scroll and minimalist widgets.