Implemented clipping of widget to the widgets extents.