refine the widget layout