Moved widget from point function from canvas to widget code