fix layout and apply to gadget.xml