Margin causes problems centering popups, external was not working
setWidget reduces the number of function calls