adapt widget layout