De-duplicate code in Widgets

Reduce UI code duplication by making Widget inherit Delegator and
making better use of inheritance for subclasses, unifying functionality
for hide and show.