[code] improve panel positioning