refactoring widget.visible and IWidgetVisibility