replace widget & update layout