closed #5118, remove WidgetType and refactor LayoutType to Type