Converts some programmatic widgets to declarative.