How to make floating widgets?

what should I put to the logic that offset the edge of the screen?