drawing on widget rectangle only

bad code